Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Bockover <abock@xamarin.com>2013-11-03 21:22:31 +0400
committerAaron Bockover <abock@xamarin.com>2013-11-03 21:22:31 +0400
commitfeaf598cf9cb23b106d238692d18437b82a286ef (patch)
tree12a197175de62e73023e3585c61108b315b2405e
parent42830053e99971ab0ebcbbcd185566e6442edc12 (diff)
parentc574de067d185cb7b8cdd5afecc2c66871cd9f94 (diff)
Merge branch 'master' of github.com:mono/mono into compiler-hookscompiler-hooks
-rw-r--r--.gitignore3
-rw-r--r--Makefile.am37
-rw-r--r--README592
-rw-r--r--README.md535
-rw-r--r--configure.in254
-rw-r--r--data/Browsers/.gitattributes (renamed from data/net_2_0/Browsers/.gitattributes)0
-rw-r--r--data/Browsers/ChangeLog (renamed from data/net_2_0/Browsers/ChangeLog)0
-rw-r--r--data/Browsers/Compat.browser (renamed from data/net_2_0/Browsers/Compat.browser)0
-rw-r--r--data/config.in4
-rw-r--r--data/net_2_0/Browsers/Makefile.am4
-rw-r--r--data/net_4_0/Browsers/.gitignore2
-rw-r--r--data/net_4_0/Browsers/Makefile.am6
-rw-r--r--data/net_4_0/Makefile.am2
-rw-r--r--data/net_4_5/Browsers/.gitignore2
-rw-r--r--data/net_4_5/Browsers/Makefile.am6
-rw-r--r--data/net_4_5/Makefile.am2
-rw-r--r--docs/current-api1
-rw-r--r--docs/public-api1
-rw-r--r--eglib/src/gfile-posix.c2
-rw-r--r--eglib/src/gfile-win32.c1
-rw-r--r--eglib/src/giconv.c86
-rw-r--r--eglib/src/gmodule-win32.c1
-rw-r--r--eglib/src/gstring.c3
m---------external/cecil0
m---------external/ikvm0
-rw-r--r--libgc/alloc.c2
-rw-r--r--libgc/include/private/gc_locks.h40
-rw-r--r--libgc/obj_map.c2
-rw-r--r--libgc/ptr_chck.c2
-rw-r--r--m4/po.m42
-rw-r--r--man/mkbundle.12
-rw-r--r--man/mono.16
-rw-r--r--mcs/build/common/Consts.cs.in1
-rw-r--r--mcs/build/gensources.sh19
-rw-r--r--mcs/build/library.make9
-rw-r--r--mcs/build/profiles/mobile_static.make20
-rw-r--r--mcs/build/profiles/monotouch.make4
-rw-r--r--mcs/build/profiles/monotouch_runtime.make4
-rw-r--r--mcs/build/rules.make6
-rw-r--r--mcs/class/Facades/Makefile26
-rw-r--r--mcs/class/Facades/System.Collections.Concurrent/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Collections.Concurrent/Makefile13
-rw-r--r--mcs/class/Facades/System.Collections.Concurrent/System.Collections.Concurrent.dll.sources4
-rw-r--r--mcs/class/Facades/System.Collections.Concurrent/TypeForwarders.cs20
-rw-r--r--mcs/class/Facades/System.Collections/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Collections/Makefile13
-rw-r--r--mcs/class/Facades/System.Collections/System.Collections.dll.sources4
-rw-r--r--mcs/class/Facades/System.Collections/TypeForwarders.cs24
-rw-r--r--mcs/class/Facades/System.ComponentModel.Annotations/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.ComponentModel.Annotations/Makefile13
-rw-r--r--mcs/class/Facades/System.ComponentModel.Annotations/System.ComponentModel.Annotations.dll.sources4
-rw-r--r--mcs/class/Facades/System.ComponentModel.Annotations/TypeForwarders.cs20
-rw-r--r--mcs/class/Facades/System.ComponentModel.EventBasedAsync/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.ComponentModel.EventBasedAsync/Makefile13
-rw-r--r--mcs/class/Facades/System.ComponentModel.EventBasedAsync/System.ComponentModel.EventBasedAsync.dll.sources4
-rw-r--r--mcs/class/Facades/System.ComponentModel.EventBasedAsync/TypeForwarders.cs14
-rw-r--r--mcs/class/Facades/System.ComponentModel/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.ComponentModel/Makefile13
-rw-r--r--mcs/class/Facades/System.ComponentModel/System.ComponentModel.dll.sources4
-rw-r--r--mcs/class/Facades/System.ComponentModel/TypeForwarders.cs14
-rw-r--r--mcs/class/Facades/System.Diagnostics.Contracts/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Diagnostics.Contracts/Makefile13
-rw-r--r--mcs/class/Facades/System.Diagnostics.Contracts/System.Diagnostics.Contracts.dll.sources4
-rw-r--r--mcs/class/Facades/System.Diagnostics.Contracts/TypeForwarders.cs22
-rw-r--r--mcs/class/Facades/System.Diagnostics.Debug/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Diagnostics.Debug/Makefile13
-rw-r--r--mcs/class/Facades/System.Diagnostics.Debug/System.Diagnostics.Debug.dll.sources4
-rw-r--r--mcs/class/Facades/System.Diagnostics.Debug/TypeForwarders.cs14
-rw-r--r--mcs/class/Facades/System.Diagnostics.Tools/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Diagnostics.Tools/Makefile13
-rw-r--r--mcs/class/Facades/System.Diagnostics.Tools/System.Diagnostics.Tools.dll.sources4
-rw-r--r--mcs/class/Facades/System.Diagnostics.Tools/TypeForwarders.cs14
-rw-r--r--mcs/class/Facades/System.Dynamic.Runtime/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Dynamic.Runtime/Makefile13
-rw-r--r--mcs/class/Facades/System.Dynamic.Runtime/System.Dynamic.Runtime.dll.sources4
-rw-r--r--mcs/class/Facades/System.Dynamic.Runtime/TypeForwarders.cs41
-rw-r--r--mcs/class/Facades/System.Globalization/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Globalization/Makefile13
-rw-r--r--mcs/class/Facades/System.Globalization/System.Globalization.dll.sources4
-rw-r--r--mcs/class/Facades/System.Globalization/TypeForwarders.cs16
-rw-r--r--mcs/class/Facades/System.IO/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.IO/Makefile13
-rw-r--r--mcs/class/Facades/System.IO/System.IO.dll.sources4
-rw-r--r--mcs/class/Facades/System.IO/TypeForwarders.cs24
-rw-r--r--mcs/class/Facades/System.Linq.Expressions/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Linq.Expressions/Makefile13
-rw-r--r--mcs/class/Facades/System.Linq.Expressions/System.Linq.Expressions.dll.sources4
-rw-r--r--mcs/class/Facades/System.Linq.Expressions/TypeForwarders.cs59
-rw-r--r--mcs/class/Facades/System.Linq.Parallel/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Linq.Parallel/Makefile13
-rw-r--r--mcs/class/Facades/System.Linq.Parallel/System.Linq.Parallel.dll.sources4
-rw-r--r--mcs/class/Facades/System.Linq.Parallel/TypeForwarders.cs18
-rw-r--r--mcs/class/Facades/System.Linq.Queryable/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Linq.Queryable/Makefile13
-rw-r--r--mcs/class/Facades/System.Linq.Queryable/System.Linq.Queryable.dll.sources4
-rw-r--r--mcs/class/Facades/System.Linq.Queryable/TypeForwarders.cs14
-rw-r--r--mcs/class/Facades/System.Linq/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Linq/Makefile13
-rw-r--r--mcs/class/Facades/System.Linq/System.Linq.dll.sources4
-rw-r--r--mcs/class/Facades/System.Linq/TypeForwarders.cs14
-rw-r--r--mcs/class/Facades/System.Net.NetworkInformation/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Net.NetworkInformation/Makefile13
-rw-r--r--mcs/class/Facades/System.Net.NetworkInformation/System.Net.NetworkInformation.dll.sources4
-rw-r--r--mcs/class/Facades/System.Net.NetworkInformation/TypeForwarders.cs14
-rw-r--r--mcs/class/Facades/System.Net.Primitives/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Net.Primitives/Makefile13
-rw-r--r--mcs/class/Facades/System.Net.Primitives/System.Net.Primitives.dll.sources4
-rw-r--r--mcs/class/Facades/System.Net.Primitives/TypeForwarders.cs22
-rw-r--r--mcs/class/Facades/System.Net.Requests/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Net.Requests/Makefile13
-rw-r--r--mcs/class/Facades/System.Net.Requests/System.Net.Requests.dll.sources4
-rw-r--r--mcs/class/Facades/System.Net.Requests/TypeForwarders.cs18
-rw-r--r--mcs/class/Facades/System.ObjectModel/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.ObjectModel/Makefile13
-rw-r--r--mcs/class/Facades/System.ObjectModel/System.ObjectModel.dll.sources4
-rw-r--r--mcs/class/Facades/System.ObjectModel/TypeForwarders.cs29
-rw-r--r--mcs/class/Facades/System.Reflection.Emit.ILGeneration/AssemblyInfo.cs41
-rw-r--r--mcs/class/Facades/System.Reflection.Emit.ILGeneration/Makefile22
-rw-r--r--mcs/class/Facades/System.Reflection.Emit.ILGeneration/System.Reflection.Emit.ILGeneration.dll.sources3
-rw-r--r--mcs/class/Facades/System.Reflection.Emit.ILGeneration/TypeForwarders.cs29
-rw-r--r--mcs/class/Facades/System.Reflection.Emit.Lightweight/AssemblyInfo.cs41
-rw-r--r--mcs/class/Facades/System.Reflection.Emit.Lightweight/Makefile22
-rw-r--r--mcs/class/Facades/System.Reflection.Emit.Lightweight/System.Reflection.Emit.Lightweight.dll.sources3
-rw-r--r--mcs/class/Facades/System.Reflection.Emit.Lightweight/TypeForwarders.cs24
-rw-r--r--mcs/class/Facades/System.Reflection.Emit/AssemblyInfo.cs41
-rw-r--r--mcs/class/Facades/System.Reflection.Emit/Makefile22
-rw-r--r--mcs/class/Facades/System.Reflection.Emit/System.Reflection.Emit.dll.sources3
-rw-r--r--mcs/class/Facades/System.Reflection.Emit/TypeForwarders.cs34
-rw-r--r--mcs/class/Facades/System.Reflection.Extensions/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Reflection.Extensions/Makefile13
-rw-r--r--mcs/class/Facades/System.Reflection.Extensions/System.Reflection.Extensions.dll.sources4
-rw-r--r--mcs/class/Facades/System.Reflection.Extensions/TypeForwarders.cs14
-rw-r--r--mcs/class/Facades/System.Reflection.Primitives/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Reflection.Primitives/Makefile13
-rw-r--r--mcs/class/Facades/System.Reflection.Primitives/System.Reflection.Primitives.dll.sources4
-rw-r--r--mcs/class/Facades/System.Reflection.Primitives/TypeForwarders.cs25
-rw-r--r--mcs/class/Facades/System.Reflection/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Reflection/Makefile13
-rw-r--r--mcs/class/Facades/System.Reflection/System.Reflection.dll.sources4
-rw-r--r--mcs/class/Facades/System.Reflection/TypeForwarders.cs38
-rw-r--r--mcs/class/Facades/System.Resources.ResourceManager/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Resources.ResourceManager/Makefile13
-rw-r--r--mcs/class/Facades/System.Resources.ResourceManager/System.Resources.ResourceManager.dll.sources4
-rw-r--r--mcs/class/Facades/System.Resources.ResourceManager/TypeForwarders.cs14
-rw-r--r--mcs/class/Facades/System.Runtime.Extensions/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Runtime.Extensions/Makefile13
-rw-r--r--mcs/class/Facades/System.Runtime.Extensions/System.Runtime.Extensions.dll.sources4
-rw-r--r--mcs/class/Facades/System.Runtime.Extensions/TypeForwarders.cs26
-rw-r--r--mcs/class/Facades/System.Runtime.InteropServices/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Runtime.InteropServices/Makefile13
-rw-r--r--mcs/class/Facades/System.Runtime.InteropServices/System.Runtime.InteropServices.dll.sources4
-rw-r--r--mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs29
-rw-r--r--mcs/class/Facades/System.Runtime.Numerics/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Runtime.Numerics/Makefile13
-rw-r--r--mcs/class/Facades/System.Runtime.Numerics/System.Runtime.Numerics.dll.sources4
-rw-r--r--mcs/class/Facades/System.Runtime.Numerics/TypeForwarders.cs14
-rw-r--r--mcs/class/Facades/System.Runtime.Serialization.Json/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Runtime.Serialization.Json/Makefile13
-rw-r--r--mcs/class/Facades/System.Runtime.Serialization.Json/System.Runtime.Serialization.Json.dll.sources4
-rw-r--r--mcs/class/Facades/System.Runtime.Serialization.Json/TypeForwarders.cs16
-rw-r--r--mcs/class/Facades/System.Runtime.Serialization.Primitives/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Runtime.Serialization.Primitives/Makefile13
-rw-r--r--mcs/class/Facades/System.Runtime.Serialization.Primitives/System.Runtime.Serialization.Primitives.dll.sources4
-rw-r--r--mcs/class/Facades/System.Runtime.Serialization.Primitives/TypeForwarders.cs14
-rw-r--r--mcs/class/Facades/System.Runtime.Serialization.Xml/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Runtime.Serialization.Xml/Makefile13
-rw-r--r--mcs/class/Facades/System.Runtime.Serialization.Xml/System.Runtime.Serialization.Xml.dll.sources4
-rw-r--r--mcs/class/Facades/System.Runtime.Serialization.Xml/TypeForwarders.cs24
-rw-r--r--mcs/class/Facades/System.Runtime/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Runtime/Makefile13
-rw-r--r--mcs/class/Facades/System.Runtime/System.Runtime.dll.sources4
-rw-r--r--mcs/class/Facades/System.Runtime/TypeForwarders.cs312
-rw-r--r--mcs/class/Facades/System.Security.Principal/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Security.Principal/Makefile13
-rw-r--r--mcs/class/Facades/System.Security.Principal/System.Security.Principal.dll.sources4
-rw-r--r--mcs/class/Facades/System.Security.Principal/TypeForwarders.cs14
-rw-r--r--mcs/class/Facades/System.ServiceModel.Http/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.ServiceModel.Http/Makefile13
-rw-r--r--mcs/class/Facades/System.ServiceModel.Http/System.ServiceModel.Http.dll.sources4
-rw-r--r--mcs/class/Facades/System.ServiceModel.Http/TypeForwarders.cs21
-rw-r--r--mcs/class/Facades/System.ServiceModel.Primitives/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.ServiceModel.Primitives/Makefile13
-rw-r--r--mcs/class/Facades/System.ServiceModel.Primitives/System.ServiceModel.Primitives.dll.sources4
-rw-r--r--mcs/class/Facades/System.ServiceModel.Primitives/TypeForwarders.cs172
-rw-r--r--mcs/class/Facades/System.Text.Encoding.Extensions/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Text.Encoding.Extensions/Makefile13
-rw-r--r--mcs/class/Facades/System.Text.Encoding.Extensions/System.Text.Encoding.Extensions.dll.sources4
-rw-r--r--mcs/class/Facades/System.Text.Encoding.Extensions/TypeForwarders.cs14
-rw-r--r--mcs/class/Facades/System.Text.Encoding/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Text.Encoding/Makefile13
-rw-r--r--mcs/class/Facades/System.Text.Encoding/System.Text.Encoding.dll.sources4
-rw-r--r--mcs/class/Facades/System.Text.Encoding/TypeForwarders.cs14
-rw-r--r--mcs/class/Facades/System.Text.RegularExpressions/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Text.RegularExpressions/Makefile13
-rw-r--r--mcs/class/Facades/System.Text.RegularExpressions/System.Text.RegularExpressions.dll.sources4
-rw-r--r--mcs/class/Facades/System.Text.RegularExpressions/TypeForwarders.cs16
-rw-r--r--mcs/class/Facades/System.Threading.Tasks.Parallel/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Threading.Tasks.Parallel/Makefile13
-rw-r--r--mcs/class/Facades/System.Threading.Tasks.Parallel/System.Threading.Tasks.Parallel.dll.sources4
-rw-r--r--mcs/class/Facades/System.Threading.Tasks.Parallel/TypeForwarders.cs14
-rw-r--r--mcs/class/Facades/System.Threading.Tasks/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Threading.Tasks/Makefile13
-rw-r--r--mcs/class/Facades/System.Threading.Tasks/System.Threading.Tasks.dll.sources4
-rw-r--r--mcs/class/Facades/System.Threading.Tasks/TypeForwarders.cs40
-rw-r--r--mcs/class/Facades/System.Threading/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Threading/Makefile13
-rw-r--r--mcs/class/Facades/System.Threading/System.Threading.dll.sources4
-rw-r--r--mcs/class/Facades/System.Threading/TypeForwarders.cs38
-rw-r--r--mcs/class/Facades/System.Xml.ReaderWriter/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Xml.ReaderWriter/Makefile13
-rw-r--r--mcs/class/Facades/System.Xml.ReaderWriter/System.Xml.ReaderWriter.dll.sources4
-rw-r--r--mcs/class/Facades/System.Xml.ReaderWriter/TypeForwarders.cs20
-rw-r--r--mcs/class/Facades/System.Xml.XDocument/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Xml.XDocument/Makefile13
-rw-r--r--mcs/class/Facades/System.Xml.XDocument/System.Xml.XDocument.dll.sources4
-rw-r--r--mcs/class/Facades/System.Xml.XDocument/TypeForwarders.cs20
-rw-r--r--mcs/class/Facades/System.Xml.XmlSerializer/AssemblyInfo.cs23
-rw-r--r--mcs/class/Facades/System.Xml.XmlSerializer/Makefile13
-rw-r--r--mcs/class/Facades/System.Xml.XmlSerializer/System.Xml.XmlSerializer.dll.sources4
-rw-r--r--mcs/class/Facades/System.Xml.XmlSerializer/TypeForwarders.cs34
-rw-r--r--mcs/class/I18N/CJK/ISO2022JP.cs4
-rw-r--r--mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs8
-rw-r--r--mcs/class/Makefile43
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/Hwnd.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuStrip.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs13
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs5
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs42
-rwxr-xr-xmcs/class/Managed.Windows.Forms/build-csproj2
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionFactorExpresion.cs5
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/DirectoryScanner.cs5
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Engine.cs5
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs19
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs52
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Toolset.cs15
-rw-r--r--mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/ProjectTest.cs11
-rw-r--r--mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/TargetTest.cs2
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework.dll.sources1
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventArgs.cs10
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildFinishedEventArgs.cs22
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStartedEventArgs.cs27
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStatusEventArgs.cs21
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/LazyFormattedBuildEventArgs.cs55
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GenerateResource.cs2
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetReferenceAssemblyPaths.cs13
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs2
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Makefile2
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities.Test.csproj3
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs24
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs18
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities_test.dll.sources1
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Test/Microsoft.Build.Utilities/ToolTaskTest.cs141
-rw-r--r--mcs/class/Microsoft.Build/Makefile4
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Logging/ConsoleLogger.cs304
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Logging/FileLogger.cs21
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build_test.dll.sources1
-rw-r--r--mcs/class/Microsoft.Build/Test/Microsoft.Build.Logging/ConsoleLoggerTest.cs72
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs10
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEventRequest.cs17
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEventRequest.cs4
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs38
-rw-r--r--mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs80
-rw-r--r--mcs/class/Mono.Debugger.Soft/Test/dtest.cs221
-rw-r--r--mcs/class/Mono.Management/Mono.Attach/VirtualMachine.cs15
-rw-r--r--mcs/class/Mono.Posix/Mono.Posix_test.dll.sources1
-rw-r--r--mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs64
-rw-r--r--mcs/class/Mono.Posix/Mono.Unix/UnixPath.cs80
-rw-r--r--mcs/class/Mono.Posix/Mono.Unix/UnixSymbolicLinkInfo.cs22
-rw-r--r--mcs/class/Mono.Posix/Test/Mono.Unix/ReadlinkTest.cs288
-rw-r--r--mcs/class/Mono.Security/Mono.Security.X509.Extensions/KeyAttributesExtension.cs26
-rw-r--r--mcs/class/System.ComponentModel.Composition.4.5/Makefile2
-rw-r--r--mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/GenerationServices.cs2
-rw-r--r--mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/MetadataViewGenerator.cs2
-rw-r--r--mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/MetadataViewProvider.cs4
-rw-r--r--mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/Primitives/ExportedDelegate.cs2
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/Makefile2
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/CompareAttribute.cs118
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/CreditCardAttribute.cs75
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/DataType.cs7
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/DataTypeAttribute.cs25
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/EmailAddressAttribute.cs313
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/FileExtensionsAttribute.cs92
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/MaxLengthAttribute.cs44
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/MinLengthAttribute.cs43
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/PhoneAttribute.cs69
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/RangeAttribute.cs1
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/RegularExpressionAttribute.cs3
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/StringLengthAttribute.cs1
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/TimestampAttribute.cs12
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/ValidationAttribute.cs7
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/ValidationResult.cs11
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations_test.dll.sources5
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/AssociatedMetadataTypeTypeDescriptionProviderTests.cs3
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/CompareAttributeTest.cs70
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/CreditCardAttributeTest.cs62
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/EmailAddressAttributeTest.cs87
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/FileExtensionsAttributeTest.cs61
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/PhoneAttributeTest.cs58
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/mobile_static_System.ComponentModel.DataAnnotations.dll.sources1
-rw-r--r--mcs/class/System.ComponentModel.DataAnnotations/net_4_5_System.ComponentModel.DataAnnotations.dll.sources5
-rw-r--r--mcs/class/System.Core/Makefile4
-rw-r--r--mcs/class/System.Core/System.Collections.Generic/HashSet.cs3
-rw-r--r--mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs10
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/BinaryExpression.cs46
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/ConditionalExpression.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/ConstantExpression.cs8
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/ElementInit.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/Expression.cs22
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/ExpressionVisitor.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/Extensions.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/LambdaExpression.cs7
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/MemberAssignment.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/MemberBinding.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/MemberExpression.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/MemberListBinding.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/MemberMemberBinding.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/MethodCallExpression.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/NewArrayExpression.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/NewExpression.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/ParameterExpression.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/TypeBinaryExpression.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/UnaryExpression.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/RangeList.cs6
-rw-r--r--mcs/class/System.Core/System.Threading/ReaderWriterLockSlim.cs41
-rw-r--r--mcs/class/System.Core/System/TimeZoneInfo.AdjustmentRule.cs52
-rw-r--r--mcs/class/System.Core/System/TimeZoneInfo.Android.cs353
-rw-r--r--mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs82
-rw-r--r--mcs/class/System.Core/System/TimeZoneInfo.cs92
-rw-r--r--mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Coalesce.cs2
-rw-r--r--mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Equal.cs18
-rw-r--r--mcs/class/System.Core/Test/System.Linq/ParallelEnumerableTests.cs15
-rw-r--r--mcs/class/System.Core/Test/System.Threading/ReaderWriterLockSlimTest.cs36
-rw-r--r--mcs/class/System.Core/Test/System/TimeZoneInfo.AdjustmentRuleTest.cs25
-rw-r--r--mcs/class/System.Core/Test/System/TimeZoneInfo.TransitionTimeTest.cs30
-rw-r--r--mcs/class/System.Core/Test/System/TimeZoneInfoTest.cs40
-rw-r--r--mcs/class/System.Core/mobile_static_System.Core.dll.sources7
-rw-r--r--mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciCalls.cs42
-rw-r--r--mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciStatementHandle.cs9
-rw-r--r--mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleCommand.cs6
-rw-r--r--mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleParameter.cs7
-rw-r--r--mcs/class/System.Data.Services.Client/mobile_static_System.Data.Services.Client.dll.sources1
-rw-r--r--mcs/class/System.Data.Services/Makefile4
-rw-r--r--mcs/class/System.Data/Makefile2
-rw-r--r--mcs/class/System.Data/System.Data.Common/DataContainer.cs2
-rw-r--r--mcs/class/System.Data/System.Data/DataRowCollection.cs2
-rw-r--r--mcs/class/System.Data/mobile_static_System.Data.dll.sources1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/Assembly/AssemblyInfo.cs10
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/AsqResponseControl.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/AuthType.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/BerConverter.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/CompareResponse.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/CrossDomainMoveControl.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DeleteResponse.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DereferenceAlias.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DereferenceConnectionCallback.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirSyncRequestControl.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirSyncResponseControl.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryAttributeModification.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryAttributeOperation.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryControl.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryIdentifier.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryNotificationControl.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryOperation.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryResponse.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectorySynchronizationOptions.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DomainScopeControl.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlDirectoryIdentifier.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlDocumentProcessing.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlErrorProcessing.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlErrorResponse.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlResponseOrder.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ErrorResponseCategory.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ExtendedDNControl.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ExtendedDNFlag.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ExtendedResponse.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/LazyCommitControl.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/LdapDirectoryIdentifier.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/LocatorFlags.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ModifyDNResponse.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ModifyResponse.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PageResultRequestControl.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PageResultResponseControl.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PartialResultProcessing.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PermissiveModifyControl.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ReferralCallback.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ReferralChasingOptions.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ResultCode.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchOption.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchResultEntry.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchResultReference.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchScope.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SecurityDescriptorFlagControl.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SecurityMasks.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SecurityProtocol.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ShowDeletedControl.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SortKey.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SortRequestControl.cs3
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SortResponseControl.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/TreeDeleteControl.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/VerifyNameControl.cs1
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/VlvResponseControl.cs5
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryOperationException.cs73
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryPartition.cs56
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryReplicationMetadata.cs58
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryRole.cs34
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryRoleCollection.cs50
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchedule.cs69
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchema.cs112
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaClass.cs179
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaClassCollection.cs108
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaProperty.cs220
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaPropertyCollection.cs108
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySecurity.cs147
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryServerDownException.cs80
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySite.cs166
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteCollection.cs103
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteLink.cs153
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteLinkBridge.cs97
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteLinkCollection.cs103
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteOptions.cs43
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySubnet.cs98
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySubnetCollection.cs108
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySyntax.cs53
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryTransportType.cs31
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ApplicationPartition.cs126
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ApplicationPartitionCollection.cs50
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/AttributeMetadata.cs73
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/AttributeMetadataCollection.cs50
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryContext.cs74
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryContextType.cs34
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryEntryConfiguration.cs90
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryServer.cs131
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryServerCollection.cs103
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/Domain.cs224
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainCollection.cs50
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainCollisionOptions.cs34
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainController.cs240
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainControllerCollection.cs50
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainMode.cs35
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/Forest.cs240
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestMode.cs34
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustCollisionException.cs64
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustCollisionType.cs31
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustDomainInfoCollection.cs51
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustDomainInformation.cs55
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustDomainStatus.cs35
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustRelationshipCollision.cs51
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustRelationshipCollisionCollection.cs50
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustRelationshipInformation.cs54
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/GlobalCatalog.cs95
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/GlobalCatalogCollection.cs51
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/HourOfDay.cs53
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/LocatorOptions.cs35
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/MinuteOfHour.cs33
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/NotificationStatus.cs32
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/PropertyTypes.cs33
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlyActiveDirectorySchemaClassCollection.cs50
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlyActiveDirectorySchemaPropertyCollection.cs50
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlyDirectoryServerCollection.cs50
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlySiteCollection.cs50
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlySiteLinkBridgeCollection.cs50
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlySiteLinkCollection.cs50
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlyStringCollection.cs48
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationConnection.cs181
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationConnectionCollection.cs51
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationCursor.cs60
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationCursorCollection.cs48
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationFailure.cs59
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationFailureCollection.cs53
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationNeighbor.cs122
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationNeighborCollection.cs50
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationOperation.cs65
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationOperationCollection.cs56
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationOperationInformation.cs46
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationOperationType.cs34
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationSecurityLevel.cs31
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationSpan.cs31
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SchemaClassType.cs33
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SecurityMasks.cs34
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersErrorCategory.cs32
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersErrorInformation.cs59
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersEvent.cs33
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersOperationException.cs68
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersOptions.cs37
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncUpdateCallback.cs28
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TopLevelName.cs43
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TopLevelNameCollection.cs50
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TopLevelNameCollisionOptions.cs34
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TopLevelNameStatus.cs34
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TrustDirection.cs33
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TrustRelationshipInformation.cs52
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TrustRelationshipInformationCollection.cs50
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TrustType.cs37
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.dll.sources108
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices/ActiveDirectoryAccessRule.cs75
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices/ActiveDirectoryAuditRule.cs75
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices/ActiveDirectoryRights.cs50
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices/ActiveDirectorySecurityInheritance.cs35
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices/DirectoryServicesCOMException.cs66
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices/DirectorySynchronization.cs78
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices/DirectorySynchronizationOptions.cs34
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices/DirectoryVirtualListView.cs126
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices/DirectoryVirtualListViewContext.cs36
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices/ExtendedDN.cs31
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices/ExtendedRightAccessRule.cs54
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices/ListChildrenAccessRule.cs42
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices/PasswordEncodingMethod.cs30
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices/PropertyAccess.cs30
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices/PropertyAccessRule.cs54
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices/PropertySetAccessRule.cs42
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Font.cs20
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs30
-rw-r--r--mcs/class/System.Interactive.Async/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.Interactive.Async/Makefile37
-rw-r--r--mcs/class/System.Interactive.Async/System.Interactive.Async.dll.sources17
-rw-r--r--mcs/class/System.Interactive.Async/more_build_args3
-rw-r--r--mcs/class/System.Interactive.Providers/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.Interactive.Providers/Makefile38
-rw-r--r--mcs/class/System.Interactive.Providers/System.Interactive.Providers.dll.sources3
-rw-r--r--mcs/class/System.Interactive.Providers/more_build_args3
-rw-r--r--mcs/class/System.Interactive/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.Interactive/Makefile37
-rw-r--r--mcs/class/System.Interactive/System.Interactive.dll.sources9
-rw-r--r--mcs/class/System.Interactive/more_build_args3
-rw-r--r--mcs/class/System.Json/Makefile3
-rw-r--r--mcs/class/System.Management/System.Management/ManagementQuery.cs22
-rw-r--r--mcs/class/System.Management/System.Management/ObjectQuery.cs10
-rw-r--r--mcs/class/System.Net.Http/Makefile2
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http.Headers/ContentDispositionHeaderValue.cs2
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http.Headers/HeaderInfo.cs14
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaderValueCollection.cs5
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaders.cs4
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http.Headers/Lexer.cs17
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http.Headers/MediaTypeHeaderValue.cs4
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http.Headers/NameValueHeaderValue.cs16
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http.Headers/NameValueWithParametersHeaderValue.cs2
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http.Headers/ProductHeaderValue.cs6
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http.Headers/ProductInfoHeaderValue.cs59
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http.Headers/TransferCodingHeaderValue.cs2
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs27
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http/HttpContent.cs2
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http/StreamContent.cs16
-rw-r--r--mcs/class/System.Net.Http/Test/System.Net.Http/HttpRequestMessageTest.cs40
-rw-r--r--mcs/class/System.Net.Http/monotouch_System.Net.Http.dll.sources53
-rw-r--r--mcs/class/System.Net/Assembly/AssemblyInfo.cs4
-rw-r--r--mcs/class/System.Net/Assembly/TypeForwarders.cs3
-rw-r--r--mcs/class/System.Runtime.Serialization/mobile_static_System.Runtime.Serialization.dll.sources1
-rw-r--r--mcs/class/System.ServiceModel.Activation/Assembly/AssemblyInfo.cs60
-rw-r--r--mcs/class/System.ServiceModel.Activation/Makefile11
-rw-r--r--mcs/class/System.ServiceModel.Activation/System.ServiceModel.Activation.dll.sources6
-rw-r--r--mcs/class/System.ServiceModel.Web/Makefile4
-rw-r--r--mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonSerializationReader.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/TypeMap.cs9
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/Atom10FeedFormatter.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/DataContractJsonSerializerTest.cs47
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Activation/WebScriptServiceHostFactoryTest.cs4
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Channels/WebMessageEncodingBindingElementTest.cs2
-rwxr-xr-xmcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Configuration/WebHttpBindingElementTest.cs3
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Description/WebHttpBehaviorTest.cs15
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Description/WebHttpEndpointTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Description/WebScriptEnablingBehaviorTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Dispatcher/WebHttpDispatchOperationSelectorTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Atom10FeedFormatterTest.cs5
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Atom10ItemFormatterTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/AtomPub10CategoriesDocumentFormatterTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/AtomPub10ServiceDocumentFormatterTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Rss20FeedFormatterTest.cs3
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Rss20ItemFormatterTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/ServiceDocumentTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationElementExtensionTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationFeedTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationItemTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationLinkTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/TextSyndicationContentTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/UrlSyndicationContentTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/XmlSyndicationContentTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebOperationContextTest.cs10
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebServiceHostTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System.ServiceModel/WebHttpBindingTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/Test/System/UriTemplateTest.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/mobile_static_System.ServiceModel.Web.dll.sources1
-rw-r--r--mcs/class/System.ServiceModel/Assembly/AssemblyInfo.cs9
-rwxr-xr-xmcs/class/System.ServiceModel/Makefile33
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeAnd.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArgument.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArgumentReference.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArithmeticOperation.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArrayItem.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArrayLength.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeAssignment.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBinaryComparison.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBinaryOperation.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBlock.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBuilder.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeCast.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeClass.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeCustomAttribute.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeDecrement.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeEquals.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeExpression.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeFieldReference.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeFor.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeForeach.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeGenerationHelper.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeIf.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeIncrement.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeIs.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeItem.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeLiteral.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeMethod.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeMethodCall.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeModule.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeNew.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeNewArray.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeNotEquals.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeOr.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeProperty.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodePropertyReference.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeReturn.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeSelect.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeSelfIncrement.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeTryBlock.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeUnaryOperation.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeValueReference.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeVariableDeclaration.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeVariableReference.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeWhen.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeWhile.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeWriter.cs2
-rw-r--r--mcs/class/System.ServiceModel/Mono.CodeGeneration/Exp.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Activation/ServiceHostFactory.cs9
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs11
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/CompressionFormat.cs34
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/Message.cs19
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs3
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/WebSocketTransportSettings.cs4
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs7
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/OperationDescription.cs13
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs10
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs19
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs12
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.dll.sources1
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs3
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory_1.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ClientProxyGenerator.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/FaultException_1.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/InstanceContext.cs9
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs16
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/NetTcpSecurity.cs6
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostingEnvironment.cs7
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/SpnEndpointIdentity.cs8
-rw-r--r--mcs/class/System.ServiceModel/mobile_System.ServiceModel.dll.sources1
-rw-r--r--mcs/class/System.ServiceModel/mobile_static_System.ServiceModel.dll.sources1
-rw-r--r--mcs/class/System.ServiceModel/net_4_5_System.ServiceModel.dll.sources1
-rw-r--r--mcs/class/System.Transactions/Makefile2
-rw-r--r--mcs/class/System.Web.Routing/System.Web.Routing/Route.cs13
-rw-r--r--mcs/class/System.Web.Routing/Test/System.Web.Routing/RouteTest.cs24
-rw-r--r--mcs/class/System.Web.Services/Makefile2
-rw-r--r--mcs/class/System.Web.Services/System.Web.Services.Description/MessageCollection.cs7
-rw-r--r--mcs/class/System.Web.Services/mobile_static_System.Web.Services.dll.sources1
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/HttpCapabilitiesBase.cs12
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/HttpRuntimeSection.cs20
-rw-r--r--mcs/class/System.Web/System.Web.Util/HttpEncoder.cs47
-rw-r--r--mcs/class/System.Web/System.Web/HttpResponse.cs9
-rw-r--r--mcs/class/System.Web/System.Web/HttpRuntime.cs15
-rw-r--r--mcs/class/System.Web/Test/System.Web/AppBrowsersTest.cs4
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/Makefile2
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Annotation.cs125
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationCollection.cs (renamed from mcs/class/System.ServiceModel/System.ServiceModel.Activation/IServiceHostFactory.cs)22
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationGroup.cs61
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationPathPoint.cs2
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationPositionChangingEventArgs.cs91
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationSmartLabelStyle.cs30
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ArrowAnnotation.cs6
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Axis.cs17
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AxisScaleView.cs59
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AxisScrollBar.cs55
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Border3DAnnotation.cs32
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/BorderSkin.cs45
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CalloutAnnotation.cs45
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Chart.cs213
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartArea.cs63
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartElement.cs1
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartGraphics.cs49
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartNamedElementCollection.cs69
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartSerializer.cs100
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Cursor.cs83
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CursorEventArgs.cs54
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CustomLabel.cs71
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CustomLabelCollection.cs66
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CustomProperties.cs30
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CustomizeLegendEventArgs.cs32
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataFormula.cs75
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataManipulator.cs329
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataPoint.cs27
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataPointCollection.cs150
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataPointCustomProperties.cs97
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/EllipseAnnotation.cs30
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/FTestResult.cs37
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/HitTestResult.cs40
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/HorizontalLineAnnotation.cs30
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ImageAnnotation.cs47
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LabelStyle.cs44
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Legend.cs92
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCell.cs61
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCellCollection.cs43
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCellColumn.cs50
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCellColumnCollection.cs39
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCollection.cs30
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendItem.cs72
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendItemsCollection.cs57
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LineAnnotation.cs46
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/PolygonAnnotation.cs30
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/PolylineAnnotation.cs51
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/PrintingManager.cs65
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/RectangleAnnotation.cs33
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ScrollBarEventArgs.cs38
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Series.cs55
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/SmartLabelStyle.cs45
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/StatisticFormula.cs147
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/StripLine.cs57
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/StripLinesCollection.cs (renamed from mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnchorStyle.cs)13
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/TTestResult.cs40
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/TextAnnotation.cs43
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Title.cs88
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/TitleCollection.cs30
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ToolTipEventArgs.cs16
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/VerticalLineAnnotation.cs30
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ViewEventArgs.cs37
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ZTestResult.cs39
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.csproj64
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.dll.sources55
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/Test/ChartingTests.csproj5
-rwxr-xr-x[-rw-r--r--]mcs/class/System.XML/Mono.Xml.Schema/XmlSchemaValidatingReader.cs2
-rw-r--r--mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs2
-rw-r--r--mcs/class/System.XML/Mono.Xml.Xsl/XslStylesheet.cs7
-rw-r--r--mcs/class/System.XML/System.Xml.Schema/BuiltInDatatype.cs3
-rw-r--r--mcs/class/System.XML/System.Xml.Schema/XmlAtomicValue.cs112
-rw-r--r--mcs/class/System.XML/System.Xml.Schema/XmlSchemaSet.cs12
-rw-r--r--mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs7
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/MapCodeGenerator.cs1
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/XmlSchemaImporter.cs22
-rw-r--r--mcs/class/System.XML/System.Xml/XQueryConvert.cs11
-rw-r--r--mcs/class/System.XML/System.Xml/XmlConvert.cs31
-rw-r--r--mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaDatatypeTests.cs139
-rw-r--r--mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs35
-rwxr-xr-x[-rw-r--r--]mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaValidatorTests.cs54
-rw-r--r--mcs/class/System.XML/Test/System.Xml.Xsl/XslTransformTests.cs34
-rw-r--r--mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/Makefile23
-rw-r--r--mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslttest.cs21
-rw-r--r--mcs/class/System.XML/mobile_static_System.Xml.dll.sources1
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XContainer.cs12
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs18
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XName.cs2
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XNode.cs7
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XObject.cs16
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XUtil.cs2
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Schema/Extensions.cs4
-rw-r--r--mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs22
-rw-r--r--mcs/class/System.Xml.Serialization/AssemblyInfo.cs2
-rw-r--r--mcs/class/System/Makefile2
-rw-r--r--mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs17
-rw-r--r--mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs53
-rw-r--r--mcs/class/System/System.CodeDom.Compiler/TempFileCollection.cs45
-rw-r--r--mcs/class/System/System.CodeDom/CodeNamespace.cs3
-rw-r--r--mcs/class/System/System.Collections.Concurrent/BlockingCollection.cs75
-rw-r--r--mcs/class/System/System.Collections.Concurrent/ConcurrentBag.cs10
-rw-r--r--mcs/class/System/System.Collections.Generic/SortedList.cs2
-rw-r--r--mcs/class/System/System.Collections.ObjectModel/ObservableCollection.cs25
-rw-r--r--mcs/class/System/System.Configuration/SettingValueElement.cs75
-rw-r--r--mcs/class/System/System.Diagnostics/TraceImpl.cs31
-rw-r--r--mcs/class/System/System.Diagnostics/TraceListener.cs9
-rw-r--r--mcs/class/System/System.IO.Compression/CompressionLevel.cs2
-rw-r--r--mcs/class/System/System.IO.Compression/DeflateStream.cs336
-rw-r--r--mcs/class/System/System.Net.NetworkInformation/NetworkChange.cs319
-rw-r--r--mcs/class/System/System.Net.Sockets/Socket_2_1.cs31
-rw-r--r--mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs330
-rw-r--r--mcs/class/System/System.Net.WebSockets/ClientWebSocketOptions.cs45
-rw-r--r--mcs/class/System/System.Net.WebSockets/WebSocketException.cs38
-rw-r--r--mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs6
-rw-r--r--mcs/class/System/System.Net.WebSockets/WebSocketReceiveResult.cs10
-rw-r--r--mcs/class/System/System.Net/FtpWebRequest.cs7
-rw-r--r--mcs/class/System/System.Net/HttpStatusCode.cs3
-rw-r--r--mcs/class/System/System.Net/HttpWebRequest.cs11
-rw-r--r--mcs/class/System/System.Net/HttpWebResponse.cs3
-rw-r--r--mcs/class/System/System.Net/ListenerAsyncResult.cs2
-rw-r--r--mcs/class/System/System.Net/MacProxy.cs7
-rw-r--r--mcs/class/System/System.Net/WebConnection.cs13
-rw-r--r--mcs/class/System/System.Net/WebRequest.cs26
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/Regex.cs2
-rw-r--r--mcs/class/System/System/AndroidPlatform.cs13
-rw-r--r--mcs/class/System/System/UriComponents.cs3
-rw-r--r--mcs/class/System/System_test.dll.sources1
-rw-r--r--mcs/class/System/Test/Microsoft.CSharp/CSharpCodeProviderTest.cs43
-rw-r--r--mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromCompileUnitTest.cs47
-rw-r--r--mcs/class/System/Test/System.Collections.Concurrent/BlockingCollectionTests.cs55
-rw-r--r--mcs/class/System/Test/System.IO.Compression/GzipStreamTest.cs19
-rw-r--r--mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs23
-rw-r--r--mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs242
-rw-r--r--mcs/class/System/Test/System.Net/DnsTest.cs2
-rw-r--r--mcs/class/System/Test/System.Net/FtpWebRequestTest.cs30
-rw-r--r--mcs/class/System/mobile_System.dll.sources2
-rw-r--r--mcs/class/System/mobile_static_System.dll.sources76
-rw-r--r--mcs/class/WindowsBase/System.Collections.ObjectModel/ObservableCollection.cs24
-rw-r--r--mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs4
-rw-r--r--mcs/class/build-rx-dll-sources.sh37
-rw-r--r--mcs/class/corlib/Makefile17
-rw-r--r--mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs5
-rw-r--r--mcs/class/corlib/System.Collections.Generic/List.cs85
-rw-r--r--mcs/class/corlib/System.Collections.ObjectModel/Collection.cs13
-rw-r--r--mcs/class/corlib/System.Collections/CollectionBase.cs2
-rw-r--r--mcs/class/corlib/System.Collections/StructuralComparisons.cs4
-rw-r--r--mcs/class/corlib/System.Globalization/CultureInfo.cs2
-rw-r--r--mcs/class/corlib/System.IO/FileStream.cs7
-rw-r--r--mcs/class/corlib/System.IO/Path.cs3
-rw-r--r--mcs/class/corlib/System.IO/Stream.cs2
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs2
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/ConstructorOnTypeBuilderInst.cs4
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/DynamicILInfo.cs2
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs4
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs21
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs7
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs2
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs2
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs6
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs19
-rw-r--r--mcs/class/corlib/System.Reflection/AssemblyName.cs8
-rw-r--r--mcs/class/corlib/System.Reflection/Binder.cs62
-rw-r--r--mcs/class/corlib/System.Reflection/IntrospectionExtensions.cs9
-rw-r--r--mcs/class/corlib/System.Reflection/MonoGenericClass.cs7
-rw-r--r--mcs/class/corlib/System.Reflection/MonoMethod.cs28
-rw-r--r--mcs/class/corlib/System.Reflection/MonoParameterInfo.cs240
-rw-r--r--mcs/class/corlib/System.Reflection/MonoProperty.cs54
-rw-r--r--mcs/class/corlib/System.Reflection/ParameterInfo.cs243
-rw-r--r--mcs/class/corlib/System.Reflection/RuntimeReflectionExtensions.cs63
-rw-r--r--mcs/class/corlib/System.Reflection/TypeAttributes.cs4
-rw-r--r--mcs/class/corlib/System.Reflection/TypeDelegator.cs14
-rw-r--r--mcs/class/corlib/System.Reflection/TypeInfo.cs29
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs102
-rw-r--r--mcs/class/corlib/System.Runtime/GCLatencyMode.cs5
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs19
-rw-r--r--mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs2
-rw-r--r--mcs/class/corlib/System.Text/Decoder.cs5
-rw-r--r--mcs/class/corlib/System.Text/UTF8Encoding.cs18
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/CyclicDeque.cs58
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/Parallel.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/Task.cs34
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs12
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskContinuation.cs15
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskFactory.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs2
-rw-r--r--mcs/class/corlib/System.Threading/CancellationToken.cs2
-rw-r--r--mcs/class/corlib/System.Threading/ManualResetEventSlim.cs12
-rw-r--r--mcs/class/corlib/System.Threading/SynchronizationContext.cs2
-rw-r--r--mcs/class/corlib/System.Threading/Thread.cs9
-rw-r--r--mcs/class/corlib/System.Threading/ThreadPool.cs15
-rw-r--r--mcs/class/corlib/System.Threading/Timer.cs7
-rw-r--r--mcs/class/corlib/System/AggregateException.cs2
-rw-r--r--mcs/class/corlib/System/Array.cs74
-rw-r--r--mcs/class/corlib/System/Console.cs22
-rw-r--r--mcs/class/corlib/System/Console.iOS.cs22
-rw-r--r--mcs/class/corlib/System/Convert.cs86
-rw-r--r--mcs/class/corlib/System/Enum.cs5
-rw-r--r--mcs/class/corlib/System/Guid.cs82
-rw-r--r--mcs/class/corlib/System/MonoCustomAttrs.cs109
-rw-r--r--mcs/class/corlib/System/MonoType.cs8
-rw-r--r--mcs/class/corlib/System/MulticastDelegate.cs9
-rw-r--r--mcs/class/corlib/System/Random.cs145
-rw-r--r--mcs/class/corlib/System/String.cs4
-rw-r--r--mcs/class/corlib/System/Type.cs6
-rw-r--r--mcs/class/corlib/System/Variant.cs2
-rw-r--r--mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs103
-rw-r--r--mcs/class/corlib/Test/System.Collections/StructuralComparisonsTest.cs55
-rw-r--r--mcs/class/corlib/Test/System.Diagnostics/StackFrameTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs8
-rw-r--r--mcs/class/corlib/Test/System.IO/FileStreamTest.cs30
-rw-r--r--mcs/class/corlib/Test/System.Reflection.Emit/AssemblyBuilderTest.cs28
-rw-r--r--mcs/class/corlib/Test/System.Reflection.Emit/DynamicILInfoTest.cs8
-rw-r--r--mcs/class/corlib/Test/System.Reflection/AssemblyNameTest.cs21
-rw-r--r--mcs/class/corlib/Test/System.Reflection/BinderTests.cs18
-rw-r--r--mcs/class/corlib/Test/System.Reflection/IntrospectionExtensionsTest.cs57
-rw-r--r--mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs170
-rw-r--r--mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs27
-rw-r--r--mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs12
-rw-r--r--mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs20
-rw-r--r--mcs/class/corlib/Test/System.Security.Principal/WindowsIdentityTest.cs3
-rw-r--r--mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs36
-rw-r--r--mcs/class/corlib/Test/System.Threading.Tasks/TaskFactoryTest.cs10
-rw-r--r--mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs38
-rw-r--r--mcs/class/corlib/Test/System.Threading/ThreadPoolTest.cs33
-rw-r--r--mcs/class/corlib/Test/System.Threading/ThreadTest.cs54
-rw-r--r--mcs/class/corlib/Test/System.Threading/TimerTest.cs13
-rw-r--r--mcs/class/corlib/Test/System/AggregateExceptionTests.cs11
-rw-r--r--mcs/class/corlib/Test/System/ArrayTest.cs120
-rw-r--r--mcs/class/corlib/Test/System/ConsoleTest.cs15
-rw-r--r--mcs/class/corlib/Test/System/DelegateTest.cs6
-rw-r--r--mcs/class/corlib/Test/System/EnumTest.cs7
-rw-r--r--mcs/class/corlib/Test/System/GuidTest.cs8
-rw-r--r--mcs/class/corlib/Test/System/IntegerFormatterTest.cs10
-rw-r--r--mcs/class/corlib/Test/System/RandomTest.cs170
-rw-r--r--mcs/class/corlib/Test/System/TypeTest.cs41
-rw-r--r--mcs/class/corlib/corlib.dll.sources1
-rw-r--r--mcs/class/corlib/corlib_test.dll.sources2
-rw-r--r--mcs/class/corlib/mobile_static_corlib.dll.sources1
-rw-r--r--mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs21
-rw-r--r--mcs/errors/cs0037-8.cs11
-rw-r--r--mcs/errors/cs0075.cs2
-rw-r--r--mcs/errors/cs0102-21.cs16
-rwxr-xr-x[-rw-r--r--]mcs/errors/cs0118-11.cs19
-rw-r--r--mcs/errors/cs0118-12.cs12
-rw-r--r--mcs/errors/cs0119-2.cs17
-rw-r--r--[-rwxr-xr-x]mcs/errors/cs0119-8.cs8
-rw-r--r--mcs/errors/cs0150-2.cs18
-rw-r--r--mcs/errors/cs0162-18.cs21
-rw-r--r--mcs/errors/cs0162-19.cs14
-rw-r--r--mcs/errors/cs0165-21.cs19
-rw-r--r--mcs/errors/cs0177-13.cs14
-rw-r--r--mcs/errors/cs0193.cs4
-rw-r--r--mcs/errors/cs0208-17.cs12
-rw-r--r--mcs/errors/cs0429-3.cs11
-rw-r--r--mcs/errors/cs0452-11.cs10
-rw-r--r--mcs/errors/cs0458-17.cs12
-rw-r--r--mcs/errors/cs0472-5.cs14
-rw-r--r--mcs/errors/cs0534-11.cs17
-rw-r--r--mcs/errors/cs0540-3.cs27
-rw-r--r--mcs/errors/cs0576-3.cs15
-rw-r--r--mcs/errors/cs0658-4.cs18
-rw-r--r--mcs/errors/cs0717-2.cs7
-rw-r--r--mcs/errors/cs1503-14.cs25
-rw-r--r--mcs/errors/cs1503-15.cs (renamed from mcs/errors/cs0411-15.cs)4
-rw-r--r--mcs/errors/cs1503-16.cs (renamed from mcs/errors/cs0411-7.cs)2
-rw-r--r--mcs/errors/cs1648-2.cs23
-rw-r--r--mcs/errors/cs1648-3.cs26
-rw-r--r--mcs/errors/cs1650-2.cs18
-rw-r--r--mcs/errors/cs1678-2.cs16
-rw-r--r--mcs/errors/cs1678.cs6
-rw-r--r--mcs/errors/cs1739-4.cs14
-rw-r--r--mcs/errors/cs1750-4.cs23
-rw-r--r--mcs/errors/known-issues-net_4_51
-rw-r--r--mcs/jay/jay.vcxproj4
-rw-r--r--mcs/mcs/anonymous.cs92
-rw-r--r--mcs/mcs/assembly.cs6
-rw-r--r--mcs/mcs/assign.cs4
-rw-r--r--mcs/mcs/async.cs67
-rw-r--r--mcs/mcs/attribute.cs6
-rw-r--r--mcs/mcs/cfold.cs2
-rw-r--r--mcs/mcs/class.cs136
-rw-r--r--mcs/mcs/codegen.cs33
-rw-r--r--mcs/mcs/complete.cs50
-rw-r--r--mcs/mcs/constant.cs94
-rw-r--r--mcs/mcs/context.cs15
-rw-r--r--mcs/mcs/convert.cs4
-rw-r--r--mcs/mcs/cs-parser.jay70
-rw-r--r--mcs/mcs/cs-tokenizer.cs13
-rw-r--r--mcs/mcs/decl.cs27
-rw-r--r--mcs/mcs/delegate.cs14
-rw-r--r--mcs/mcs/doc.cs25
-rw-r--r--mcs/mcs/driver.cs4
-rw-r--r--mcs/mcs/dynamic.cs10
-rw-r--r--mcs/mcs/ecore.cs298
-rw-r--r--mcs/mcs/enum.cs2
-rw-r--r--mcs/mcs/eval.cs6
-rw-r--r--mcs/mcs/expression.cs379
-rw-r--r--mcs/mcs/field.cs8
-rw-r--r--mcs/mcs/flowanalysis.cs39
-rw-r--r--mcs/mcs/generic.cs312
-rw-r--r--mcs/mcs/ikvm.cs16
-rw-r--r--mcs/mcs/import.cs44
-rw-r--r--mcs/mcs/lambda.cs4
-rw-r--r--mcs/mcs/membercache.cs8
-rw-r--r--mcs/mcs/method.cs28
-rw-r--r--mcs/mcs/modifiers.cs1
-rw-r--r--mcs/mcs/module.cs5
-rw-r--r--mcs/mcs/namespace.cs73
-rw-r--r--mcs/mcs/nullable.cs8
-rw-r--r--mcs/mcs/parameter.cs25
-rw-r--r--mcs/mcs/pending.cs2
-rw-r--r--mcs/mcs/property.cs53
-rw-r--r--mcs/mcs/report.cs6
-rw-r--r--mcs/mcs/settings.cs14
-rw-r--r--mcs/mcs/statement.cs146
-rw-r--r--mcs/mcs/typemanager.cs16
-rw-r--r--mcs/mcs/typespec.cs66
-rw-r--r--mcs/tests/dtest-error-02.cs24
-rw-r--r--mcs/tests/gtest-540.cs9
-rw-r--r--mcs/tests/gtest-544.cs15
-rw-r--r--mcs/tests/gtest-579.cs11
-rw-r--r--mcs/tests/gtest-589.cs40
-rw-r--r--mcs/tests/gtest-590.cs21
-rw-r--r--mcs/tests/gtest-591-lib.cs14
-rw-r--r--mcs/tests/gtest-591.cs13
-rw-r--r--mcs/tests/gtest-592.cs25
-rw-r--r--mcs/tests/gtest-593.cs25
-rw-r--r--mcs/tests/gtest-594.cs29
-rw-r--r--mcs/tests/gtest-595.cs37
-rw-r--r--mcs/tests/gtest-596.cs27
-rw-r--r--mcs/tests/gtest-597.cs44
-rw-r--r--mcs/tests/gtest-598.cs63
-rw-r--r--mcs/tests/gtest-599.cs32
-rw-r--r--mcs/tests/gtest-autoproperty-08.cs22
-rw-r--r--mcs/tests/gtest-etree-01.cs1
-rw-r--r--mcs/tests/gtest-exmethod-47.cs22
-rw-r--r--mcs/tests/gtest-iter-30.cs33
-rw-r--r--mcs/tests/gtest-iter-31.cs31
-rw-r--r--mcs/tests/gtest-iter-32.cs (renamed from mcs/tests/gtest-381.cs)0
-rw-r--r--mcs/tests/gtest-iter-33.cs (renamed from mcs/tests/gtest-217.cs)0
-rw-r--r--mcs/tests/gtest-optional-28.cs31
-rw-r--r--mcs/tests/gtest-partial-07.cs30
-rw-r--r--mcs/tests/gtest-partial-08.cs58
-rw-r--r--mcs/tests/gtest-partial-09.cs57
-rw-r--r--mcs/tests/gtest-variance-11.cs33
-rw-r--r--mcs/tests/test-504.cs27
-rw-r--r--mcs/tests/test-591.cs8
-rw-r--r--mcs/tests/test-869.cs49
-rw-r--r--mcs/tests/test-870.cs17
-rw-r--r--mcs/tests/test-871.cs42
-rw-r--r--mcs/tests/test-873.cs28
-rw-r--r--mcs/tests/test-anon-94.cs20
-rw-r--r--mcs/tests/test-async-13.cs9
-rw-r--r--mcs/tests/test-async-22.cs12
-rw-r--r--mcs/tests/test-async-49.cs45
-rw-r--r--mcs/tests/test-async-50.cs31
-rw-r--r--mcs/tests/test-async-51.cs33
-rw-r--r--mcs/tests/test-async-52.cs23
-rw-r--r--mcs/tests/test-async-53.cs27
-rw-r--r--mcs/tests/test-debug-10-ref.xml1
-rw-r--r--mcs/tests/test-debug-11-ref.xml52
-rw-r--r--mcs/tests/test-debug-14-ref.xml7
-rw-r--r--mcs/tests/test-debug-15-ref.xml2
-rw-r--r--mcs/tests/test-debug-16-ref.xml6
-rw-r--r--mcs/tests/test-debug-17-ref.xml7
-rw-r--r--mcs/tests/test-debug-18-ref.xml4
-rw-r--r--mcs/tests/test-debug-19-ref.xml5
-rw-r--r--mcs/tests/test-debug-21-ref.xml2
-rw-r--r--mcs/tests/test-debug-22-ref.xml3
-rw-r--r--mcs/tests/test-debug-23-ref.xml3
-rw-r--r--mcs/tests/test-debug-24-ref.xml4
-rw-r--r--mcs/tests/test-debug-27-ref.xml125
-rw-r--r--mcs/tests/test-debug-27.cs68
-rw-r--r--mcs/tests/test-debug-28-ref.xml46
-rw-r--r--mcs/tests/test-debug-28.cs15
-rw-r--r--mcs/tests/test-named-08.cs28
-rw-r--r--mcs/tests/test-partial-32.cs36
-rw-r--r--mcs/tests/test-xml-068-ref.xml14
-rw-r--r--mcs/tests/test-xml-068.cs16
-rw-r--r--mcs/tests/ver-il-net_4_5.xml5076
-rw-r--r--mcs/tools/cil-strip/Mono.Cecil.Cil/CodeReader.cs6
-rw-r--r--mcs/tools/cil-strip/cil-strip.csproj991
-rw-r--r--mcs/tools/corcompare/corcompare.sln93
-rw-r--r--mcs/tools/corcompare/mono-api-html/ApiDiff.cs101
-rw-r--r--mcs/tools/corcompare/mono-api-html/AssemblyComparer.cs78
-rw-r--r--mcs/tools/corcompare/mono-api-html/ClassComparer.cs245
-rw-r--r--mcs/tools/corcompare/mono-api-html/Comparer.cs96
-rw-r--r--mcs/tools/corcompare/mono-api-html/ConstructorComparer.cs114
-rw-r--r--mcs/tools/corcompare/mono-api-html/EventComparer.cs53
-rw-r--r--mcs/tools/corcompare/mono-api-html/FieldComparer.cs100
-rw-r--r--mcs/tools/corcompare/mono-api-html/Helpers.cs130
-rw-r--r--mcs/tools/corcompare/mono-api-html/InterfaceComparer.cs47
-rw-r--r--mcs/tools/corcompare/mono-api-html/MemberComparer.cs178
-rw-r--r--mcs/tools/corcompare/mono-api-html/MethodComparer.cs49
-rw-r--r--mcs/tools/corcompare/mono-api-html/NamespaceComparer.cs90
-rw-r--r--mcs/tools/corcompare/mono-api-html/PropertyComparer.cs97
-rw-r--r--mcs/tools/corcompare/mono-api-html/mono-api-html.csproj54
-rw-r--r--mcs/tools/corcompare/mono-api-info.csproj17
-rw-r--r--mcs/tools/linker/Mono.Linker.Steps/BlacklistStep.cs3
-rw-r--r--mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs4
-rw-r--r--mcs/tools/linker/Mono.Linker.Steps/OutputStep.cs1
-rw-r--r--mcs/tools/linker/Mono.Linker.Steps/SweepStep.cs44
-rw-r--r--mcs/tools/linker/Mono.Linker/AssemblyAction.cs9
-rw-r--r--mcs/tools/mdbrebase/mdbrebase.cs29
-rw-r--r--mcs/tools/mdoc/Mono.Documentation/monodocer.cs2
-rw-r--r--mcs/tools/mdoc/Resources/monodoc-ecma.xsd2
-rw-r--r--mcs/tools/mdoc/Test/DocTest-v1.cs4
-rw-r--r--mcs/tools/mdoc/Test/en.expected.delete/Mono.DocTest/Widget.xml12
-rw-r--r--mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Widget.xml17
-rw-r--r--mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/Widget.xml16
-rw-r--r--mcs/tools/mdoc/Test/en.expected/Mono.DocTest/Widget.xml15
-rw-r--r--mcs/tools/mdoc/Test/html.expected/Mono.DocTest/Widget.html31
-rw-r--r--mcs/tools/mdoc/Test/msxdoc-expected.importslashdoc.xml6
-rwxr-xr-x[-rw-r--r--]mcs/tools/mkbundle/mkbundle.cs79
-rw-r--r--mcs/tools/mkbundle/template_z.c3
-rw-r--r--mcs/tools/security/sn.cs2
-rw-r--r--mcs/tools/tuner/Mono.Tuner/AdjustVisibility.cs3
-rw-r--r--mcs/tools/tuner/Mono.Tuner/PreserveSoapHttpClients.cs4
-rw-r--r--mcs/tools/xbuild/Makefile10
-rw-r--r--mcs/tools/xbuild/xbuild/2.0/Microsoft.Common.targets6
-rw-r--r--mcs/tools/xbuild/xbuild/3.5/Microsoft.Common.targets6
-rw-r--r--mcs/tools/xbuild/xbuild/4.0/Microsoft.Common.targets10
-rw-r--r--mono-core.spec.in71
-rw-r--r--mono/Makefile.am27
-rw-r--r--mono/cil/opcode.def1
-rwxr-xr-x[-rw-r--r--]mono/dis/declsec.c7
-rwxr-xr-x[-rw-r--r--]mono/dis/dis-cil.c34
-rwxr-xr-x[-rw-r--r--]mono/dis/dump.c14
-rwxr-xr-x[-rw-r--r--]mono/dis/get.c2
-rw-r--r--mono/dis/main.c5
-rwxr-xr-x[-rw-r--r--]mono/dis/util.c38
-rwxr-xr-x[-rw-r--r--]mono/dis/util.h2
-rwxr-xr-x[-rw-r--r--]mono/io-layer/io-layer.h6
-rw-r--r--mono/io-layer/messages.c5
-rw-r--r--mono/io-layer/processes.c5
-rw-r--r--mono/io-layer/shared.c5
-rw-r--r--mono/metadata/Makefile.am.in24
-rw-r--r--mono/metadata/appdomain.c18
-rw-r--r--mono/metadata/appdomain.h120
-rw-r--r--mono/metadata/assembly.c37
-rw-r--r--mono/metadata/assembly.h96
-rw-r--r--mono/metadata/boehm-gc.c25
-rw-r--r--mono/metadata/cil-coff.h8
-rw-r--r--mono/metadata/class-internals.h28
-rw-r--r--mono/metadata/class.c105
-rw-r--r--mono/metadata/class.h166
-rw-r--r--mono/metadata/cominterop.c4
-rw-r--r--mono/metadata/cominterop.h4
-rw-r--r--mono/metadata/console-unix.c17
-rw-r--r--mono/metadata/console-win32.c4
-rw-r--r--mono/metadata/culture-info-tables.h1950
-rw-r--r--mono/metadata/debug-helpers.h28
-rw-r--r--mono/metadata/debug-mono-symfile.c3
-rw-r--r--mono/metadata/debug-mono-symfile.h20
-rw-r--r--mono/metadata/domain-internals.h37
-rw-r--r--mono/metadata/domain.c339
-rw-r--r--mono/metadata/environment.h4
-rw-r--r--mono/metadata/exception.c2
-rw-r--r--mono/metadata/exception.h86
-rw-r--r--mono/metadata/file-io.c13
-rw-r--r--mono/metadata/gc-internal.h17
-rw-r--r--mono/metadata/gc.c16
-rw-r--r--mono/metadata/icall-def.h54
-rw-r--r--mono/metadata/icall.c93
-rw-r--r--mono/metadata/image.c17
-rw-r--r--mono/metadata/image.h76
-rw-r--r--mono/metadata/loader.c2
-rw-r--r--mono/metadata/loader.h52
-rw-r--r--mono/metadata/locales.c189
-rw-r--r--mono/metadata/lock-tracer.c2
-rw-r--r--mono/metadata/marshal.c370
-rw-r--r--mono/metadata/marshal.h23
-rw-r--r--mono/metadata/mempool.h22
-rw-r--r--mono/metadata/metadata-internals.h18
-rw-r--r--mono/metadata/metadata-verify.c21
-rw-r--r--mono/metadata/metadata.c54
-rw-r--r--mono/metadata/metadata.h177
-rw-r--r--mono/metadata/method-builder.c2
-rw-r--r--mono/metadata/monitor.c6
-rw-r--r--mono/metadata/monitor.h2
-rw-r--r--mono/metadata/mono-config.c14
-rw-r--r--mono/metadata/mono-config.h19
-rw-r--r--mono/metadata/mono-cq.c4
-rw-r--r--mono/metadata/mono-debug-debugger.h30
-rw-r--r--mono/metadata/mono-debug.h53
-rw-r--r--mono/metadata/mono-gc.h16
-rw-r--r--mono/metadata/mono-hash.h116
-rw-r--r--mono/metadata/mono-mlist.h20
-rw-r--r--mono/metadata/null-gc.c6
-rw-r--r--mono/metadata/object-internals.h25
-rw-r--r--mono/metadata/object.c22
-rw-r--r--mono/metadata/object.h185
-rw-r--r--mono/metadata/opcodes.h4
-rwxr-xr-x[-rw-r--r--]mono/metadata/process.c0
-rw-r--r--mono/metadata/profiler.h68
-rw-r--r--mono/metadata/reflection.c91
-rw-r--r--mono/metadata/reflection.h96
-rw-r--r--mono/metadata/security-core-clr.h6
-rw-r--r--mono/metadata/sgen-alloc.c31
-rwxr-xr-x[-rw-r--r--]mono/metadata/sgen-archdep.h31
-rw-r--r--mono/metadata/sgen-bridge.c85
-rw-r--r--mono/metadata/sgen-cardtable.c2
-rw-r--r--mono/metadata/sgen-descriptor.h12
-rw-r--r--mono/metadata/sgen-fin-weak-hash.c322
-rw-r--r--mono/metadata/sgen-gc.c162
-rw-r--r--mono/metadata/sgen-gc.h56
-rw-r--r--mono/metadata/sgen-internal.c1
-rw-r--r--mono/metadata/sgen-los.c4
-rwxr-xr-x[-rw-r--r--]mono/metadata/sgen-marksweep.c34
-rw-r--r--mono/metadata/sgen-memory-governor.c2
-rw-r--r--mono/metadata/sgen-os-mach.c10
-rw-r--r--mono/metadata/sgen-os-posix.c64
-rwxr-xr-x[-rw-r--r--]mono/metadata/sgen-os-win32.c21
-rw-r--r--mono/metadata/sgen-protocol.c56
-rw-r--r--mono/metadata/sgen-protocol.h36
-rwxr-xr-x[-rw-r--r--]mono/metadata/sgen-stw.c45
-rw-r--r--mono/metadata/sgen-toggleref.c2
-rw-r--r--mono/metadata/socket-io.c38
-rw-r--r--mono/metadata/threadpool.c75
-rw-r--r--mono/metadata/threadpool.h4
-rw-r--r--mono/metadata/threads-types.h20
-rwxr-xr-x[-rw-r--r--]mono/metadata/threads.c463
-rw-r--r--mono/metadata/threads.h34
-rw-r--r--mono/metadata/tpool-epoll.c16
-rw-r--r--mono/metadata/tpool-kqueue.c14
-rw-r--r--mono/metadata/tpool-poll.c18
-rw-r--r--mono/metadata/verify.c26
-rw-r--r--mono/metadata/verify.h6
-rw-r--r--mono/mini/.gitignore3
-rwxr-xr-x[-rw-r--r--]mono/mini/Makefile.am.in52
-rw-r--r--mono/mini/alias-analysis.c335
-rwxr-xr-x[-rw-r--r--]mono/mini/aot-compiler.c310
-rw-r--r--mono/mini/aot-runtime.c334
-rw-r--r--mono/mini/arrays.cs26
-rw-r--r--mono/mini/basic-float.cs14
-rw-r--r--mono/mini/cpu-amd64.md3
-rw-r--r--mono/mini/cpu-arm.md1
-rw-r--r--mono/mini/cpu-mips.md4
-rw-r--r--mono/mini/cpu-x86.md1
-rw-r--r--mono/mini/debug-mini.c16
-rw-r--r--mono/mini/debug-mini.h16
-rwxr-xr-x[-rw-r--r--]mono/mini/debugger-agent.c631
-rw-r--r--mono/mini/declsec.c26
-rw-r--r--mono/mini/decompose.c4
-rw-r--r--mono/mini/driver.c235
-rw-r--r--mono/mini/dwarfwriter.c20
-rw-r--r--mono/mini/dwarfwriter.h3
-rw-r--r--mono/mini/exceptions-amd64.c142
-rw-r--r--mono/mini/exceptions-arm.c21
-rw-r--r--mono/mini/exceptions-ia64.c2
-rw-r--r--mono/mini/exceptions-mips.c12
-rw-r--r--mono/mini/exceptions-ppc.c28
-rw-r--r--mono/mini/exceptions-s390x.c12
-rw-r--r--mono/mini/exceptions-x86.c164
-rw-r--r--mono/mini/generics.cs14
-rw-r--r--mono/mini/gshared.cs222
-rw-r--r--mono/mini/iltests.il.in2
-rw-r--r--mono/mini/ir-emit.h95
-rw-r--r--mono/mini/jit-icalls.c100
-rw-r--r--mono/mini/jit-icalls.h9
-rw-r--r--mono/mini/jit.h20
-rw-r--r--mono/mini/liveness.c2
-rwxr-xr-x[-rw-r--r--]mono/mini/main.c4
-rw-r--r--mono/mini/method-to-ir.c637
-rw-r--r--mono/mini/mini-amd64.c212
-rw-r--r--mono/mini/mini-amd64.h8
-rw-r--r--mono/mini/mini-arm.c270
-rw-r--r--mono/mini/mini-arm.h39
-rw-r--r--mono/mini/mini-codegen.c29
-rw-r--r--mono/mini/mini-exceptions.c233
-rwxr-xr-x[-rw-r--r--]mono/mini/mini-gc.c41
-rw-r--r--mono/mini/mini-generic-sharing.c6
-rw-r--r--mono/mini/mini-ia64.c1
-rw-r--r--mono/mini/mini-llvm-cpp.cpp42
-rw-r--r--mono/mini/mini-llvm.c50
-rw-r--r--mono/mini/mini-llvm.h9
-rw-r--r--mono/mini/mini-mips.c11
-rw-r--r--mono/mini/mini-ops.h7
-rw-r--r--mono/mini/mini-posix.c70
-rw-r--r--mono/mini/mini-ppc.c87
-rw-r--r--mono/mini/mini-ppc.h3
-rw-r--r--mono/mini/mini-s390x.c133
-rw-r--r--mono/mini/mini-s390x.h2
-rw-r--r--mono/mini/mini-sparc.c55
-rw-r--r--mono/mini/mini-trampolines.c124
-rw-r--r--mono/mini/mini-windows.c15
-rwxr-xr-x[-rw-r--r--]mono/mini/mini-x86.c486
-rw-r--r--mono/mini/mini-x86.h6
-rw-r--r--mono/mini/mini.c500
-rw-r--r--mono/mini/mini.h142
-rw-r--r--mono/mini/objects.cs35
-rw-r--r--mono/mini/optflags-def.h1
-rw-r--r--mono/mini/patch-info.h1
-rw-r--r--mono/mini/regalloc2.c81
-rw-r--r--mono/mini/simd-intrinsics.c3
-rw-r--r--mono/mini/ssapre.c4
-rw-r--r--mono/mini/tasklets.c4
-rw-r--r--mono/mini/trace.c2
-rw-r--r--mono/mini/tramp-amd64.c34
-rw-r--r--mono/mini/tramp-arm.c29
-rw-r--r--mono/mini/tramp-mips.c19
-rw-r--r--mono/mini/tramp-ppc.c21
-rw-r--r--mono/mini/tramp-s390x.c35
-rw-r--r--mono/mini/tramp-sparc.c17
-rw-r--r--mono/mini/tramp-x86.c35
-rw-r--r--mono/mini/xdebug.c14
-rw-r--r--mono/profiler/proflog.c182
-rwxr-xr-xmono/profiler/ptestrunner.pl20
-rw-r--r--mono/profiler/test-busy.cs1
-rw-r--r--mono/tests/Makefile.am120
-rw-r--r--mono/tests/block_guard_restore_aligment_on_exit.cs43
-rwxr-xr-x[-rw-r--r--]mono/tests/bug-348522.2.cs0
-rwxr-xr-x[-rw-r--r--]mono/tests/bug-438454.cs2
-rw-r--r--mono/tests/debug-casts.cs45
-rw-r--r--mono/tests/finalizer-exception.cs6
-rw-r--r--mono/tests/finally_block_ending_in_dead_bb.cs32
-rwxr-xr-x[-rw-r--r--]mono/tests/gc-descriptors/Makefile.am3
-rw-r--r--mono/tests/libtest.c103
-rw-r--r--mono/tests/marshal.cs23
-rw-r--r--mono/tests/marshal2.cs18
-rw-r--r--mono/tests/pinvoke2.cs55
-rw-r--r--mono/tests/pinvoke3.cs26
-rw-r--r--mono/tests/runtime-invoke.cs34
-rw-r--r--mono/tests/sgen-bridge-xref.cs52
-rw-r--r--mono/tests/sgen-descriptors.cs15
-rw-r--r--mono/tests/sgen-new-threads-dont-join-stw.cs95
-rwxr-xr-xmono/tests/test-driver1
-rw-r--r--mono/tests/thread_static_gc_layout.cs26
-rw-r--r--mono/utils/Makefile.am48
-rwxr-xr-x[-rw-r--r--]mono/utils/atomic.c394
-rwxr-xr-x[-rw-r--r--]mono/utils/atomic.h1159
-rw-r--r--mono/utils/bsearch.c63
-rw-r--r--mono/utils/bsearch.h18
-rw-r--r--mono/utils/dlmalloc.c5
-rw-r--r--mono/utils/dlmalloc.h4
-rw-r--r--mono/utils/mach-support-arm.c39
-rw-r--r--mono/utils/mono-codeman.h24
-rw-r--r--mono/utils/mono-compiler.h3
-rwxr-xr-x[-rw-r--r--]mono/utils/mono-context.h21
-rw-r--r--mono/utils/mono-counters.h14
-rw-r--r--mono/utils/mono-digest.h23
-rw-r--r--mono/utils/mono-dl-fallback.h4
-rwxr-xr-xmono/utils/mono-embed.h2
-rw-r--r--mono/utils/mono-error.h12
-rw-r--r--mono/utils/mono-hwcap-arm.c159
-rw-r--r--mono/utils/mono-hwcap-arm.h14
-rw-r--r--mono/utils/mono-hwcap-ia64.c39
-rw-r--r--mono/utils/mono-hwcap-ia64.h8
-rw-r--r--mono/utils/mono-hwcap-mips.c39
-rw-r--r--mono/utils/mono-hwcap-mips.h8
-rw-r--r--mono/utils/mono-hwcap-ppc.c84
-rw-r--r--mono/utils/mono-hwcap-ppc.h12
-rw-r--r--mono/utils/mono-hwcap-s390x.c73
-rw-r--r--mono/utils/mono-hwcap-s390x.h8
-rw-r--r--mono/utils/mono-hwcap-sparc.c65
-rw-r--r--mono/utils/mono-hwcap-sparc.h8
-rw-r--r--mono/utils/mono-hwcap-x86.c185
-rw-r--r--mono/utils/mono-hwcap-x86.h17
-rw-r--r--mono/utils/mono-hwcap.c39
-rw-r--r--mono/utils/mono-hwcap.h50
-rw-r--r--mono/utils/mono-logger.c4
-rw-r--r--mono/utils/mono-logger.h4
-rw-r--r--mono/utils/mono-math.h5
-rw-r--r--mono/utils/mono-membar.h139
-rw-r--r--mono/utils/mono-memory-model.h11
-rw-r--r--mono/utils/mono-mmap.h41
-rw-r--r--mono/utils/mono-mutex.c5
-rw-r--r--mono/utils/mono-networkinterfaces.c6
-rw-r--r--mono/utils/mono-path.h5
-rw-r--r--mono/utils/mono-poll.h4
-rw-r--r--mono/utils/mono-proclib.c11
-rw-r--r--mono/utils/mono-property-hash.h11
-rw-r--r--mono/utils/mono-publib.h26
-rw-r--r--mono/utils/mono-semaphore.c3
-rw-r--r--mono/utils/mono-semaphore.h7
-rw-r--r--mono/utils/mono-signal-handler.h29
-rw-r--r--mono/utils/mono-stack-unwinding.h8
-rw-r--r--mono/utils/mono-threads.c74
-rw-r--r--mono/utils/mono-threads.h49
-rw-r--r--mono/utils/mono-tls.c35
-rw-r--r--mono/utils/mono-tls.h19
-rw-r--r--mono/utils/mono-uri.h3
-rw-r--r--mono/utils/monobitset.c26
-rw-r--r--mono/utils/monobitset.h53
-rw-r--r--mono/utils/strenc.h11
-rw-r--r--mono/utils/strtod.c4
-rw-r--r--msvc/eglib.vcxproj6
-rw-r--r--msvc/genmdesc.vcxproj6
-rw-r--r--msvc/libgc.vcxproj6
-rw-r--r--msvc/libmono.vcxproj12
-rw-r--r--msvc/libmonoruntime.vcxproj14
-rw-r--r--msvc/libmonoutils.vcxproj16
-rw-r--r--msvc/libtest.vcxproj6
-rw-r--r--msvc/mono.def1
-rw-r--r--msvc/mono.vcxproj12
-rw-r--r--msvc/monodiet.vcxproj6
-rw-r--r--msvc/monodis.vcxproj6
-rw-r--r--msvc/monograph.vcxproj6
-rw-r--r--msvc/monoposixhelper.vcxproj6
-rw-r--r--msvc/monosgen.def1
-rw-r--r--msvc/pedump.vcxproj6
-rw-r--r--msvc/profiler-codeanalyst.vcxproj6
-rw-r--r--msvc/profiler-cov.vcxproj6
-rw-r--r--msvc/profiler-logging.vcxproj6
-rw-r--r--msvc/profiler-vtune.vcxproj6
-rw-r--r--msvc/test-invoke.vcxproj6
-rw-r--r--msvc/test-metadata.vcxproj6
-rw-r--r--msvc/test_eglib.vcxproj6
-rw-r--r--msvc/teste.vcxproj6
-rw-r--r--msvc/win32.xml6
-rw-r--r--runtime/Makefile.am36
-rwxr-xr-x[-rw-r--r--]scripts/dmcs.in2
-rwxr-xr-x[-rw-r--r--]scripts/gmcs.in2
-rwxr-xr-xscripts/mono-test-install4
-rw-r--r--support/Makefile.am5
-rw-r--r--support/mac-reachability.c153
-rw-r--r--support/map.h4
-rw-r--r--support/minizip/.gitignore3
-rw-r--r--support/unistd.c16
-rw-r--r--tools/locale-builder/Driver.cs10
-rw-r--r--tools/sgen/sgen-grep-binprot.c105
-rw-r--r--winconfig.h4
1389 files changed, 43804 insertions, 13926 deletions
diff --git a/.gitignore b/.gitignore
index bce6a59c239..c5dbc5d7ad8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,7 +55,7 @@ _ReSharper*/
~$*
# Autotools-generated files
-Makefile
+/Makefile
Makefile.in
aclocal.m4
autom4te.cache
@@ -112,6 +112,7 @@ GTAGS
# Mono-specific patterns
##############################################################################
+.dirstamp
compile
mono.h
mono-*.tar.*
diff --git a/Makefile.am b/Makefile.am
index 6a0fcdcb0ae..a4a959d1c48 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,5 @@
ACLOCAL_AMFLAGS = -I m4
-MOONLIGHT_SUBDIRS = $(libgc_dir) eglib/src mono
MONOTOUCH_SUBDIRS = $(libgc_dir) eglib/src mono
if CROSS_COMPILING
@@ -12,16 +11,12 @@ else
if ONLY_MONOTOUCH
SUBDIRS = $(MONOTOUCH_SUBDIRS) runtime
else
-if ONLY_MOONLIGHT
-SUBDIRS = $(MOONLIGHT_SUBDIRS) runtime
-else
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir)
# Keep in sync with SUBDIRS
## 'tools' is not normally built
DIST_SUBDIRS = m4 po libgc eglib mono ikvm-native support data runtime scripts man samples tools msvc docs
endif
endif
-endif
all: update_submodules
@@ -32,6 +27,7 @@ update_submodules:
.PHONY: update_submodules
EXTRA_DIST= \
+ README.md \
LICENSE \
autogen.sh \
build-mingw32.sh \
@@ -92,31 +88,6 @@ mcs-do-compiler-tests:
bootstrap-world: compiler-tests
$(MAKE) install
-if MOONLIGHT
-moon-do-build: config.h
- @list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
- case "x$$subdir" in \
- xmono ) target="moon-do-build";; \
- * ) target="all";; \
- esac; \
- echo "Making $$target in $$subdir"; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
- done;
- (cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-build)
-
-moon-do-clean:
- @list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
- case "x$$subdir" in \
- xmono ) target="moon-do-clean";; \
- * ) target="clean";; \
- esac; \
- echo "Making $$target in $$subdir"; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
- done;
- (cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-clean)
-
-endif
-
if INSTALL_MONOTOUCH
monotouch-do-build: config.h
@list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
@@ -185,3 +156,9 @@ package-inputs:
done
echo "</root>" >> msvc/scripts/order.xml
+# Update llvm version in configure.in to the output of $LLVM_DIR/bin/llvm-config --version
+update-llvm-version:
+ if test "x$$LLVM_DIR" = "x"; then echo "Set the make variable LLVM_DIR to the directory containing the LLVM installation."; exit 1; fi
+ REV=`$(LLVM_DIR)/bin/llvm-config --version` && sed -e "s,expected_llvm_version=.*,expected_llvm_version=\"$$REV\"," < configure.in > tmp && mv tmp configure.in && echo "Version set to $$REV."
+
+
diff --git a/README b/README
deleted file mode 100644
index 43efac46d79..00000000000
--- a/README
+++ /dev/null
@@ -1,592 +0,0 @@
-This is Mono.
-
- 1. Installation
- 2. Using Mono
- 3. Directory Roadmap
- 4. git submodules maintenance
-
-1. Compilation and Installation
-===============================
-
- a. Build Requirements
- ---------------------
-
- On Itanium, you must obtain libunwind:
-
- http://www.hpl.hp.com/research/linux/libunwind/download.php4
-
- On Solaris, make sure that you used GNU tar to unpack this package, as
- Solaris tar will not unpack this correctly, and you will get strange errors.
-
- On Solaris, make sure that you use the GNU toolchain to build the software.
-
- Optional dependencies:
-
- * libgdiplus
-
- If you want to get support for System.Drawing, you will need to get
- Libgdiplus. This library in turn requires glib and pkg-config:
-
- * pkg-config
-
- Available from: http://www.freedesktop.org/Software/pkgconfig
-
- * glib 2.4
-
- Available from: http://www.gtk.org/
-
- * libzlib
-
- This library and the development headers are required for compression
- file support in the 2.0 profile.
-
- b. Building the Software
- ------------------------
-
- If you obtained this package as an officially released tarball,
- this is very simple, use configure and make:
-
- ./configure --prefix=/usr/local
- make
- make install
-
- Mono supports a JIT engine on x86, SPARC, SPARCv9, S/390,
- S/390x, AMD64, ARM and PowerPC systems.
-
- If you obtained this as a snapshot, you will need an existing
- Mono installation. To upgrade your installation, unpack both
- mono and mcs:
-
- tar xzf mcs-XXXX.tar.gz
- tar xzf mono-XXXX.tar.gz
- mv mono-XXX mono
- mv mcs-XXX mcs
- cd mono
- ./autogen.sh --prefix=/usr/local
- make
-
- The Mono build system is silent for most compilation commands.
- To enable a more verbose compile (for example, to pinpoint
- problems in your makefiles or your system) pass the V=1 flag to make, like this:
-
- make V=1
-
-
- c. Building the software from GIT
- ---------------------------------
-
- If you are building the software from GIT, make sure that you
- have up-to-date mcs and mono sources:
-
- If you are an anonymous user:
- git clone git://github.com/mono/mono.git
-
- If you are a Mono contributors with read/write privileges:
- git clone git@github.com:mono/mono.git
-
-
- Then, go into the mono directory, and configure:
-
- cd mono
- ./autogen.sh --prefix=/usr/local
- make
-
- For people with non-standard installations of the auto* utils and of
- pkg-config (common on misconfigured OSX and windows boxes), you could get
- an error like this:
-
- ./configure: line 19176: syntax error near unexpected token `PKG_CHECK_MODULES(BASE_DEPENDENCIES,' ...
-
- This means that you need to set the ACLOCAL_FLAGS environment var
- when invoking autogen.sh, like this:
-
- ACLOCAL_FLAGS="-I $acprefix/share/aclocal" ./autogen.sh --prefix=/usr/loca
-
- where $acprefix is the prefix where aclocal has been installed.
-
- This will automatically go into the mcs/ tree and build the
- binaries there.
-
- This assumes that you have a working mono installation, and that
- there's a C# compiler named 'mcs', and a corresponding IL
- runtime called 'mono'. You can use two make variables
- EXTERNAL_MCS and EXTERNAL_RUNTIME to override these. e.g., you
- can say
-
- make EXTERNAL_MCS=/foo/bar/mcs EXTERNAL_RUNTIME=/somewhere/else/mono
-
- If you don't have a working Mono installation
- ---------------------------------------------
-
- If you don't have a working Mono installation, an obvious choice
- is to install the latest released packages of 'mono' for your
- distribution and running autogen.sh; make; make install in the
- mono module directory.
-
- You can also try a slightly more risky approach: this may not work,
- so start from the released tarball as detailed above.
-
- This works by first getting the latest version of the 'monolite'
- distribution, which contains just enough to run the 'mcs'
- compiler. You do this with:
-
- # Run the following line after ./autogen.sh
- make get-monolite-latest
-
- This will download and automatically gunzip and untar the
- tarball, and place the files appropriately so that you can then
- just run:
-
- make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/gmcs.exe
-
- And that will use the files downloaded by 'make get-monolite-latest.
-
- Testing and Installation
- ------------------------
-
- You can run (part of) the mono and mcs testsuites with the command:
-
- make check
-
- All tests should pass.
-
- If you want more extensive tests, including those that test the
- class libraries, you need to re-run 'configure' with the
- '--enable-nunit-tests' flag, and try
-
- make -k check
-
- Expect to find a few testsuite failures. As a sanity check, you
- can compare the failures you got with
-
- https://wrench.mono-project.com/Wrench/
-
- You can now install mono with:
-
- make install
-
- You can verify your installation by using the mono-test-install
- script, it can diagnose some common problems with Mono's install.
-
- Failure to follow these steps may result in a broken installation.
-
- d. Configuration Options
- ------------------------
-
- The following are the configuration options that someone
- building Mono might want to use:
-
- --with-sgen=yes,no
-
- Generational GC support: Used to enable or disable the
- compilation of a Mono runtime with the SGen garbage collector.
-
- On platforms that support it, after building Mono, you
- will have both a mono binary and a mono-sgen binary.
- Mono uses Boehm, while mono-sgen uses the Simple
- Generational GC.
-
- --with-gc=[boehm, included, sgen, none]
-
- Selects the default Boehm garbage collector engine to
- use, the default is the "included" value.
-
- included:
- This is the default value, and its
- the most feature complete, it will allow Mono
- to use typed allocations and support the
- debugger.
-
- It is essentially a slightly modified Boehm GC
-
- boehm:
- This is used to use a system-install Boehm GC,
- it is useful to test new features available in
- Boehm GC, but we do not recommend that people
- use this, as it disables a few features.
-
- none:
- Disables the inclusion of a garbage
- collector.
-
- --with-tls=__thread,pthread
-
- Controls how Mono should access thread local storage,
- pthread forces Mono to use the pthread APIs, while
- __thread uses compiler-optimized access to it.
-
- Although __thread is faster, it requires support from
- the compiler, kernel and libc. Old Linux systems do
- not support with __thread.
-
- This value is typically pre-configured and there is no
- need to set it, unless you are trying to debug a
- problem.
-
- --with-sigaltstack=yes,no
-
- Experimental: Use at your own risk, it is known to
- cause problems with garbage collection and is hard to
- reproduce those bugs.
-
- This controls whether Mono will install a special
- signal handler to handle stack overflows. If set to
- "yes", it will turn stack overflows into the
- StackOverflowException. Otherwise when a stack
- overflow happens, your program will receive a
- segmentation fault.
-
- The configure script will try to detect if your
- operating system supports this. Some older Linux
- systems do not support this feature, or you might want
- to override the auto-detection.
-
- --with-static_mono=yes,no
-
- This controls whether `mono' should link against a
- static library (libmono.a) or a shared library
- (libmono.so).
-
- This defaults to yes, and will improve the performance
- of the `mono' program.
-
- This only affects the `mono' binary, the shared
- library libmono.so will always be produced for
- developers that want to embed the runtime in their
- application.
-
- --with-xen-opt=yes,no
-
- The default value for this is `yes', and it makes Mono
- generate code which might be slightly slower on
- average systems, but the resulting executable will run
- faster under the Xen virtualization system.
-
- --with-large-heap=yes,no
-
- Enable support for GC heaps larger than 3GB.
-
- This value is set to `no' by default.
-
- --enable-small-config=yes,no
-
- Enable some tweaks to reduce memory usage and disk footprint at
- the expense of some capabilities. Typically this means that the
- number of threads that can be created is limited (256), that the
- maxmimum heap size is also reduced (256 MB) and other such limitations
- that still make mono useful, but more suitable to embedded devices
- (like mobile phones).
-
- This value is set to `no' by default.
-
- --with-ikvm-native=yes,no
-
- Controls whether the IKVM JNI interface library is
- built or not. This is used if you are planning on
- using the IKVM Java Virtual machine with Mono.
-
- This defaults to `yes'.
-
- --with-profile4=yes,no
-
- Whether you want to build the 4.x profile libraries
- and runtime.
-
- It defaults to `yes'.
-
- --with-moonlight=yes,no
-
- Whether you want to generate the Silverlight/Moonlight
- libraries and toolchain in addition to the default
- (1.1 and 2.0 APIs).
-
- This will produce the `smcs' compiler which will reference
- the Silverlight modified assemblies (mscorlib.dll,
- System.dll, System.Code.dll and System.Xml.Core.dll) and turn
- on the LINQ extensions for the compiler.
-
- --with-moon-gc=boehm,sgen
-
- Select the GC to use for Moonlight.
-
- boehm:
- Selects the Boehm Garbage Collector, with the same flags
- as the regular Mono build. This is the default.
-
- sgen:
- Selects the new SGen Garbage Collector, which provides
- Generational GC support, using the same flags as the
- mono-sgen build.
-
- This defaults to `boehm'.
-
- --with-libgdiplus=installed,sibling,<path>
-
- This is used to configure where should Mono look for
- libgdiplus when running the System.Drawing tests.
-
- It defaults to `installed', which means that the
- library is available to Mono through the regular
- system setup.
-
- `sibling' can be used to specify that a libgdiplus
- that resides as a sibling of this directory (mono)
- should be used.
-
- Or you can specify a path to a libgdiplus.
-
- --disable-shared-memory
-
- Use this option to disable the use of shared memory in
- Mono (this is equivalent to setting the MONO_DISABLE_SHM
- environment variable, although this removes the feature
- completely).
-
- Disabling the shared memory support will disable certain
- features like cross-process named mutexes.
-
- --enable-minimal=LIST
-
- Use this feature to specify optional runtime
- components that you might not want to include. This
- is only useful for developers embedding Mono that
- require a subset of Mono functionality.
-
- The list is a comma-separated list of components that
- should be removed, these are:
-
- aot:
- Disables support for the Ahead of Time
- compilation.
-
- attach:
- Support for the Mono.Management assembly and the
- VMAttach API (allowing code to be injected into
- a target VM)
-
- com:
- Disables COM support.
-
- debug:
- Drop debugging support.
-
- decimal:
- Disables support for System.Decimal.
-
- full_messages:
- By default Mono comes with a full table
- of messages for error codes. This feature
- turns off uncommon error messages and reduces
- the runtime size.
-
- generics:
- Generics support. Disabling this will not
- allow Mono to run any 2.0 libraries or
- code that contains generics.
-
- jit:
- Removes the JIT engine from the build, this reduces
- the executable size, and requires that all code
- executed by the virtual machine be compiled with
- Full AOT before execution.
-
- large_code:
- Disables support for large assemblies.
-
- logging:
- Disables support for debug logging.
-
- pinvoke:
- Support for Platform Invocation services,
- disabling this will drop support for any
- libraries using DllImport.
-
- portability:
- Removes support for MONO_IOMAP, the environment
- variables for simplifying porting applications that
- are case-insensitive and that mix the Unix and Windows path separators.
-
- profiler:
- Disables support for the default profiler.
-
- reflection_emit:
- Drop System.Reflection.Emit support
-
- reflection_emit_save:
- Drop support for saving dynamically created
- assemblies (AssemblyBuilderAccess.Save) in
- System.Reflection.Emit.
-
- shadow_copy:
- Disables support for AppDomain's shadow copies
- (you can disable this if you do not plan on
- using appdomains).
-
- simd:
- Disables support for the Mono.SIMD intrinsics
- library.
-
- ssa:
- Disables compilation for the SSA optimization
- framework, and the various SSA-based
- optimizations.
-
- --enable-llvm
- --enable-loadedllvm
-
- This enables the use of LLVM as a code generation engine
- for Mono. The LLVM code generator and optimizer will be
- used instead of Mono's built-in code generator for both
- Just in Time and Ahead of Time compilations.
-
- See the http://www.mono-project.com/Mono_LLVM for the
- full details and up-to-date information on this feature.
-
- You will need to have an LLVM built that Mono can link
- against,
-
- The --enable-loadedllvm variant will make the llvm backend
- into a runtime-loadable module instead of linking it directly
- into the main mono binary.
-
- --enable-big-arrays
-
- This enables the use arrays whose indexes are larger
- than Int32.MaxValue.
-
- By default Mono has the same limitation as .NET on
- Win32 and Win64 and limits array indexes to 32-bit
- values (even on 64-bit systems).
-
- In certain scenarios where large arrays are required,
- you can pass this flag and Mono will be built to
- support 64-bit arrays.
-
- This is not the default as it breaks the C embedding
- ABI that we have exposed through the Mono development
- cycle.
-
- --enable-parallel-mark
-
- Use this option to enable the garbage collector to use
- multiple CPUs to do its work. This helps performance
- on multi-CPU machines as the work is divided across CPUS.
-
- This option is not currently the default as we have
- not done much testing with Mono.
-
- --enable-dtrace
-
- On Solaris and MacOS X builds a version of the Mono
- runtime that contains DTrace probes and can
- participate in the system profiling using DTrace.
-
-
- --disable-dev-random
-
- Mono uses /dev/random to obtain good random data for
- any source that requires random numbers. If your
- system does not support this, you might want to
- disable it.
-
- There are a number of runtime options to control this
- also, see the man page.
-
- --enable-nacl
-
- This configures the Mono compiler to generate code
- suitable to be used by Google's Native Client:
-
- http://code.google.com/p/nativeclient/
-
- Currently this is used with Mono's AOT engine as
- Native Client does not support JIT engines yet.
-
-2. Using Mono
-=============
-
- Once you have installed the software, you can run a few programs:
-
- * runtime engine
-
- mono program.exe
-
- * C# compiler
-
- mcs program.cs
-
- * CIL Disassembler
-
- monodis program.exe
-
- See the man pages for mono(1), mint(1), monodis(1) and mcs(2)
- for further details.
-
-3. Directory Roadmap
-====================
-
- docs/
- Technical documents about the Mono runtime.
-
- data/
- Configuration files installed as part of the Mono runtime.
-
- mono/
- The core of the Mono Runtime.
-
- metadata/
- The object system and metadata reader.
-
- mini/
- The Just in Time Compiler.
-
- dis/
- CIL executable Disassembler
-
- cli/
- Common code for the JIT and the interpreter.
-
- io-layer/
- The I/O layer and system abstraction for
- emulating the .NET IO model.
-
- cil/
- Common Intermediate Representation, XML
- definition of the CIL bytecodes.
-
- interp/
- Interpreter for CLI executables (obsolete).
-
- arch/
- Architecture specific portions.
-
- man/
-
- Manual pages for the various Mono commands and programs.
-
- samples/
-
- Some simple sample programs on uses of the Mono
- runtime as an embedded library.
-
- scripts/
-
- Scripts used to invoke Mono and the corresponding program.
-
- runtime/
-
- A directory that contains the Makefiles that link the
- mono/ and mcs/ build systems.
-
- ../olive/
-
- If the directory ../olive is present (as an
- independent checkout) from the Mono module, that
- directory is automatically configured to share the
- same prefix than this module gets.
-
-
-4. Git submodules maintenance
-=============================
-
-Read documentation at http://mono-project.com/Git_Submodule_Maintenance
diff --git a/README.md b/README.md
new file mode 100644
index 00000000000..b3b0eb7c853
--- /dev/null
+++ b/README.md
@@ -0,0 +1,535 @@
+Mono is a software platform designed to allow developers to easily create cross platform applications.
+Mono is an open source implementation of Microsoft's .NET Framework based on the ECMA standards for C# and the Common Language Runtime.
+
+1. [Installation](#compilation-and-installation)
+2. [Using Mono](#using-mono)
+3. [Directory Roadmap](#directory-roadmap)
+4. [Git submodules maintenance](#git-submodules-maintenance)
+5. [Reporting bugs](#reporting-bugs)
+
+Compilation and Installation
+============================
+
+a. Build Requirements
+---------------------
+
+* On Itanium, you must obtain libunwind: http://www.hpl.hp.com/research/linux/libunwind/download.php4
+
+* On Solaris
+
+ 1. Make sure that you used GNU tar to unpack this package, as
+ Solaris tar will not unpack this correctly, and you will get strange errors.
+
+ 2. Make sure that you use the GNU toolchain to build the software.
+
+ 3. Optional dependencies
+
+ * libgdiplus - Required for System.Drawing. This library in turn requires glib and pkg-config
+
+ * pkg-config - Available at: http://www.freedesktop.org/Software/pkgconfig
+
+ * glib 2.4 - Available at: http://www.gtk.org/
+
+ * libzlib - This library and the development headers are required for compression
+file support in the 2.0 profile.
+
+b. Building the Software
+------------------------
+
+If you obtained this package as an officially released tarball,
+this is very simple, use configure and make:
+
+`./configure --prefix=/usr/local ; make ; make install`
+
+Mono supports a JIT engine on x86, SPARC, SPARCv9, S/390,
+S/390x, AMD64, ARM and PowerPC systems.
+
+If you obtained this as a snapshot, you will need an existing
+Mono installation. To upgrade your installation, unpack both
+mono and mcs:
+
+ tar xzf mcs-XXXX.tar.gz
+ tar xzf mono-XXXX.tar.gz
+ mv mono-XXX mono
+ mv mcs-XXX mcs
+ cd mono
+ ./autogen.sh --prefix=/usr/local
+ make
+
+The Mono build system is silent for most compilation commands.
+To enable a more verbose compile (for example, to pinpoint
+problems in your makefiles or your system) pass the V=1 flag to make, like this:
+
+` make V=1`
+
+
+c. Building the software from GIT
+---------------------------------
+
+If you are building the software from GIT, make sure that you
+have up-to-date mcs and mono sources:
+
+ * If you are an anonymous user: `git clone git://github.com/mono/mono.git`
+
+ * If you are a Mono contributor with read/write privileges: `git clone git@github.com:mono/mono.git`
+
+Then, go into the mono directory, and configure:
+
+ cd mono
+ ./autogen.sh --prefix=/usr/local
+ make
+
+For people with non-standard installations of the auto* utils and of
+pkg-config (common on misconfigured OSX and windows boxes), you could get
+an error like this:
+
+`./configure: line 19176: syntax error near unexpected token 'PKG_CHECK_MODULES(BASE_DEPENDENCIES,' ...`
+
+This means that you need to set the ACLOCAL_FLAGS environment variable
+when invoking autogen.sh, like this: `ACLOCAL_FLAGS="-I $acprefix/share/aclocal" ./autogen.sh --prefix=/usr/local`
+where $acprefix is the prefix where aclocal has been installed.
+This will automatically go into the mcs/ tree and build the
+binaries there.
+
+This assumes that you have a working mono installation, and that
+there's a C# compiler named 'mcs', and a corresponding IL
+runtime called 'mono'. You can use two make variables
+EXTERNAL_MCS and EXTERNAL_RUNTIME to override these. e.g., you
+can say:
+
+`make EXTERNAL_MCS=/foo/bar/mcs EXTERNAL_RUNTIME=/somewhere/else/mono`
+
+If you don't have a working Mono installation
+---------------------------------------------
+
+If you don't have a working Mono installation, an obvious choice
+is to install the latest released packages of 'mono' for your
+distribution and running `autogen.sh; make; make install` in the
+mono module directory.
+
+You can also try a slightly more risky approach: this may not work,
+so start from the released tarball as detailed above.
+
+This works by first getting the latest version of the 'monolite'
+distribution, which contains just enough to run the 'mcs'
+compiler. You do this with:
+
+ # Run the following line after ./autogen.sh
+ make get-monolite-latest
+
+This will download and automatically gunzip and untar the
+tarball, and place the files appropriately so that you can then
+just run: `make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/gmcs.exe`
+
+That will use the files downloaded by 'make get-monolite-latest.
+
+Testing and Installation
+------------------------
+
+You can run *(part of)* the mono and mcs test suites with the command: `make check`.
+All tests should pass.
+
+If you want more *extensive* tests, including those that test the
+class libraries, you need to re-run 'configure' with the
+'--enable-nunit-tests' flag, and try: `make -k check`
+
+Expect to find a few test suite failures. As a sanity check, you
+can compare the failures you got with
+
+`https://wrench.mono-project.com/Wrench/`
+
+You can now install mono with: `make install`
+
+You can verify your installation by using the mono-test-install
+script, it can diagnose some common problems with Mono's install.
+Failure to follow these steps may result in a broken installation.
+
+d. Configuration Options
+------------------------
+
+The following are the configuration options that someone
+building Mono might want to use:
+
+* `--with-sgen=yes,no` - Generational GC support: Used to enable or disable the
+compilation of a Mono runtime with the SGen garbage collector.
+
+ * On platforms that support it, after building Mono, you
+will have both a mono binary and a mono-sgen binary.
+Mono uses Boehm, while mono-sgen uses the Simple
+Generational GC.
+
+* `--with-gc=[boehm, included, sgen, none]` - Selects the default Boehm garbage
+collector engine to use.
+
+ * *included*: (*slighty modified Boehm GC*)
+This is the default value, and its
+the most feature complete, it will allow Mono
+to use typed allocations and support the
+debugger.
+
+ * *boehm*:
+This is used to use a system-install Boehm GC,
+it is useful to test new features available in
+Boehm GC, but we do not recommend that people
+use this, as it disables a few features.
+
+ * *none*:
+Disables the inclusion of a garbage collector.
+
+ * This defaults to `included`.
+
+* `--with-tls=__thread,pthread`
+
+ * Controls how Mono should access thread local storage,
+pthread forces Mono to use the pthread APIs, while
+__thread uses compiler-optimized access to it.
+
+ * Although __thread is faster, it requires support from
+the compiler, kernel and libc. Old Linux systems do
+not support with __thread.
+
+ * This value is typically pre-configured and there is no
+need to set it, unless you are trying to debug a problem.
+
+* `--with-sigaltstack=yes,no`
+
+ * **Experimental**: Use at your own risk, it is known to
+cause problems with garbage collection and is hard to
+reproduce those bugs.
+
+ * This controls whether Mono will install a special
+signal handler to handle stack overflows. If set to
+`yes`, it will turn stack overflows into the
+StackOverflowException. Otherwise when a stack
+overflow happens, your program will receive a
+segmentation fault.
+
+ * The configure script will try to detect if your
+operating system supports this. Some older Linux
+systems do not support this feature, or you might want
+to override the auto-detection.
+
+* `--with-static_mono=yes,no`
+
+ * This controls whether `mono` should link against a
+static library (libmono.a) or a shared library
+(libmono.so).
+
+ * This defaults to `yes`, and will improve the performance
+of the `mono` program.
+
+ * This only affects the `mono' binary, the shared
+library libmono.so will always be produced for
+developers that want to embed the runtime in their
+application.
+
+* `--with-xen-opt=yes,no` - Optimize code for Xen virtualization.
+
+ * It makes Mono generate code which might be slightly
+slower on average systems, but the resulting executable will run
+faster under the Xen virtualization system.
+
+ * This defaults to `yes`.
+
+* `--with-large-heap=yes,no` - Enable support for GC heaps larger than 3GB.
+
+ * This defaults to `no`.
+
+* `--enable-small-config=yes,no` - Enable some tweaks to reduce memory usage
+and disk footprint at the expense of some capabilities.
+
+ * Typically this means that the number of threads that can be created
+is limited (256), that the maximum heap size is also reduced (256 MB)
+and other such limitations that still make mono useful, but more suitable
+to embedded devices (like mobile phones).
+
+ * This defaults to `no`.
+
+* `--with-ikvm-native=yes,no` - Controls whether the IKVM JNI interface library is
+built or not.
+
+ * This is used if you are planning on
+using the IKVM Java Virtual machine with Mono.
+
+ * This defaults to `yes`.
+
+* `--with-profile4=yes,no` - Whether you want to build the 4.x profile libraries
+and runtime.
+
+ * This defaults to `yes`.
+
+* `--with-moonlight=yes,no`
+
+ * Whether you want to generate the Silverlight/Moonlight
+libraries and toolchain in addition to the default
+(1.1 and 2.0 APIs).
+
+ * This will produce the `smcs` compiler which will reference
+the Silverlight modified assemblies (mscorlib.dll,
+System.dll, System.Code.dll and System.Xml.Core.dll) and turn
+on the LINQ extensions for the compiler.
+
+* `--with-moon-gc=boehm,sgen` - Select the GC to use for Moonlight.
+
+ * *boehm*:
+Selects the Boehm Garbage Collector, with the same flags
+as the regular Mono build. This is the default.
+
+ * *sgen*:
+Selects the new SGen Garbage Collector, which provides
+Generational GC support, using the same flags as the
+mono-sgen build.
+
+ * This defaults to `boehm`.
+
+* `--with-libgdiplus=installed,sibling,<path>` - Configure where Mono
+searches for libgdiplus when running System.Drawing tests.
+
+ * It defaults to `installed`, which means that the
+library is available to Mono through the regular
+system setup.
+
+ * `sibling' can be used to specify that a libgdiplus
+that resides as a sibling of this directory (mono)
+should be used.
+
+ * Or you can specify a path to a libgdiplus.
+
+* `--disable-shared-memory`
+
+ * Use this option to disable the use of shared memory in
+Mono (this is equivalent to setting the MONO_DISABLE_SHM
+environment variable, although this removes the feature
+completely).
+
+ * Disabling the shared memory support will disable certain
+features like cross-process named mutexes.
+
+* `--enable-minimal=LIST`
+
+ * Use this feature to specify optional runtime
+components that you might not want to include. This
+is only useful for developers embedding Mono that
+require a subset of Mono functionality.
+ * The list is a comma-separated list of components that
+should be removed, these are:
+
+ * `aot`:
+Disables support for the Ahead of Time compilation.
+
+ * `attach`:
+Support for the Mono.Management assembly and the
+VMAttach API (allowing code to be injected into
+a target VM)
+
+ * `com`:
+Disables COM support.
+
+ * `debug`:
+Drop debugging support.
+
+ * `decimal`:
+Disables support for System.Decimal.
+
+ * `full_messages`:
+By default Mono comes with a full table
+of messages for error codes. This feature
+turns off uncommon error messages and reduces
+the runtime size.
+
+ * `generics`:
+Generics support. Disabling this will not
+allow Mono to run any 2.0 libraries or
+code that contains generics.
+
+ * `jit`:
+Removes the JIT engine from the build, this reduces
+the executable size, and requires that all code
+executed by the virtual machine be compiled with
+Full AOT before execution.
+
+ * `large_code`:
+Disables support for large assemblies.
+
+ * `logging`:
+Disables support for debug logging.
+
+ * `pinvoke`:
+Support for Platform Invocation services,
+disabling this will drop support for any
+libraries using DllImport.
+
+ * `portability`:
+Removes support for MONO_IOMAP, the environment
+variables for simplifying porting applications that
+are case-insensitive and that mix the Unix and Windows path separators.
+
+ * `profiler`:
+Disables support for the default profiler.
+
+ * `reflection_emit`:
+Drop System.Reflection.Emit support
+
+ * `reflection_emit_save`:
+Drop support for saving dynamically created
+assemblies (AssemblyBuilderAccess.Save) in
+System.Reflection.Emit.
+
+ * `shadow_copy`:
+Disables support for AppDomain's shadow copies
+(you can disable this if you do not plan on
+using appdomains).
+
+ * `simd`:
+Disables support for the Mono.SIMD intrinsics
+library.
+
+ * `ssa`:
+Disables compilation for the SSA optimization
+framework, and the various SSA-based optimizations.
+
+* `--enable-llvm`
+* `--enable-loadedllvm`
+
+ * This enables the use of LLVM as a code generation engine
+for Mono. The LLVM code generator and optimizer will be
+used instead of Mono's built-in code generator for both
+Just in Time and Ahead of Time compilations.
+
+ * See the http://www.mono-project.com/Mono_LLVM for the
+full details and up-to-date information on this feature.
+
+ * You will need to have an LLVM built that Mono can link
+against.
+
+ * The --enable-loadedllvm variant will make the LLVM backend
+into a runtime-loadable module instead of linking it directly
+into the main mono binary.
+
+* `--enable-big-arrays` - Enable use of arrays with indexes larger
+than Int32.MaxValue.
+
+ * By default Mono has the same limitation as .NET on
+Win32 and Win64 and limits array indexes to 32-bit
+values (even on 64-bit systems).
+
+ * In certain scenarios where large arrays are required,
+you can pass this flag and Mono will be built to
+support 64-bit arrays.
+
+ * This is not the default as it breaks the C embedding
+ABI that we have exposed through the Mono development
+cycle.
+
+* `--enable-parallel-mark`
+
+ * Use this option to enable the garbage collector to use
+multiple CPUs to do its work. This helps performance
+on multi-CPU machines as the work is divided across CPUS.
+
+ * This option is not currently the default as we have
+not done much testing with Mono.
+
+* `--enable-dtrace`
+
+ * On Solaris and MacOS X builds a version of the Mono
+runtime that contains DTrace probes and can
+participate in the system profiling using DTrace.
+
+
+* `--disable-dev-random`
+
+ * Mono uses /dev/random to obtain good random data for
+any source that requires random numbers. If your
+system does not support this, you might want to
+disable it.
+
+ * There are a number of runtime options to control this
+also, see the man page.
+
+* `--enable-nacl`
+
+ * This configures the Mono compiler to generate code
+suitable to be used by Google's Native Client:
+http://code.google.com/p/nativeclient/
+
+ * Currently this is used with Mono's AOT engine as
+Native Client does not support JIT engines yet.
+
+Using Mono
+==========
+
+Once you have installed the software, you can run a few programs:
+
+* `mono program.exe` runtime engine
+
+* `mcs program.cs` C# compiler
+
+* `monodis program.exe` CIL Disassembler
+
+See the man pages for mono(1), mint(1), monodis(1) and mcs(2)
+for further details.
+
+Directory Roadmap
+=================
+
+* `docs/` - Technical documents about the Mono runtime.
+
+* `data/` - Configuration files installed as part of the Mono runtime.
+
+* `mono/` - The core of the Mono Runtime.
+
+ * `metadata/` - The object system and metadata reader.
+
+ * `mini/` - The Just in Time Compiler.
+
+ * `dis/` - CIL executable Disassembler
+
+ * `cli/` - Common code for the JIT and the interpreter.
+
+ * `io-layer/` - The I/O layer and system abstraction for
+emulating the .NET IO model.
+
+ * `cil/` - Common Intermediate Representation, XML
+definition of the CIL bytecodes.
+
+ * `interp/` - Interpreter for CLI executables (obsolete).
+
+ * `arch/` - Architecture specific portions.
+
+* `man/` - Manual pages for the various Mono commands and programs.
+
+* `samples/` -Some simple sample programs on uses of the Mono
+runtime as an embedded library.
+
+* `scripts/` - Scripts used to invoke Mono and the corresponding program.
+
+* `runtime/` - A directory that contains the Makefiles that link the
+mono/ and mcs/ build systems.
+
+* `../olive/`
+
+ * If the directory ../olive is present (as an
+independent checkout) from the Mono module, that
+directory is automatically configured to share the
+same prefix than this module gets.
+
+
+Git submodules maintenance
+==========================
+
+Read documentation at http://mono-project.com/Git_Submodule_Maintenance
+
+
+Reporting bugs
+==============
+
+To submit bug reports, please use Xamarin's Bugzilla:
+
+https://bugzilla.xamarin.com/
+
+Please use the search facility to ensure the same bug hasn't already
+been submitted and follow our guidelines on how to make a good bug
+report:
+
+http://mono-project.com/Bugs#How_to_make_a_good_bug_report \ No newline at end of file
diff --git a/configure.in b/configure.in
index e6a64719df5..9f49d86cc90 100644
--- a/configure.in
+++ b/configure.in
@@ -1,10 +1,10 @@
# Process this file with autoconf to produce a configure script.
#AC_PREREQ([2.62])
-AC_INIT(mono, [3.1.0],
+AC_INIT(mono, [3.2.5],
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
-AC_CONFIG_SRCDIR([README])
+AC_CONFIG_SRCDIR([README.md])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_SYSTEM
AC_CANONICAL_HOST
@@ -13,7 +13,7 @@ AC_CANONICAL_HOST
# The extra brackets are to foil regex-based scans.
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
-AM_INIT_AUTOMAKE([1.9 dist-bzip2 tar-ustar no-dist-gzip foreign])
+AM_INIT_AUTOMAKE([1.9 dist-bzip2 tar-ustar no-dist-gzip foreign subdir-objects])
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE
@@ -24,6 +24,12 @@ AC_PROG_LN_S
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+case $host_os in
+*cygwin* )
+ echo "Run configure using ./configure --host=i686-pc-mingw32"
+ exit 1
+esac
+
# In case of cygwin, override LN_S, irrespective of what it determines.
# The build uses cygwin, but the actual runtime doesn't.
case $host_os in
@@ -105,22 +111,6 @@ case "$host" in
if test "x$host" == "x$build" -a "x$host" == "x$target"; then
AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32])
fi
- #
- # gcc-3/g++-3 are from the gcc-core/gcc-g++ cygwin packages.
- # Other gcc packages will not work:
- # - the gcc-4 packages no longer support -mno-cygwin
- # - the mingw-gcc packages produce executables which depends on a libgcc<...>
- # dll, which means we would have to distribute that file too.
- #
- if test "x$CC" != "x"; then
- AC_ERROR(Don't set CC. mono can only be compiled with gcc-3 from the 'gcc-core' package)
- fi
- CC="gcc-3.exe -mno-cygwin -g"
- CXX="g++-3.exe -mno-cygwin -g"
- # So libgc configure gets -mno-cygwin
- export CC
- export CXX
- CFLAGS_FOR_EGLIB="$CFLAGS_FOR_EGLIB -mno-cygwin"
else
target_win32=yes
AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32/MinGW])
@@ -130,8 +120,8 @@ case "$host" in
# Windows 2000 is required that includes Internet Explorer 5.01
CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024"
LDFLAGS="$LDFLAGS -lmswsock -lws2_32 -lole32 -loleaut32 -lpsapi -lversion -ladvapi32 -lwinmm -lkernel32"
- libmono_cflags="-mno-cygwin -mms-bitfields -mwindows"
- libmono_ldflags="-mno-cygwin -mms-bitfields -mwindows"
+ libmono_cflags="-mms-bitfields -mwindows"
+ libmono_ldflags="-mms-bitfields -mwindows"
libdl=
libgc_threads=win32
gc_default=included
@@ -325,10 +315,10 @@ case "$host" in
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC $BROKEN_DARWIN_FLAGS"
CPPFLAGS_FOR_EGLIB="$CPPFLAGS_FOR_EGLIB $BROKEN_DARWIN_CPPFLAGS"
CFLAGS_FOR_EGLIB="$CFLAGS_FOR_EGLIB $BROKEN_DARWIN_FLAGS"
- extra_runtime_ldflags="-stack_size,0x800000"
+ extra_runtime_ldflags="-Xlinker -stack_size -Xlinker 0x800000"
;;
x*64-*-darwin*)
- extra_runtime_ldflags="-stack_size,0x800000"
+ extra_runtime_ldflags="-Xlinker -stack_size -Xlinker 0x800000"
;;
arm*-darwin*)
has_dtrace=no
@@ -373,6 +363,7 @@ AC_PROG_CXX
AM_PROG_AS
AC_PROG_INSTALL
AC_PROG_AWK
+AM_PROG_CC_C_O
dnl We should use AM_PROG_AS, but it's not available on automake/aclocal 1.4
: ${CCAS='$(CC)'}
# Set ASFLAGS if not already set.
@@ -491,6 +482,12 @@ AC_TRY_LINK([#include <math.h>], [
# We'll have to use signals
AC_MSG_RESULT(no)
])
+# mingw
+AC_CHECK_FUNCS(_finite, , AC_MSG_CHECKING(for _finite in math.h)
+ AC_TRY_LINK([#include <math.h>],
+ [ _finite(0.0); ],
+ AC_DEFINE(HAVE__FINITE, 1, [Have _finite in -lm]) AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no)))
# for Linux statfs support
AC_CHECK_HEADERS(linux/magic.h)
@@ -1037,6 +1034,11 @@ case "x$gc" in
BOEHM_DEFINES="-DHAVE_BOEHM_GC -DHAVE_GC_H -DUSE_INCLUDED_LIBGC -DHAVE_GC_GCJ_MALLOC -DHAVE_GC_ENABLE"
+ if test x$target_win32 = xyes; then
+ BOEHM_DEFINES="$BOEHM_DEFINES -DGC_NOT_DLL"
+ CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DGC_BUILD -DGC_NOT_DLL"
+ fi
+
gc_msg="bundled Boehm GC with typed GC"
if test x$enable_parallel_mark = xyes; then
AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "Included Boehm (with typed GC and Parallel Mark)", [GC description])
@@ -1150,6 +1152,8 @@ if test x$target_win32 = xno; then
AC_CHECK_HEADERS(execinfo.h)
+ AC_CHECK_HEADERS(sys/auxv.h)
+
AC_CHECK_FUNCS(getgrgid_r)
AC_CHECK_FUNCS(getgrnam_r)
AC_CHECK_FUNCS(getpwnam_r)
@@ -1581,8 +1585,14 @@ if test x$target_win32 = xno; then
AC_MSG_CHECKING(for working __thread)
if test "x$with_tls" != "x__thread"; then
AC_MSG_RESULT(disabled)
+ elif test "x$cross_compiling" = "xyes"; then
+ AC_MSG_RESULT(cross compiling, assuming yes)
else
AC_TRY_RUN([
+ #if defined(__APPLE__) && defined(__clang__)
+ #error "__thread does not currently work with clang on Mac OS X"
+ #endif
+
#include <pthread.h>
__thread int i;
static int res1, res2;
@@ -1624,6 +1634,8 @@ if test x$target_win32 = xno; then
AC_MSG_CHECKING(for working sigaltstack)
if test "x$with_sigaltstack" != "xyes"; then
AC_MSG_RESULT(disabled)
+ elif test "x$cross_compiling" = "xyes"; then
+ AC_MSG_RESULT(cross compiling, assuming yes)
else
AC_TRY_RUN([
#include <stdio.h>
@@ -2119,6 +2131,11 @@ else
])
])
AC_CHECK_FUNCS(GetProcessId)
+ AC_CHECK_DECLS(InterlockedExchange64, [], [], [[#include <windows.h>]])
+ AC_CHECK_DECLS(InterlockedCompareExchange64, [], [], [[#include <windows.h>]])
+ AC_CHECK_DECLS(InterlockedIncrement64, [], [], [[#include <windows.h>]])
+ AC_CHECK_DECLS(InterlockedAdd, [], [], [[#include <windows.h>]])
+ AC_CHECK_DECLS(InterlockedAdd64, [], [], [[#include <windows.h>]])
fi
dnl socklen_t check
@@ -2361,11 +2378,21 @@ dnl **************
AC_ARG_ENABLE(llvm,[ --enable-llvm Enable the LLVM back-end], enable_llvm=$enableval, enable_llvm=no)
AC_ARG_ENABLE(loadedllvm,[ --enable-loadedllvm Load the LLVM back-end dynamically], enable_llvm=$enableval && enable_loadedllvm=$enableval, enable_loadedllvm=no)
+AC_ARG_ENABLE(llvm-version-check,[ --enable-llvm-version-check Check that the LLVM matches the version expected by mono], enable_llvm_version_check=$enableval, enable_llvm_version_check=no)
+
+AC_ARG_WITH(llvm, [ --with-llvm=<llvm prefix> Enable the LLVM back-end], enable_llvm=yes,)
if test "x$enable_llvm" = "xyes"; then
- AC_PATH_PROG(LLVM_CONFIG, llvm-config, no)
- if test "x$LLVM_CONFIG" = "xno"; then
- AC_MSG_ERROR([llvm-config not found.])
+ if test "x$with_llvm" != "x"; then
+ LLVM_CONFIG=$with_llvm/bin/llvm-config
+ if test ! -x $LLVM_CONFIG; then
+ AC_MSG_ERROR([LLVM executable $LLVM_CONFIG not found.])
+ fi
+ else
+ AC_PATH_PROG(LLVM_CONFIG, llvm-config, no)
+ if test "x$LLVM_CONFIG" = "xno"; then
+ AC_MSG_ERROR([llvm-config not found.])
+ fi
fi
llvm_codegen="x86codegen"
@@ -2375,16 +2402,22 @@ if test "x$enable_llvm" = "xyes"; then
;;
esac
-
# The output of --cflags seems to include optimizations flags too
LLVM_CFLAGS=`$LLVM_CONFIG --cflags | sed -e 's/-O2//g' | sed -e 's/-O0//g' | sed -e 's/-fomit-frame-pointer//g' | sed -e 's/-fPIC//g'`
# LLVM is compiled with -fno-rtti, so we need this too, since our classes inherit
# from LLVM classes.
LLVM_CXXFLAGS="`$LLVM_CONFIG --cxxflags` -fno-rtti"
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
- LLVM_LIBS=`$LLVM_CONFIG --libs core bitwriter jit mcjit $llvm_codegen`
+ if test "x$host" != "x$target"; then
+ # No need for jit libs
+ LLVM_LIBS=`$LLVM_CONFIG --libs core bitwriter`
+ else
+ LLVM_LIBS=`$LLVM_CONFIG --libs core bitwriter jit mcjit $llvm_codegen`
+ fi
LLVM_LIBS="$LLVM_LDFLAGS $LLVM_LIBS -lstdc++"
+ expected_llvm_version="3.3svn-mono/2c9642d"
+
# Should be something like '2.6' or '2.7svn'
llvm_version=`$LLVM_CONFIG --version`
major_version=`echo $llvm_version | cut -c 1`
@@ -2394,6 +2427,11 @@ if test "x$enable_llvm" = "xyes"; then
if echo $llvm_version | grep -q 'mono'; then
AC_DEFINE(LLVM_MONO_BRANCH, 1, [Whenever we are using the mono branch of LLVM])
LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_MONO_BRANCH"
+ if test "x$enable_llvm_version_check" == "xyes"; then
+ if test "$llvm_version" != "$expected_llvm_version"; then
+ AC_MSG_ERROR([Expected llvm version $expected_llvm_version, but llvm-config --version returned $llvm_version"])
+ fi
+ fi
else
AC_MSG_ERROR([Compiling with stock LLVM is not supported, please use the Mono LLVM repo at https://github.com/mono/llvm, with the GIT branch which matches this version of mono, i.e. 'mono-2-10' for Mono 2.10.])
fi
@@ -2436,10 +2474,6 @@ jit_wanted=true
interp_wanted=false
sgen_supported=false
case "$host" in
-# mips-sgi-irix5.* | mips-sgi-irix6.*)
-# TARGET=MIPS;
-# ACCESS_UNALIGNED="no"
-# ;;
mips*)
TARGET=MIPS;
arch_target=mips;
@@ -2486,7 +2520,7 @@ case "$host" in
have_visibility_hidden=no
sgen_supported=true
;;
- cygwin*)
+ mingw*|cygwin*)
sgen_supported=true
have_visibility_hidden=no
;;
@@ -2592,9 +2626,9 @@ case "$host" in
arch_target=arm;
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
- CPPFLAGS="$CPPFLAGS -D__ARM_EABI__ -DHAVE_ARMV6=1"
+ CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
# libgc's gc_locks.h depends on this
- CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DHAVE_ARMV6"
+ CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC"
sgen_supported=true
;;
arm*-linux*)
@@ -2616,7 +2650,7 @@ case "$host" in
# AOT_SUPPORTED="no"
# ;;
s390x-*-linux*)
- TARGET=S390x;
+ TARGET=S390X;
arch_target=s390x;
ACCESS_UNALIGNED="yes"
JIT_SUPPORTED=yes
@@ -2636,7 +2670,7 @@ if test "x$host" != "x$target"; then
arch_target=arm;
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
- CPPFLAGS="$CPPFLAGS -D__ARM_EABI__ -DHAVE_ARMV6=1"
+ CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
jit_wanted=true
# Can't use tls, since it depends on the runtime detection of tls offsets
# in mono-compiler.h
@@ -2725,7 +2759,6 @@ if test "x$host" != "x$target"; then
esac
fi
-# FIXME: Define the others as well
case "$TARGET" in
X86)
AC_DEFINE(TARGET_X86, 1, [...])
@@ -2743,14 +2776,32 @@ POWERPC64)
AC_DEFINE(TARGET_POWERPC, 1, [...])
AC_DEFINE(TARGET_POWERPC64, 1, [...])
;;
-S390x)
+S390X)
AC_DEFINE(TARGET_S390X, 1, [...])
;;
MIPS)
AC_DEFINE(TARGET_MIPS, 1, [...])
;;
+IA64)
+ AC_DEFINE(TARGET_IA64, 1, [...])
+ ;;
+SPARC)
+ AC_DEFINE(TARGET_SPARC, 1, [...])
+ ;;
+SPARC64)
+ AC_DEFINE(TARGET_SPARC64, 1, [...])
+ ;;
esac
+dnl Use GCC atomic ops if they work on the target.
+if test x$GCC = "xyes"; then
+ case $TARGET in
+ X86 | AMD64 | ARM | POWERPC | POWERPC64 | MIPS | S390X | SPARC | SPARC64)
+ AC_DEFINE(USE_GCC_ATOMIC_OPS, 1, [...])
+ ;;
+ esac
+fi
+
if test "x$target_mach" = "xyes"; then
if test "x$TARGET" = "xARM"; then
AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
@@ -3035,18 +3086,54 @@ if test ${TARGET} = ARM; then
CPPFLAGS="$CPPFLAGS -DARM_FPU_$fpu=1"
unset fpu
- if test x$cross_compiling = xno; then
- AC_MSG_CHECKING(for ARMV6)
- AC_TRY_RUN([
- int main () { __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory"); return 0; }
- ], armv6=yes, armv6=no)
-
- AC_MSG_RESULT($armv6)
- if test ${armv6} = yes; then
- AC_DEFINE(HAVE_ARMV6, 1, "Host supports ARMV6 instructions")
- # libgc's gc_locks.h depends on this
- CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DHAVE_ARMV6"
- fi
+ dnl *********************************************
+ dnl *** Check which ARM version(s) we can use ***
+ dnl *********************************************
+ AC_MSG_CHECKING(which ARM version to use)
+
+ AC_TRY_COMPILE([], [
+ #if !defined(__ARM_ARCH_5T__) && !defined(__ARM_ARCH_5TE__) && !defined(__ARM_ARCH_5TEJ__)
+ #error Not on ARM v5.
+ #endif
+ return 0;
+ ], [
+ arm_v5=yes
+ ], [])
+
+ AC_TRY_COMPILE([], [
+ #if !defined(__ARM_ARCH_6J__) && !defined(__ARM_ARCH_6ZK__) && !defined(__ARM_ARCH_6K__) && !defined(__ARM_ARCH_6T2__) && !defined(__ARM_ARCH_6M__)
+ #error Not on ARM v6.
+ #endif
+ return 0;
+ ], [
+ arm_v5=yes
+ arm_v6=yes
+ ], [])
+
+ AC_TRY_COMPILE([], [
+ #if !defined(__ARM_ARCH_7A__) && !defined(__ARM_ARCH_7R__) && !defined(__ARM_ARCH_7EM__) && !defined(__ARM_ARCH_7M__) && !defined(__ARM_ARCH_7S__)
+ #error Not on ARM v7.
+ #endif
+ return 0;
+ ], [
+ arm_v5=yes
+ arm_v6=yes
+ arm_v7=yes
+ ], [])
+
+ if test x$arm_v5 = xyes; then
+ AC_DEFINE(HAVE_ARMV5, 1, [ARM v5])
+ CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DHAVE_ARMV5=1"
+ fi
+
+ if test x$arm_v6 = xyes; then
+ AC_DEFINE(HAVE_ARMV6, 1, [ARM v6])
+ CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DHAVE_ARMV6=1"
+ fi
+
+ if test x$arm_v7 = xyes; then
+ AC_DEFINE(HAVE_ARMV7, 1, [ARM v7])
+ CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DHAVE_ARMV7=1"
fi
fi
@@ -3127,20 +3214,6 @@ if test x$with_profile4 != xyes; then
DISABLE_MCS_DOCS=yes
fi
-MOONLIGHT_DEFINES=
-AC_ARG_WITH(moonlight, [ --with-moonlight=yes|no|only If you want to build Mono for Moonlight (defaults to no)],[
- if test x$with_moonlight != xno; then
- MOONLIGHT_DEFINES="-DMOONLIGHT -DDISABLE_ASSEMBLY_REMAPPING "
- fi
-], [with_moonlight=no])
-AC_SUBST(MOONLIGHT_DEFINES)
-
-AC_ARG_WITH(moon_gc, [ --with-moon-gc=boehm,sgen Select the gc to use with Moonlight (defaults to boehm)],[
- if test "x$with_moon_gc" != "xsgen"; then
- with_moon_gc=boehm
- fi
-], [with_moon_gc=boehm])
-
AC_ARG_WITH(lazy_gc_thread_creation, [ --with-lazy-gc-thread-creation=yes|no Enable lazy runtime thread creation, embedding host must do it explicitly (defaults to no)],[
if test x$with_lazy_gc_thread_creation != xno ; then
AC_DEFINE(LAZY_GC_THREAD_CREATION,1,[Enable lazy gc thread creation by the embedding host.])
@@ -3164,7 +3237,11 @@ fi
if test "x$enable_shared" = "xno" -a "x$enable_executables" = "xyes"; then
LIBMONO_LA=libmini-static.la
else
- LIBMONO_LA=libmonosgen-$API_VER.la
+ if test x$buildsgen = xyes; then
+ LIBMONO_LA=libmonosgen-$API_VER.la
+ else
+ LIBMONO_LA=libmonoboehm-$API_VER.la
+ fi
fi
AC_SUBST(LIBMONO_LA)
@@ -3196,12 +3273,6 @@ AC_SUBST(OPROFILE_LIBS)
libmono_ldflags="$libmono_ldflags $LIBS"
-AM_CONDITIONAL(MOONLIGHT, [test "x$with_moonlight" != "xno"])
-
-AM_CONDITIONAL(ONLY_MOONLIGHT, [test "x$with_moonlight" = "xonly"])
-AM_CONDITIONAL(MOONLIGHT_BOEHM, [test "x$with_moon_gc" = "xboehm"])
-AM_CONDITIONAL(MOONLIGHT_SGEN, [test "x$with_moon_gc" = "xsgen"])
-
AM_CONDITIONAL(INSTALL_2_0, [test "x$with_profile2" = xyes])
AM_CONDITIONAL(INSTALL_4_0, [test "x$with_profile4" = xyes])
AM_CONDITIONAL(INSTALL_4_5, [test "x$with_profile4_5" = xyes])
@@ -3217,12 +3288,11 @@ AM_CONDITIONAL(SPARC64, test x$TARGET = xSPARC64)
AM_CONDITIONAL(X86, test x$TARGET = xX86)
AM_CONDITIONAL(AMD64, test x$TARGET = xAMD64)
AM_CONDITIONAL(IA64, test x$TARGET = xIA64)
-AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS)
AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
AM_CONDITIONAL(POWERPC64, test x$TARGET = xPOWERPC64)
AM_CONDITIONAL(ARM, test x$TARGET = xARM)
-AM_CONDITIONAL(S390x, test x$TARGET = xS390x)
+AM_CONDITIONAL(S390X, test x$TARGET = xS390X)
AM_CONDITIONAL(HOST_X86, test x$HOST = xX86)
AM_CONDITIONAL(HOST_AMD64, test x$HOST = xAMD64)
AM_CONDITIONAL(HOST_ARM, test x$HOST = xARM)
@@ -3336,7 +3406,35 @@ AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/Browsers/Compat.browser],
$ac_aux_dir/install-sh -d runtime/etc/mono/2.0/Browsers/
cd runtime/etc/mono/2.0/Browsers
rm -f Compat.browser
- $LN_S $reldir/data/net_2_0/Browsers/Compat.browser Compat.browser
+ $LN_S $reldir/data/Browsers/Compat.browser Compat.browser
+ cd $depth
+],[LN_S='$LN_S'])
+
+AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/Browsers/Compat.browser],
+[ depth=../../../../..
+ case $srcdir in
+ [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
+ .) reldir=$depth ;;
+ *) reldir=$depth/$srcdir ;;
+ esac
+ $ac_aux_dir/install-sh -d runtime/etc/mono/4.0/Browsers/
+ cd runtime/etc/mono/4.0/Browsers
+ rm -f Compat.browser
+ $LN_S $reldir/data/Browsers/Compat.browser Compat.browser
+ cd $depth
+],[LN_S='$LN_S'])
+
+AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/Browsers/Compat.browser],
+[ depth=../../../../..
+ case $srcdir in
+ [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
+ .) reldir=$depth ;;
+ *) reldir=$depth/$srcdir ;;
+ esac
+ $ac_aux_dir/install-sh -d runtime/etc/mono/4.5/Browsers/
+ cd runtime/etc/mono/4.5/Browsers
+ rm -f Compat.browser
+ $LN_S $reldir/data/Browsers/Compat.browser Compat.browser
cd $depth
],[LN_S='$LN_S'])
@@ -3444,6 +3542,8 @@ data/net_2_0/Makefile
data/net_4_0/Makefile
data/net_4_5/Makefile
data/net_2_0/Browsers/Makefile
+data/net_4_0/Browsers/Makefile
+data/net_4_5/Browsers/Makefile
data/mint.pc
data/mono-2.pc
data/monosgen-2.pc
@@ -3558,10 +3658,6 @@ fi
echo "DISABLE_MCS_DOCS = yes" >> $mcs_topdir/build/config.make
fi
- if test x$with_moonlight != xno; then
- echo "MOONLIGHT = 1" >> $srcdir/$mcsdir/build/config.make
- fi
-
if test x$has_extension_module != xno; then
echo "EXTENSION_MODULE = 1" >> $srcdir/$mcsdir/build/config.make
fi
diff --git a/data/net_2_0/Browsers/.gitattributes b/data/Browsers/.gitattributes
index 6b8861b0555..6b8861b0555 100644
--- a/data/net_2_0/Browsers/.gitattributes
+++ b/data/Browsers/.gitattributes
diff --git a/data/net_2_0/Browsers/ChangeLog b/data/Browsers/ChangeLog
index 26785e377c4..26785e377c4 100644
--- a/data/net_2_0/Browsers/ChangeLog
+++ b/data/Browsers/ChangeLog
diff --git a/data/net_2_0/Browsers/Compat.browser b/data/Browsers/Compat.browser
index 9950c71c5f0..9950c71c5f0 100644
--- a/data/net_2_0/Browsers/Compat.browser
+++ b/data/Browsers/Compat.browser
diff --git a/data/config.in b/data/config.in
index 1faae012ef2..32e075a3856 100644
--- a/data/config.in
+++ b/data/config.in
@@ -26,6 +26,6 @@
<dllentry dll="__Internal" name="MoveMemory" target="mono_win32_compat_MoveMemory"/>
<dllentry dll="__Internal" name="ZeroMemory" target="mono_win32_compat_ZeroMemory"/>
</dllmap>
- <dllmap dll="gdiplus" target="@prefix@/lib/libgdiplus@libsuffix@" />
- <dllmap dll="gdiplus.dll" target="@prefix@/lib/libgdiplus@libsuffix@" />
+ <dllmap dll="gdiplus" target="@prefix@/lib/libgdiplus@libsuffix@" os="!windows"/>
+ <dllmap dll="gdiplus.dll" target="@prefix@/lib/libgdiplus@libsuffix@" os="!windows"/>
</configuration>
diff --git a/data/net_2_0/Browsers/Makefile.am b/data/net_2_0/Browsers/Makefile.am
index 4d5b8c9c56b..ed00678b164 100644
--- a/data/net_2_0/Browsers/Makefile.am
+++ b/data/net_2_0/Browsers/Makefile.am
@@ -1,6 +1,6 @@
monodir = $(sysconfdir)/mono/2.0/Browsers
-EXTRA_DIST = Compat.browser
+EXTRA_DIST = ../../Browsers/Compat.browser
-mono_DATA = Compat.browser
+mono_DATA = ../../Browsers/Compat.browser
diff --git a/data/net_4_0/Browsers/.gitignore b/data/net_4_0/Browsers/.gitignore
new file mode 100644
index 00000000000..b336cc7cec9
--- /dev/null
+++ b/data/net_4_0/Browsers/.gitignore
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/data/net_4_0/Browsers/Makefile.am b/data/net_4_0/Browsers/Makefile.am
new file mode 100644
index 00000000000..0940002cb62
--- /dev/null
+++ b/data/net_4_0/Browsers/Makefile.am
@@ -0,0 +1,6 @@
+monodir = $(sysconfdir)/mono/4.0/Browsers
+
+EXTRA_DIST = ../../Browsers/Compat.browser
+
+mono_DATA = ../../Browsers/Compat.browser
+
diff --git a/data/net_4_0/Makefile.am b/data/net_4_0/Makefile.am
index 9ca4996f8b2..31727c5910b 100644
--- a/data/net_4_0/Makefile.am
+++ b/data/net_4_0/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS =
+SUBDIRS = Browsers
monodir = $(sysconfdir)/mono/4.0
diff --git a/data/net_4_5/Browsers/.gitignore b/data/net_4_5/Browsers/.gitignore
new file mode 100644
index 00000000000..b336cc7cec9
--- /dev/null
+++ b/data/net_4_5/Browsers/.gitignore
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/data/net_4_5/Browsers/Makefile.am b/data/net_4_5/Browsers/Makefile.am
new file mode 100644
index 00000000000..a2348293401
--- /dev/null
+++ b/data/net_4_5/Browsers/Makefile.am
@@ -0,0 +1,6 @@
+monodir = $(sysconfdir)/mono/4.5/Browsers
+
+EXTRA_DIST = ../../Browsers/Compat.browser
+
+mono_DATA = ../../Browsers/Compat.browser
+
diff --git a/data/net_4_5/Makefile.am b/data/net_4_5/Makefile.am
index c45989c15e0..bfe4ac6a7b4 100644
--- a/data/net_4_5/Makefile.am
+++ b/data/net_4_5/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS =
+SUBDIRS = Browsers
monodir = $(sysconfdir)/mono/4.5
diff --git a/docs/current-api b/docs/current-api
index d0efffcaba0..1bbddca6123 100644
--- a/docs/current-api
+++ b/docs/current-api
@@ -307,6 +307,7 @@ mono_gc_out_of_memory
mono_gc_wbarrier_arrayref_copy
mono_gc_wbarrier_generic_nostore
mono_gc_wbarrier_generic_store
+mono_gc_wbarrier_generic_store_atomic
mono_gc_wbarrier_object_copy
mono_gc_wbarrier_set_arrayref
mono_gc_wbarrier_set_field
diff --git a/docs/public-api b/docs/public-api
index 082bfd9fdd1..231ecf171a9 100644
--- a/docs/public-api
+++ b/docs/public-api
@@ -307,6 +307,7 @@ mono_gc_out_of_memory
mono_gc_wbarrier_arrayref_copy
mono_gc_wbarrier_generic_nostore
mono_gc_wbarrier_generic_store
+mono_gc_wbarrier_generic_store_atomic
mono_gc_wbarrier_object_copy
mono_gc_wbarrier_set_arrayref
mono_gc_wbarrier_set_field
diff --git a/eglib/src/gfile-posix.c b/eglib/src/gfile-posix.c
index d52ad948802..49ee58a142f 100644
--- a/eglib/src/gfile-posix.c
+++ b/eglib/src/gfile-posix.c
@@ -156,7 +156,7 @@ g_get_current_dir (void)
{
#ifdef __native_client__
char *buffer;
- if ((buffer = getenv("NACL_PWD"))) {
+ if ((buffer = g_getenv("NACL_PWD"))) {
buffer = g_strdup(buffer);
} else {
buffer = g_strdup(".");
diff --git a/eglib/src/gfile-win32.c b/eglib/src/gfile-win32.c
index 6a4bbefb1d3..a2e41ea9f68 100644
--- a/eglib/src/gfile-win32.c
+++ b/eglib/src/gfile-win32.c
@@ -61,6 +61,7 @@ int mkstemp (char *tmp_template)
fd = _wopen( utf16_template, _O_BINARY | _O_CREAT /*| _O_TEMPORARY*/ | _O_EXCL, _S_IREAD | _S_IWRITE);
}
+ /* FIXME: this will crash if utf16_template == NULL */
sprintf (tmp_template + strlen (tmp_template) - 6, "%S", utf16_template + wcslen (utf16_template) - 6);
g_free (utf16_template);
diff --git a/eglib/src/giconv.c b/eglib/src/giconv.c
index 9fe0edd3324..61db988909b 100644
--- a/eglib/src/giconv.c
+++ b/eglib/src/giconv.c
@@ -174,14 +174,34 @@ gsize
g_iconv (GIConv cd, gchar **inbytes, gsize *inbytesleft,
gchar **outbytes, gsize *outbytesleft)
{
- size_t inleft, outleft;
+ gsize inleft, outleft;
char *inptr, *outptr;
gunichar c;
int rc = 0;
#ifdef HAVE_ICONV
- if (cd->cd != (iconv_t) -1)
- return iconv (cd->cd, inbytes, inbytesleft, outbytes, outbytesleft);
+ if (cd->cd != (iconv_t) -1) {
+ /* Note: gsize may have a different size than size_t, so we need to
+ remap inbytesleft and outbytesleft to size_t's. */
+ size_t *outleftptr, *inleftptr;
+ size_t n_outleft, n_inleft;
+
+ if (inbytesleft) {
+ n_inleft = *inbytesleft;
+ inleftptr = &n_inleft;
+ } else {
+ inleftptr = NULL;
+ }
+
+ if (outbytesleft) {
+ n_outleft = *outbytesleft;
+ outleftptr = &n_outleft;
+ } else {
+ outleftptr = NULL;
+ }
+
+ return iconv (cd->cd, inbytes, inleftptr, outbytes, outleftptr);
+ }
#endif
if (outbytes == NULL || outbytesleft == NULL) {
@@ -640,7 +660,7 @@ gchar *
g_convert (const gchar *str, gssize len, const gchar *to_charset, const gchar *from_charset,
gsize *bytes_read, gsize *bytes_written, GError **err)
{
- size_t outsize, outused, outleft, inleft, grow, rc;
+ gsize outsize, outused, outleft, inleft, grow, rc;
char *result, *outbuf, *inbuf;
gboolean flush = FALSE;
gboolean done = FALSE;
@@ -676,7 +696,7 @@ g_convert (const gchar *str, gssize len, const gchar *to_charset, const gchar *f
else
rc = g_iconv (cd, NULL, NULL, &outbuf, &outleft);
- if (rc == (size_t) -1) {
+ if (rc == (gsize) -1) {
switch (errno) {
case E2BIG:
/* grow our result buffer */
@@ -901,7 +921,7 @@ eg_utf8_to_utf16_general (const gchar *str, glong len, glong *items_read, glong
size_t inleft;
char *inptr;
gunichar c;
- int n;
+ int u, n;
g_return_val_if_fail (str != NULL, NULL);
@@ -910,6 +930,7 @@ eg_utf8_to_utf16_general (const gchar *str, glong len, glong *items_read, glong
g_set_error (err, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED, "Conversions with embedded nulls must pass the string length");
return NULL;
}
+
len = strlen (str);
}
@@ -917,29 +938,18 @@ eg_utf8_to_utf16_general (const gchar *str, glong len, glong *items_read, glong
inleft = len;
while (inleft > 0) {
- if ((n = decode_utf8 (inptr, inleft, &c)) < 0) {
- if (errno == EILSEQ) {
- g_set_error (err, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
- "Illegal byte sequence encounted in the input.");
- } else if (items_read) {
- /* partial input is ok if we can let our caller know... */
- break;
- } else {
- g_set_error (err, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT,
- "Partial byte sequence encountered in the input.");
- }
-
- if (items_read)
- *items_read = inptr - str;
-
- if (items_written)
- *items_written = 0;
-
- return NULL;
- } else if (c == 0 && !include_nuls)
+ if ((n = decode_utf8 (inptr, inleft, &c)) < 0)
+ goto error;
+
+ if (c == 0 && !include_nuls)
break;
- outlen += g_unichar_to_utf16 (c, NULL);
+ if ((u = g_unichar_to_utf16 (c, NULL)) < 0) {
+ errno = EILSEQ;
+ goto error;
+ }
+
+ outlen += u;
inleft -= n;
inptr += n;
}
@@ -957,7 +967,8 @@ eg_utf8_to_utf16_general (const gchar *str, glong len, glong *items_read, glong
while (inleft > 0) {
if ((n = decode_utf8 (inptr, inleft, &c)) < 0)
break;
- else if (c == 0 && !include_nuls)
+
+ if (c == 0 && !include_nuls)
break;
outptr += g_unichar_to_utf16 (c, outptr);
@@ -968,6 +979,25 @@ eg_utf8_to_utf16_general (const gchar *str, glong len, glong *items_read, glong
*outptr = '\0';
return outbuf;
+
+ error:
+ if (errno == EILSEQ) {
+ g_set_error (err, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+ "Illegal byte sequence encounted in the input.");
+ } else if (items_read) {
+ /* partial input is ok if we can let our caller know... */
+ } else {
+ g_set_error (err, G_CONVERT_ERROR, G_CONVERT_ERROR_PARTIAL_INPUT,
+ "Partial byte sequence encountered in the input.");
+ }
+
+ if (items_read)
+ *items_read = inptr - str;
+
+ if (items_written)
+ *items_written = 0;
+
+ return NULL;
}
gunichar2 *
diff --git a/eglib/src/gmodule-win32.c b/eglib/src/gmodule-win32.c
index 68d1619825c..24010b58915 100644
--- a/eglib/src/gmodule-win32.c
+++ b/eglib/src/gmodule-win32.c
@@ -141,6 +141,7 @@ g_module_error (void)
TCHAR* buf = NULL;
DWORD code = GetLastError ();
+ /* FIXME: buf must not be NULL! */
FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL,
code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, 0, NULL);
diff --git a/eglib/src/gstring.c b/eglib/src/gstring.c
index 9df5d73c28e..ba75789bc80 100644
--- a/eglib/src/gstring.c
+++ b/eglib/src/gstring.c
@@ -235,9 +235,8 @@ g_string_truncate (GString *string, gsize len)
g_return_val_if_fail (string != NULL, string);
/* Silent return */
- if (len < 0 || len >= string->len) {
+ if (len >= string->len)
return string;
- }
string->len = len;
string->str[len] = 0;
diff --git a/external/cecil b/external/cecil
-Subproject 54e0a50464edbc254b39ea3c885ee91ada73070
+Subproject 89cfb1d4079002394010fd351628ad057c94422
diff --git a/external/ikvm b/external/ikvm
-Subproject 10b8312c8024111780ee382688cd4c8754b1f1a
+Subproject c02349ea22f33a8658170b89796bd70ba81563b
diff --git a/libgc/alloc.c b/libgc/alloc.c
index 9ec6992352a..b6bc1832c99 100644
--- a/libgc/alloc.c
+++ b/libgc/alloc.c
@@ -969,7 +969,7 @@ word n;
}
# endif
expansion_slop = WORDS_TO_BYTES(min_words_allocd()) + 4*MAXHINCR*HBLKSIZE;
- if (GC_last_heap_addr == 0 && !((word)space & SIGNB)
+ if ((GC_last_heap_addr == 0 && !((word)space & SIGNB))
|| (GC_last_heap_addr != 0 && GC_last_heap_addr < (ptr_t)space)) {
/* Assume the heap is growing up */
GC_greatest_plausible_heap_addr =
diff --git a/libgc/include/private/gc_locks.h b/libgc/include/private/gc_locks.h
index e95cec0b4c1..ba4fd185b9b 100644
--- a/libgc/include/private/gc_locks.h
+++ b/libgc/include/private/gc_locks.h
@@ -231,46 +231,12 @@
# define NACL_ALIGN()
# endif
inline static int GC_test_and_set(volatile unsigned int *addr) {
-#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7__)
- int ret, tmp;
- __asm__ __volatile__ (
- "1:\n"
- NACL_ALIGN()
- MASK_REGISTER("%3", "al")
- "ldrex %0, [%3]\n"
- MASK_REGISTER("%3", "al")
- "strex %1, %2, [%3]\n"
- "teq %1, #0\n"
- "bne 1b\n"
- : "=&r" (ret), "=&r" (tmp)
- : "r" (1), "r" (addr)
- : "memory", "cc");
- return ret;
-#else
- int oldval;
- /* SWP on ARM is very similar to XCHG on x86. Doesn't lock the
- * bus because there are no SMP ARM machines. If/when there are,
- * this code will likely need to be updated. */
- /* See linuxthreads/sysdeps/arm/pt-machine.h in glibc-2.1 */
- __asm__ __volatile__(MASK_REGISTER("%2", "al")
- "swp %0, %1, [%2]"
- : "=&r"(oldval)
- : "r"(1), "r"(addr)
- : "memory");
- return oldval;
-#endif
+ return (int) __sync_lock_test_and_set (addr, 1);
}
# define GC_TEST_AND_SET_DEFINED
inline static void GC_clear(volatile unsigned int *addr) {
-#ifdef HAVE_ARMV6
- /* Memory barrier */
-#ifdef __native_client__
- /* NaCl requires ARMv7 CPUs. */
- __asm__ __volatile__("dsb" : : : "memory");
-#else
- __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory");
-#endif
-#endif
+ __sync_synchronize ();
+
*(addr) = 0;
}
# define GC_CLEAR_DEFINED
diff --git a/libgc/obj_map.c b/libgc/obj_map.c
index 39993451cc7..49f6add1553 100644
--- a/libgc/obj_map.c
+++ b/libgc/obj_map.c
@@ -22,7 +22,7 @@
# include "private/gc_priv.h"
map_entry_type * GC_invalid_map = 0;
-static max_valid_offset = 0;
+static word max_valid_offset = 0;
/* Invalidate the object map associated with a block. Free blocks */
/* are identified by invalid maps. */
diff --git a/libgc/ptr_chck.c b/libgc/ptr_chck.c
index d83d730d343..621a45f0346 100644
--- a/libgc/ptr_chck.c
+++ b/libgc/ptr_chck.c
@@ -165,7 +165,7 @@ void (*GC_is_valid_displacement_print_proc) GC_PROTO((GC_PTR)) =
pdispl = HBLKDISPL(p);
map_entry = MAP_ENTRY((hhdr -> hb_map), pdispl);
if (map_entry == OBJ_INVALID
- || sz > MAXOBJBYTES && (ptr_t)p >= (ptr_t)h + sz) {
+ || (sz > MAXOBJBYTES && (ptr_t)p >= (ptr_t)h + sz)) {
goto fail;
}
return(p);
diff --git a/m4/po.m4 b/m4/po.m4
index 47f36a41a07..2c9532f0950 100644
--- a/m4/po.m4
+++ b/m4/po.m4
@@ -24,7 +24,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
[
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
- AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
AC_REQUIRE([AM_NLS])dnl
dnl Release version of the gettext macros. This is used to ensure that
diff --git a/man/mkbundle.1 b/man/mkbundle.1
index 82bfe132629..ed704b89d6a 100644
--- a/man/mkbundle.1
+++ b/man/mkbundle.1
@@ -124,7 +124,7 @@ gcc-mingw and as packages.
Assembler command. The default is "as".
.TP
.I "CC"
-C compiler command. The default is "cc" under Linux and "gcc -mno-cygwin"
+C compiler command. The default is "cc" under Linux and "gcc"
under Windows.
.TP
.I "MONO_BUNDLED_OPTIONS"
diff --git a/man/mono.1 b/man/mono.1
index bbb2e502533..dc1f2ceb2ac 100644
--- a/man/mono.1
+++ b/man/mono.1
@@ -418,7 +418,7 @@ the global assembly cache is always trusted.
.TP
\fB--server\fR
Configures the virtual machine to be better suited for server
-operations (currently, a no-op).
+operations (currently, allows a heavier threadpool initialization).
.TP
\fB--verify-all\fR
Verifies mscorlib and assemblies in the global
@@ -1628,6 +1628,10 @@ for example, to see managed frame names on gdb backtraces.
Enables the maximum JIT verbosity for the specified method. This is
very helpfull to diagnose a miscompilation problems of a specific
method.
+.TP
+\fBMONO_VERBOSE_HWCAP\fR
+If set, makes the JIT output information about detected CPU features
+(such as SSE, CMOV, FCMOV, etc) to stdout.
.SH VALGRIND
If you want to use Valgrind, you will find the file `mono.supp'
useful, it contains the suppressions for the GC which trigger
diff --git a/mcs/build/common/Consts.cs.in b/mcs/build/common/Consts.cs.in
index 0728b03dd20..8fd80480859 100644
--- a/mcs/build/common/Consts.cs.in
+++ b/mcs/build/common/Consts.cs.in
@@ -120,6 +120,7 @@ static class Consts
public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
+ public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
#elif NET_2_1
public const string AssemblySystem_Core = "System.Core, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
#elif NET_2_0
diff --git a/mcs/build/gensources.sh b/mcs/build/gensources.sh
index 153cba9f892..bc76b711d39 100644
--- a/mcs/build/gensources.sh
+++ b/mcs/build/gensources.sh
@@ -4,6 +4,7 @@ outfile=$1
incfile=$2
excfile=$3
extfile=$4
+extexcfile=$5
process_includes_1() {
sed -e '/^[ \t]*$/d' -e '/^[ \t]*#/d' $1 > $2
@@ -39,16 +40,24 @@ fi
sort -u $outfile.inc > $outfile.inc_s
rm -f $outfile.inc
-if test -z "$excfile"; then
- mv $outfile.inc_s $outfile
-else
+
+if test -n "$excfile"; then
process_includes $excfile $outfile.exc
+fi
- sort -u $outfile.exc > $outfile.exc_s
- rm -f $outfile.exc
+if test -n "$extexcfile"; then
+ process_includes $extexcfile $outfile.ext_exc
+ cat $outfile.ext_exc >> $outfile.exc
+ rm -f $outfile.ext_exc
+fi
+if test -f $outfile.exc; then
+ sort -u $outfile.exc > $outfile.exc_s
+ rm -f $outfile.exc
sort -m $outfile.inc_s $outfile.exc_s | uniq -u > $outfile
rm -f $outfile.inc_s $outfile.exc_s
+else
+ mv $outfile.inc_s $outfile
fi
diff --git a/mcs/build/library.make b/mcs/build/library.make
index 8c43d43d62c..fdd94d023f3 100644
--- a/mcs/build/library.make
+++ b/mcs/build/library.make
@@ -23,11 +23,18 @@ else
EXTENSION_include = $(wildcard $(PROFILE)_opt_$(LIBRARY).sources)
endif
+
+ifdef EXTENSION_MODULE
+EXTENSION_exclude = $(wildcard $(topdir)/../../mono-extensions/mcs/$(thisdir)/$(PROFILE)_$(LIBRARY).exclude.sources)
+else
+EXTENSION_exclude = $(wildcard $(PROFILE)_opt_$(LIBRARY).exclude.sources)
+endif
+
# Note, gensources.sh can create a $(sourcefile).makefrag if it sees any '#include's
# We don't include it in the dependencies since it isn't always created
$(sourcefile): $(PROFILE_sources) $(PROFILE_excludes) $(topdir)/build/gensources.sh $(EXTENSION_include)
@echo Creating the per profile list $@ ...
- $(SHELL) $(topdir)/build/gensources.sh $@ '$(PROFILE_sources)' '$(PROFILE_excludes)' '$(EXTENSION_include)'
+ $(SHELL) $(topdir)/build/gensources.sh $@ '$(PROFILE_sources)' '$(PROFILE_excludes)' '$(EXTENSION_include)' '$(EXTENSION_exclude)'
endif
PLATFORM_excludes := $(wildcard $(LIBRARY).$(PLATFORM)-excludes)
diff --git a/mcs/build/profiles/mobile_static.make b/mcs/build/profiles/mobile_static.make
new file mode 100644
index 00000000000..59505666ad7
--- /dev/null
+++ b/mcs/build/profiles/mobile_static.make
@@ -0,0 +1,20 @@
+#! -*- makefile -*-
+
+BOOTSTRAP_PROFILE = build
+
+BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
+MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
+
+# Use system resgen as we don't want local System.Windows.Forms dependency
+RESGEN = resgen2
+
+profile-check:
+ @:
+
+DEFAULT_REFERENCES = -r:mscorlib.dll
+PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE -d:FULL_AOT_RUNTIME -d:DISABLE_REMOTING -d:DISABLE_COM -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
+FRAMEWORK_VERSION = 2.1
+NO_TEST = yes
+
+# the tuner takes care of the install
+NO_INSTALL = yes
diff --git a/mcs/build/profiles/monotouch.make b/mcs/build/profiles/monotouch.make
index d49b255f861..b841a1027ae 100644
--- a/mcs/build/profiles/monotouch.make
+++ b/mcs/build/profiles/monotouch.make
@@ -12,9 +12,9 @@ profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
-PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE -d:MONOTOUCH -d:DISABLE_REMOTING -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
+PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE -d:MONOTOUCH -d:DISABLE_REMOTING -d:DISABLE_COM -d:FULL_AOT_RUNTIME -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 2.1
NO_TEST = yes
# the tuner takes care of the install
-NO_INSTALL = yes
+NO_INSTALL = yes \ No newline at end of file
diff --git a/mcs/build/profiles/monotouch_runtime.make b/mcs/build/profiles/monotouch_runtime.make
index 0cdda192847..9f82811018f 100644
--- a/mcs/build/profiles/monotouch_runtime.make
+++ b/mcs/build/profiles/monotouch_runtime.make
@@ -14,9 +14,9 @@ profile-check:
@:
DEFAULT_REFERENCES = -r:mscorlib.dll
-PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_3_0 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
+PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE -d:MONOTOUCH -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
-FRAMEWORK_VERSION = 4.5
+FRAMEWORK_VERSION = 2.1
# This is utility build only
NO_INSTALL = yes
diff --git a/mcs/build/rules.make b/mcs/build/rules.make
index d1d2832be4d..5ba208fb9f4 100644
--- a/mcs/build/rules.make
+++ b/mcs/build/rules.make
@@ -81,8 +81,14 @@ include $(topdir)/build/config-default.make
ifndef PLATFORM
ifeq ($(OS),Windows_NT)
+ifneq ($(V),)
+$(info *** Assuming PLATFORM is 'win32'.)
+endif
PLATFORM = win32
else
+ifneq ($(V),)
+$(info *** Assuming PLATFORM is 'linux'.)
+endif
PLATFORM = linux
endif
endif
diff --git a/mcs/class/Facades/Makefile b/mcs/class/Facades/Makefile
index 6d18c6c58a3..d78363314d8 100644
--- a/mcs/class/Facades/Makefile
+++ b/mcs/class/Facades/Makefile
@@ -1,23 +1,17 @@
+MCS_BUILD_DIR = ../../build
+
thisdir = class/Facades
-net_4_5_SUBDIRS = System.Runtime System.Linq System.Xml.XmlSerializer \
- System.ServiceModel.Primitives System.Xml.ReaderWriter System.Diagnostics.Debug \
- System.Runtime.Extensions System.Diagnostics.Tools System.Collections \
- System.ComponentModel.EventBasedAsync System.ComponentModel System.ObjectModel \
- System.Text.RegularExpressions System.Threading System.Runtime.InteropServices \
- System.Reflection System.Globalization System.IO System.Reflection.Primitives \
- System.Resources.ResourceManager System.Security.Principal System.Text.Encoding \
- System.Text.Encoding.Extensions System.Linq.Queryable System.Linq.Expressions \
- System.Net.Primitives System.Net.Requests System.Net.NetworkInformation \
- System.Runtime.Serialization.Primitives System.Runtime.Serialization.Xml \
- System.Runtime.Serialization.Json System.ServiceModel.Http \
- System.Xml.XDocument System.Threading.Tasks System.Diagnostics.Contracts \
- System.Dynamic.Runtime System.ComponentModel.Annotations System.Runtime.Numerics \
- System.Linq.Parallel System.Collections.Concurrent System.Threading.Tasks.Parallel \
- System.Reflection.Extensions
+monotouch_SUBDIRS = System.Collections.Concurrent System.Collections System.ComponentModel.Annotations System.ComponentModel.EventBasedAsync System.ComponentModel System.Diagnostics.Contracts System.Diagnostics.Debug System.Diagnostics.Tools System.Globalization System.IO System.Linq.Expressions System.Linq.Parallel System.Linq.Queryable System.Linq System.Net.NetworkInformation System.Net.Primitives System.Net.Requests System.ObjectModel System.Reflection.Extensions System.Reflection.Primitives System.Reflection System.Resources.ResourceManager System.Runtime.Extensions System.Runtime.InteropServices System.Runtime.Numerics System.Runtime.Serialization.Json System.Runtime.Serialization.Primitives System.Runtime.Serialization.Xml System.Runtime System.Security.Principal System.ServiceModel.Http System.ServiceModel.Primitives System.Text.Encoding.Extensions System.Text.Encoding System.Text.RegularExpressions System.Threading.Tasks.Parallel System.Threading.Tasks System.Threading System.Xml.ReaderWriter System.Xml.XDocument System.Xml.XmlSerializer
+
+net_4_5_SUBDIRS = $(monotouch_SUBDIRS) System.Dynamic.Runtime System.Reflection.Emit.ILGeneration System.Reflection.Emit.Lightweight System.Reflection.Emit
+
+monodroid_SUBDIRS = $(net_4_5_SUBDIRS)
SUBDIRS = $(net_4_5_SUBDIRS)
-include ../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
dist-local: dist-default
+
+
diff --git a/mcs/class/Facades/System.Collections.Concurrent/AssemblyInfo.cs b/mcs/class/Facades/System.Collections.Concurrent/AssemblyInfo.cs
index 685be8042b0..b14058779a3 100644
--- a/mcs/class/Facades/System.Collections.Concurrent/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Collections.Concurrent/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Collections.Concurrent.dll")]
[assembly: AssemblyDescription ("System.Collections.Concurrent.dll")]
[assembly: AssemblyDefaultAlias ("System.Collections.Concurrent.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Collections.Concurrent/Makefile b/mcs/class/Facades/System.Collections.Concurrent/Makefile
index bb8e26bca9e..d0e3fdf6086 100644
--- a/mcs/class/Facades/System.Collections.Concurrent/Makefile
+++ b/mcs/class/Facades/System.Collections.Concurrent/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Collections.Concurrent
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Collections.Concurrent.dll
-LIB_MCS_FLAGS = /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Collections.Concurrent/System.Collections.Concurrent.dll.sources b/mcs/class/Facades/System.Collections.Concurrent/System.Collections.Concurrent.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Collections.Concurrent/System.Collections.Concurrent.dll.sources
+++ b/mcs/class/Facades/System.Collections.Concurrent/System.Collections.Concurrent.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Collections.Concurrent/TypeForwarders.cs b/mcs/class/Facades/System.Collections.Concurrent/TypeForwarders.cs
index 4103861ffa5..662e4042950 100644
--- a/mcs/class/Facades/System.Collections.Concurrent/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Collections.Concurrent/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,15 +18,16 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Concurrent.BlockingCollection<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Concurrent.ConcurrentBag<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Concurrent.ConcurrentDictionary<,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Concurrent.IProducerConsumerCollection<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Concurrent.ConcurrentQueue<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Concurrent.ConcurrentStack<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Concurrent.Partitioner<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Concurrent.EnumerablePartitionerOptions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Concurrent.IProducerConsumerCollection<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Concurrent.OrderablePartitioner<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Concurrent.Partitioner))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Concurrent.EnumerablePartitionerOptions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Concurrent.Partitioner<>))]
diff --git a/mcs/class/Facades/System.Collections/AssemblyInfo.cs b/mcs/class/Facades/System.Collections/AssemblyInfo.cs
index a96857e7f76..e3f037ff8e8 100644
--- a/mcs/class/Facades/System.Collections/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Collections/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Collections.dll")]
[assembly: AssemblyDescription ("System.Collections.dll")]
[assembly: AssemblyDefaultAlias ("System.Collections.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Collections/Makefile b/mcs/class/Facades/System.Collections/Makefile
index 58797f283e2..7169319ecf7 100644
--- a/mcs/class/Facades/System.Collections/Makefile
+++ b/mcs/class/Facades/System.Collections/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Collections
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Collections.dll
-LIB_MCS_FLAGS = /r:System /r:System.Core
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System /r:System.Core
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Collections/System.Collections.dll.sources b/mcs/class/Facades/System.Collections/System.Collections.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Collections/System.Collections.dll.sources
+++ b/mcs/class/Facades/System.Collections/System.Collections.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Collections/TypeForwarders.cs b/mcs/class/Facades/System.Collections/TypeForwarders.cs
index 716fe5c71dc..9a2b8f18f67 100644
--- a/mcs/class/Facades/System.Collections/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Collections/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,18 +18,19 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.LinkedList<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.LinkedListNode<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.Queue<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.Stack<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.BitArray))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.Comparer<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.Dictionary<,>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.EqualityComparer<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.List<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.HashSet<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.LinkedList<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.LinkedListNode<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.List<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.Queue<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.SortedDictionary<,>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.SortedSet<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.Stack<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.StructuralComparisons))]
diff --git a/mcs/class/Facades/System.ComponentModel.Annotations/AssemblyInfo.cs b/mcs/class/Facades/System.ComponentModel.Annotations/AssemblyInfo.cs
index 8aa8cbcdc16..3ea660a30b0 100644
--- a/mcs/class/Facades/System.ComponentModel.Annotations/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.ComponentModel.Annotations/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.ComponentModel.Annotations.dll")]
[assembly: AssemblyDescription ("System.ComponentModel.Annotations.dll")]
[assembly: AssemblyDefaultAlias ("System.ComponentModel.Annotations.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.ComponentModel.Annotations/Makefile b/mcs/class/Facades/System.ComponentModel.Annotations/Makefile
index 2d9f7b1b404..c3bc1f9dc53 100644
--- a/mcs/class/Facades/System.ComponentModel.Annotations/Makefile
+++ b/mcs/class/Facades/System.ComponentModel.Annotations/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.ComponentModel.Annotations
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.ComponentModel.Annotations.dll
-LIB_MCS_FLAGS = /r:System.ComponentModel.DataAnnotations
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System.ComponentModel.DataAnnotations
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.ComponentModel.Annotations/System.ComponentModel.Annotations.dll.sources b/mcs/class/Facades/System.ComponentModel.Annotations/System.ComponentModel.Annotations.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.ComponentModel.Annotations/System.ComponentModel.Annotations.dll.sources
+++ b/mcs/class/Facades/System.ComponentModel.Annotations/System.ComponentModel.Annotations.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.ComponentModel.Annotations/TypeForwarders.cs b/mcs/class/Facades/System.ComponentModel.Annotations/TypeForwarders.cs
index 0bc80b3456a..e7c1feff498 100644
--- a/mcs/class/Facades/System.ComponentModel.Annotations/TypeForwarders.cs
+++ b/mcs/class/Facades/System.ComponentModel.Annotations/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,10 +18,10 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.AssociationAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.ConcurrencyCheckAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.ValidationAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.CustomValidationAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.DataType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.DataTypeAttribute))]
@@ -40,13 +35,14 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.RangeAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.RegularExpressionAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.RequiredAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.StringLengthAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.TimestampAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.UIHintAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.ValidationAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.ValidationContext))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.ValidationException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.ValidationResult))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.Validator))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption))]
diff --git a/mcs/class/Facades/System.ComponentModel.EventBasedAsync/AssemblyInfo.cs b/mcs/class/Facades/System.ComponentModel.EventBasedAsync/AssemblyInfo.cs
index 85cfdb9cc12..02d9d9307f4 100644
--- a/mcs/class/Facades/System.ComponentModel.EventBasedAsync/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.ComponentModel.EventBasedAsync/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.ComponentModel.EventBasedAsync.dll")]
[assembly: AssemblyDescription ("System.ComponentModel.EventBasedAsync.dll")]
[assembly: AssemblyDefaultAlias ("System.ComponentModel.EventBasedAsync.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.ComponentModel.EventBasedAsync/Makefile b/mcs/class/Facades/System.ComponentModel.EventBasedAsync/Makefile
index 479bd2000a4..acd577cbc3b 100644
--- a/mcs/class/Facades/System.ComponentModel.EventBasedAsync/Makefile
+++ b/mcs/class/Facades/System.ComponentModel.EventBasedAsync/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.ComponentModel.EventBasedAsync
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.ComponentModel.EventBasedAsync.dll
-LIB_MCS_FLAGS = /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.ComponentModel.EventBasedAsync/System.ComponentModel.EventBasedAsync.dll.sources b/mcs/class/Facades/System.ComponentModel.EventBasedAsync/System.ComponentModel.EventBasedAsync.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.ComponentModel.EventBasedAsync/System.ComponentModel.EventBasedAsync.dll.sources
+++ b/mcs/class/Facades/System.ComponentModel.EventBasedAsync/System.ComponentModel.EventBasedAsync.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.ComponentModel.EventBasedAsync/TypeForwarders.cs b/mcs/class/Facades/System.ComponentModel.EventBasedAsync/TypeForwarders.cs
index df5c85a6dac..eeef8ec2c5d 100644
--- a/mcs/class/Facades/System.ComponentModel.EventBasedAsync/TypeForwarders.cs
+++ b/mcs/class/Facades/System.ComponentModel.EventBasedAsync/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.AsyncCompletedEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.AsyncCompletedEventHandler))]
diff --git a/mcs/class/Facades/System.ComponentModel/AssemblyInfo.cs b/mcs/class/Facades/System.ComponentModel/AssemblyInfo.cs
index 828b771a275..944626f1d5d 100644
--- a/mcs/class/Facades/System.ComponentModel/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.ComponentModel/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.ComponentModel.dll")]
[assembly: AssemblyDescription ("System.ComponentModel.dll")]
[assembly: AssemblyDefaultAlias ("System.ComponentModel.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.ComponentModel/Makefile b/mcs/class/Facades/System.ComponentModel/Makefile
index 680660269dd..715e92db807 100644
--- a/mcs/class/Facades/System.ComponentModel/Makefile
+++ b/mcs/class/Facades/System.ComponentModel/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.ComponentModel
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.ComponentModel.dll
-LIB_MCS_FLAGS = /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.ComponentModel/System.ComponentModel.dll.sources b/mcs/class/Facades/System.ComponentModel/System.ComponentModel.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.ComponentModel/System.ComponentModel.dll.sources
+++ b/mcs/class/Facades/System.ComponentModel/System.ComponentModel.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.ComponentModel/TypeForwarders.cs b/mcs/class/Facades/System.ComponentModel/TypeForwarders.cs
index 238ceac40d9..24e97c6fe76 100644
--- a/mcs/class/Facades/System.ComponentModel/TypeForwarders.cs
+++ b/mcs/class/Facades/System.ComponentModel/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.CancelEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.IChangeTracking))]
diff --git a/mcs/class/Facades/System.Diagnostics.Contracts/AssemblyInfo.cs b/mcs/class/Facades/System.Diagnostics.Contracts/AssemblyInfo.cs
index 2fc99470259..55e9ec069d3 100644
--- a/mcs/class/Facades/System.Diagnostics.Contracts/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Diagnostics.Contracts/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Diagnostics.Contracts.dll")]
[assembly: AssemblyDescription ("System.Diagnostics.Contracts.dll")]
[assembly: AssemblyDefaultAlias ("System.Diagnostics.Contracts.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Diagnostics.Contracts/Makefile b/mcs/class/Facades/System.Diagnostics.Contracts/Makefile
index a6ffb84934b..24336c082b1 100644
--- a/mcs/class/Facades/System.Diagnostics.Contracts/Makefile
+++ b/mcs/class/Facades/System.Diagnostics.Contracts/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Diagnostics.Contracts
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Diagnostics.Contracts.dll
-LIB_MCS_FLAGS =
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Diagnostics.Contracts/System.Diagnostics.Contracts.dll.sources b/mcs/class/Facades/System.Diagnostics.Contracts/System.Diagnostics.Contracts.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Diagnostics.Contracts/System.Diagnostics.Contracts.dll.sources
+++ b/mcs/class/Facades/System.Diagnostics.Contracts/System.Diagnostics.Contracts.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Diagnostics.Contracts/TypeForwarders.cs b/mcs/class/Facades/System.Diagnostics.Contracts/TypeForwarders.cs
index ac2cc3dc375..961cfe8bfe6 100644
--- a/mcs/class/Facades/System.Diagnostics.Contracts/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Diagnostics.Contracts/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,20 +18,21 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.Contract))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.ContractAbbreviatorAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.ContractArgumentValidatorAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.ContractClassAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.ContractClassForAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.ContractFailedEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.ContractFailureKind))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.ContractInvariantMethodAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.ContractOptionAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.ContractPublicPropertyNameAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.ContractReferenceAssemblyAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.ContractRuntimeIgnoredAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.ContractVerificationAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.PureAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.ContractFailedEventArgs))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.ContractAbbreviatorAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.ContractArgumentValidatorAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Contracts.ContractOptionAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ContractHelper))]
diff --git a/mcs/class/Facades/System.Diagnostics.Debug/AssemblyInfo.cs b/mcs/class/Facades/System.Diagnostics.Debug/AssemblyInfo.cs
index f1e987d020a..a7cbf21727b 100644
--- a/mcs/class/Facades/System.Diagnostics.Debug/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Diagnostics.Debug/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Diagnostics.Debug.dll")]
[assembly: AssemblyDescription ("System.Diagnostics.Debug.dll")]
[assembly: AssemblyDefaultAlias ("System.Diagnostics.Debug.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Diagnostics.Debug/Makefile b/mcs/class/Facades/System.Diagnostics.Debug/Makefile
index 440c475fac5..024f0d65572 100644
--- a/mcs/class/Facades/System.Diagnostics.Debug/Makefile
+++ b/mcs/class/Facades/System.Diagnostics.Debug/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Diagnostics.Debug
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Diagnostics.Debug.dll
-LIB_MCS_FLAGS = /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Diagnostics.Debug/System.Diagnostics.Debug.dll.sources b/mcs/class/Facades/System.Diagnostics.Debug/System.Diagnostics.Debug.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Diagnostics.Debug/System.Diagnostics.Debug.dll.sources
+++ b/mcs/class/Facades/System.Diagnostics.Debug/System.Diagnostics.Debug.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Diagnostics.Debug/TypeForwarders.cs b/mcs/class/Facades/System.Diagnostics.Debug/TypeForwarders.cs
index e829ac7eeb0..e9604390dfa 100644
--- a/mcs/class/Facades/System.Diagnostics.Debug/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Diagnostics.Debug/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Debug))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Debugger))]
diff --git a/mcs/class/Facades/System.Diagnostics.Tools/AssemblyInfo.cs b/mcs/class/Facades/System.Diagnostics.Tools/AssemblyInfo.cs
index b6db9a1e643..62b783c9378 100644
--- a/mcs/class/Facades/System.Diagnostics.Tools/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Diagnostics.Tools/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Diagnostics.Tools.dll")]
[assembly: AssemblyDescription ("System.Diagnostics.Tools.dll")]
[assembly: AssemblyDefaultAlias ("System.Diagnostics.Tools.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Diagnostics.Tools/Makefile b/mcs/class/Facades/System.Diagnostics.Tools/Makefile
index 24a69af8725..2a448a77119 100644
--- a/mcs/class/Facades/System.Diagnostics.Tools/Makefile
+++ b/mcs/class/Facades/System.Diagnostics.Tools/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Diagnostics.Tools
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Diagnostics.Tools.dll
-LIB_MCS_FLAGS = /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Diagnostics.Tools/System.Diagnostics.Tools.dll.sources b/mcs/class/Facades/System.Diagnostics.Tools/System.Diagnostics.Tools.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Diagnostics.Tools/System.Diagnostics.Tools.dll.sources
+++ b/mcs/class/Facades/System.Diagnostics.Tools/System.Diagnostics.Tools.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Diagnostics.Tools/TypeForwarders.cs b/mcs/class/Facades/System.Diagnostics.Tools/TypeForwarders.cs
index a07fed0c3f5..56ebfd6570a 100644
--- a/mcs/class/Facades/System.Diagnostics.Tools/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Diagnostics.Tools/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.CodeDom.Compiler.GeneratedCodeAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.CodeAnalysis.SuppressMessageAttribute))]
diff --git a/mcs/class/Facades/System.Dynamic.Runtime/AssemblyInfo.cs b/mcs/class/Facades/System.Dynamic.Runtime/AssemblyInfo.cs
index 085333228a6..e64d545b785 100644
--- a/mcs/class/Facades/System.Dynamic.Runtime/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Dynamic.Runtime/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Dynamic.Runtime.dll")]
[assembly: AssemblyDescription ("System.Dynamic.Runtime.dll")]
[assembly: AssemblyDefaultAlias ("System.Dynamic.Runtime.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Dynamic.Runtime/Makefile b/mcs/class/Facades/System.Dynamic.Runtime/Makefile
index ed5c735fb49..393bc9dcd50 100644
--- a/mcs/class/Facades/System.Dynamic.Runtime/Makefile
+++ b/mcs/class/Facades/System.Dynamic.Runtime/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Dynamic.Runtime
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Dynamic.Runtime.dll
-LIB_MCS_FLAGS =
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System.Core /r:System
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Dynamic.Runtime/System.Dynamic.Runtime.dll.sources b/mcs/class/Facades/System.Dynamic.Runtime/System.Dynamic.Runtime.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Dynamic.Runtime/System.Dynamic.Runtime.dll.sources
+++ b/mcs/class/Facades/System.Dynamic.Runtime/System.Dynamic.Runtime.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Dynamic.Runtime/TypeForwarders.cs b/mcs/class/Facades/System.Dynamic.Runtime/TypeForwarders.cs
index 2a7a27c41b1..b579d020c12 100644
--- a/mcs/class/Facades/System.Dynamic.Runtime/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Dynamic.Runtime/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,32 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ConditionalWeakTable<,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.BinaryOperationBinder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.BindingRestrictions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.CallInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.ConvertBinder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.CreateInstanceBinder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.DeleteIndexBinder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.DeleteMemberBinder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.DynamicMetaObject))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.DynamicMetaObjectBinder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.DynamicObject))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.ExpandoObject))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.GetIndexBinder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.GetMemberBinder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.IDynamicMetaObjectProvider))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.IInvokeOnGetBinder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.InvokeBinder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.InvokeMemberBinder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.SetIndexBinder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.SetMemberBinder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.UnaryOperationBinder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.DynamicExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.CallSite))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.CallSite<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.CallSiteBinder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.CallSiteHelpers))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.DynamicAttribute))]
diff --git a/mcs/class/Facades/System.Globalization/AssemblyInfo.cs b/mcs/class/Facades/System.Globalization/AssemblyInfo.cs
index e924712186d..9db0473f4f1 100644
--- a/mcs/class/Facades/System.Globalization/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Globalization/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Globalization.dll")]
[assembly: AssemblyDescription ("System.Globalization.dll")]
[assembly: AssemblyDefaultAlias ("System.Globalization.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Globalization/Makefile b/mcs/class/Facades/System.Globalization/Makefile
index 6a9fb37997b..bb46d247e36 100644
--- a/mcs/class/Facades/System.Globalization/Makefile
+++ b/mcs/class/Facades/System.Globalization/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Globalization
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Globalization.dll
-LIB_MCS_FLAGS =
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Globalization/System.Globalization.dll.sources b/mcs/class/Facades/System.Globalization/System.Globalization.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Globalization/System.Globalization.dll.sources
+++ b/mcs/class/Facades/System.Globalization/System.Globalization.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Globalization/TypeForwarders.cs b/mcs/class/Facades/System.Globalization/TypeForwarders.cs
index 9f279911f94..fd2bc99d8c1 100644
--- a/mcs/class/Facades/System.Globalization/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Globalization/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.Calendar))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.CalendarWeekRule))]
@@ -30,6 +26,7 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.CompareInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.CompareOptions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.CultureInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.CultureNotFoundException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.DateTimeFormatInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.NumberFormatInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.RegionInfo))]
@@ -37,5 +34,4 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.TextElementEnumerator))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.TextInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.UnicodeCategory))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.CultureNotFoundException))]
diff --git a/mcs/class/Facades/System.IO/AssemblyInfo.cs b/mcs/class/Facades/System.IO/AssemblyInfo.cs
index f87e3ce5ded..6b5b23d878f 100644
--- a/mcs/class/Facades/System.IO/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.IO/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.IO.dll")]
[assembly: AssemblyDescription ("System.IO.dll")]
[assembly: AssemblyDefaultAlias ("System.IO.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.IO/Makefile b/mcs/class/Facades/System.IO/Makefile
index a59d44828f9..221291d4c52 100644
--- a/mcs/class/Facades/System.IO/Makefile
+++ b/mcs/class/Facades/System.IO/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.IO
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.IO.dll
-LIB_MCS_FLAGS = /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.IO/System.IO.dll.sources b/mcs/class/Facades/System.IO/System.IO.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.IO/System.IO.dll.sources
+++ b/mcs/class/Facades/System.IO/System.IO.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.IO/TypeForwarders.cs b/mcs/class/Facades/System.IO/TypeForwarders.cs
index 1a3d86656f5..ea526e77de4 100644
--- a/mcs/class/Facades/System.IO/TypeForwarders.cs
+++ b/mcs/class/Facades/System.IO/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,20 +18,21 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.BinaryReader))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.BinaryWriter))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.IOException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.EndOfStreamException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.FileNotFoundException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Stream))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.InvalidDataException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.IOException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.MemoryStream))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.SeekOrigin))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.TextReader))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Stream))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.StreamReader))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.TextWriter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.StreamWriter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.StringReader))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.StringWriter))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.InvalidDataException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.TextReader))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.TextWriter))]
diff --git a/mcs/class/Facades/System.Linq.Expressions/AssemblyInfo.cs b/mcs/class/Facades/System.Linq.Expressions/AssemblyInfo.cs
index 6f25c833312..de01cb447b6 100644
--- a/mcs/class/Facades/System.Linq.Expressions/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Linq.Expressions/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Linq.Expressions.dll")]
[assembly: AssemblyDescription ("System.Linq.Expressions.dll")]
[assembly: AssemblyDefaultAlias ("System.Linq.Expressions.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Linq.Expressions/Makefile b/mcs/class/Facades/System.Linq.Expressions/Makefile
index 1883c9107a9..60b5140e37b 100644
--- a/mcs/class/Facades/System.Linq.Expressions/Makefile
+++ b/mcs/class/Facades/System.Linq.Expressions/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Linq.Expressions
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Linq.Expressions.dll
-LIB_MCS_FLAGS = /r:System.Core /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System.Core
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Linq.Expressions/System.Linq.Expressions.dll.sources b/mcs/class/Facades/System.Linq.Expressions/System.Linq.Expressions.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Linq.Expressions/System.Linq.Expressions.dll.sources
+++ b/mcs/class/Facades/System.Linq.Expressions/System.Linq.Expressions.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Linq.Expressions/TypeForwarders.cs b/mcs/class/Facades/System.Linq.Expressions/TypeForwarders.cs
index 2be7a106adb..ca35ff1a1b2 100644
--- a/mcs/class/Facades/System.Linq.Expressions/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Linq.Expressions/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,10 +18,52 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.IQueryable))]
+#if !MONOTOUCH
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.BlockExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.CatchBlock))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.DebugInfoExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.DefaultExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.GotoExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.GotoExpressionKind))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.IndexExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.LabelExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.LabelTarget))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.LoopExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.RuntimeVariablesExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.SwitchCase))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.SwitchExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.SymbolDocumentInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.TryExpression))]
+#endif
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.BinaryExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.ConditionalExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.ConstantExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.ElementInit))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.Expression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.Expression<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.ExpressionType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.ExpressionVisitor))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.InvocationExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.LambdaExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.ListInitExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.MemberAssignment))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.MemberBinding))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.MemberBindingType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.MemberExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.MemberInitExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.MemberListBinding))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.MemberMemberBinding))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.MethodCallExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.NewArrayExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.NewExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.ParameterExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.TypeBinaryExpression))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Expressions.UnaryExpression))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.IOrderedQueryable))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.IQueryable<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.IOrderedQueryable<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.IQueryable))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.IQueryable<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.IQueryProvider))]
diff --git a/mcs/class/Facades/System.Linq.Parallel/AssemblyInfo.cs b/mcs/class/Facades/System.Linq.Parallel/AssemblyInfo.cs
index 5824fc0e7c1..b3d86f59f9d 100644
--- a/mcs/class/Facades/System.Linq.Parallel/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Linq.Parallel/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Linq.Parallel.dll")]
[assembly: AssemblyDescription ("System.Linq.Parallel.dll")]
[assembly: AssemblyDefaultAlias ("System.Linq.Parallel.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Linq.Parallel/Makefile b/mcs/class/Facades/System.Linq.Parallel/Makefile
index bf9069a77be..54a937f7ed1 100644
--- a/mcs/class/Facades/System.Linq.Parallel/Makefile
+++ b/mcs/class/Facades/System.Linq.Parallel/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Linq.Parallel
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Linq.Parallel.dll
-LIB_MCS_FLAGS = /r:System.Core /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System.Core
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Linq.Parallel/System.Linq.Parallel.dll.sources b/mcs/class/Facades/System.Linq.Parallel/System.Linq.Parallel.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Linq.Parallel/System.Linq.Parallel.dll.sources
+++ b/mcs/class/Facades/System.Linq.Parallel/System.Linq.Parallel.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Linq.Parallel/TypeForwarders.cs b/mcs/class/Facades/System.Linq.Parallel/TypeForwarders.cs
index 8fab8b6f07f..00445f24a38 100644
--- a/mcs/class/Facades/System.Linq.Parallel/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Linq.Parallel/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,11 +18,12 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.ParallelQuery))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.ParallelQuery<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.OrderedParallelQuery<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.ParallelEnumerable))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.ParallelExecutionMode))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.ParallelMergeOptions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.ParallelQuery))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.ParallelQuery<>))]
diff --git a/mcs/class/Facades/System.Linq.Queryable/AssemblyInfo.cs b/mcs/class/Facades/System.Linq.Queryable/AssemblyInfo.cs
index 5c425d14870..ec77afbfebb 100644
--- a/mcs/class/Facades/System.Linq.Queryable/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Linq.Queryable/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Linq.Queryable.dll")]
[assembly: AssemblyDescription ("System.Linq.Queryable.dll")]
[assembly: AssemblyDefaultAlias ("System.Linq.Queryable.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Linq.Queryable/Makefile b/mcs/class/Facades/System.Linq.Queryable/Makefile
index 3bed035956b..270601149d5 100644
--- a/mcs/class/Facades/System.Linq.Queryable/Makefile
+++ b/mcs/class/Facades/System.Linq.Queryable/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Linq.Queryable
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Linq.Queryable.dll
-LIB_MCS_FLAGS = /r:System.Core /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System.Core
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Linq.Queryable/System.Linq.Queryable.dll.sources b/mcs/class/Facades/System.Linq.Queryable/System.Linq.Queryable.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Linq.Queryable/System.Linq.Queryable.dll.sources
+++ b/mcs/class/Facades/System.Linq.Queryable/System.Linq.Queryable.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Linq.Queryable/TypeForwarders.cs b/mcs/class/Facades/System.Linq.Queryable/TypeForwarders.cs
index 0d20080e20b..a8f9ee444ee 100644
--- a/mcs/class/Facades/System.Linq.Queryable/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Linq.Queryable/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.EnumerableExecutor))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.EnumerableExecutor<>))]
diff --git a/mcs/class/Facades/System.Linq/AssemblyInfo.cs b/mcs/class/Facades/System.Linq/AssemblyInfo.cs
index 0c3c697408b..e654d85a44b 100644
--- a/mcs/class/Facades/System.Linq/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Linq/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Linq.dll")]
[assembly: AssemblyDescription ("System.Linq.dll")]
[assembly: AssemblyDefaultAlias ("System.Linq.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Linq/Makefile b/mcs/class/Facades/System.Linq/Makefile
index cca44b1499c..b08a8a3798c 100644
--- a/mcs/class/Facades/System.Linq/Makefile
+++ b/mcs/class/Facades/System.Linq/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Linq
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Linq.dll
-LIB_MCS_FLAGS = /r:System.Core /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System.Core
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Linq/System.Linq.dll.sources b/mcs/class/Facades/System.Linq/System.Linq.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Linq/System.Linq.dll.sources
+++ b/mcs/class/Facades/System.Linq/System.Linq.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Linq/TypeForwarders.cs b/mcs/class/Facades/System.Linq/TypeForwarders.cs
index b5cd612a2b4..5ae7fa03f46 100644
--- a/mcs/class/Facades/System.Linq/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Linq/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.Enumerable))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Linq.IGrouping<,>))]
diff --git a/mcs/class/Facades/System.Net.NetworkInformation/AssemblyInfo.cs b/mcs/class/Facades/System.Net.NetworkInformation/AssemblyInfo.cs
index 62f55c56847..4f5c9c1b6d0 100644
--- a/mcs/class/Facades/System.Net.NetworkInformation/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Net.NetworkInformation/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Net.NetworkInformation.dll")]
[assembly: AssemblyDescription ("System.Net.NetworkInformation.dll")]
[assembly: AssemblyDefaultAlias ("System.Net.NetworkInformation.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Net.NetworkInformation/Makefile b/mcs/class/Facades/System.Net.NetworkInformation/Makefile
index 6c24f136948..2168babf390 100644
--- a/mcs/class/Facades/System.Net.NetworkInformation/Makefile
+++ b/mcs/class/Facades/System.Net.NetworkInformation/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Net.NetworkInformation
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Net.NetworkInformation.dll
-LIB_MCS_FLAGS = /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Net.NetworkInformation/System.Net.NetworkInformation.dll.sources b/mcs/class/Facades/System.Net.NetworkInformation/System.Net.NetworkInformation.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Net.NetworkInformation/System.Net.NetworkInformation.dll.sources
+++ b/mcs/class/Facades/System.Net.NetworkInformation/System.Net.NetworkInformation.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Net.NetworkInformation/TypeForwarders.cs b/mcs/class/Facades/System.Net.NetworkInformation/TypeForwarders.cs
index 0cb15ff155d..c16fa7fdaa4 100644
--- a/mcs/class/Facades/System.Net.NetworkInformation/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Net.NetworkInformation/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.NetworkAddressChangedEventHandler))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.NetworkChange))]
diff --git a/mcs/class/Facades/System.Net.Primitives/AssemblyInfo.cs b/mcs/class/Facades/System.Net.Primitives/AssemblyInfo.cs
index 7baa4d66114..43418d0fb78 100644
--- a/mcs/class/Facades/System.Net.Primitives/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Net.Primitives/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Net.Primitives.dll")]
[assembly: AssemblyDescription ("System.Net.Primitives.dll")]
[assembly: AssemblyDefaultAlias ("System.Net.Primitives.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Net.Primitives/Makefile b/mcs/class/Facades/System.Net.Primitives/Makefile
index 6307ee11c0d..db960f49310 100644
--- a/mcs/class/Facades/System.Net.Primitives/Makefile
+++ b/mcs/class/Facades/System.Net.Primitives/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Net.Primitives
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Net.Primitives.dll
-LIB_MCS_FLAGS = /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Net.Primitives/System.Net.Primitives.dll.sources b/mcs/class/Facades/System.Net.Primitives/System.Net.Primitives.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Net.Primitives/System.Net.Primitives.dll.sources
+++ b/mcs/class/Facades/System.Net.Primitives/System.Net.Primitives.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Net.Primitives/TypeForwarders.cs b/mcs/class/Facades/System.Net.Primitives/TypeForwarders.cs
index 9227c4614f4..1d78a8dbaa5 100644
--- a/mcs/class/Facades/System.Net.Primitives/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Net.Primitives/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,18 +18,19 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.AuthenticationSchemes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Cookie))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.CookieCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.CookieContainer))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.CookieException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.CredentialCache))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.DecompressionMethods))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.HttpStatusCode))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.ICredentials))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkCredential))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.AuthenticationSchemes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.ICredentialsByHost))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.CredentialCache))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.DecompressionMethods))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.IWebProxy))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkCredential))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.TransportContext))]
diff --git a/mcs/class/Facades/System.Net.Requests/AssemblyInfo.cs b/mcs/class/Facades/System.Net.Requests/AssemblyInfo.cs
index d75c389c820..771473695cc 100644
--- a/mcs/class/Facades/System.Net.Requests/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Net.Requests/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Net.Requests.dll")]
[assembly: AssemblyDescription ("System.Net.Requests.dll")]
[assembly: AssemblyDefaultAlias ("System.Net.Requests.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Net.Requests/Makefile b/mcs/class/Facades/System.Net.Requests/Makefile
index f3c942ef6f9..35d7d842f60 100644
--- a/mcs/class/Facades/System.Net.Requests/Makefile
+++ b/mcs/class/Facades/System.Net.Requests/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Net.Requests
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Net.Requests.dll
-LIB_MCS_FLAGS = /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Net.Requests/System.Net.Requests.dll.sources b/mcs/class/Facades/System.Net.Requests/System.Net.Requests.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Net.Requests/System.Net.Requests.dll.sources
+++ b/mcs/class/Facades/System.Net.Requests/System.Net.Requests.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Net.Requests/TypeForwarders.cs b/mcs/class/Facades/System.Net.Requests/TypeForwarders.cs
index 9730eaec3d4..2d4e79f6f08 100644
--- a/mcs/class/Facades/System.Net.Requests/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Net.Requests/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,15 +18,16 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.HttpRequestHeader))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.WebRequest))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.HttpWebRequest))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.WebResponse))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.HttpWebResponse))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.IWebRequestCreate))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.ProtocolViolationException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.WebException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.WebExceptionStatus))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.WebHeaderCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.WebRequest))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.WebResponse))]
diff --git a/mcs/class/Facades/System.ObjectModel/AssemblyInfo.cs b/mcs/class/Facades/System.ObjectModel/AssemblyInfo.cs
index a7f198c67bf..1eac48ac27c 100644
--- a/mcs/class/Facades/System.ObjectModel/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.ObjectModel/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.ObjectModel.dll")]
[assembly: AssemblyDescription ("System.ObjectModel.dll")]
[assembly: AssemblyDefaultAlias ("System.ObjectModel.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.ObjectModel/Makefile b/mcs/class/Facades/System.ObjectModel/Makefile
index 0a6e2a51183..6f9294289b0 100644
--- a/mcs/class/Facades/System.ObjectModel/Makefile
+++ b/mcs/class/Facades/System.ObjectModel/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.ObjectModel
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.ObjectModel.dll
-LIB_MCS_FLAGS = /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.ObjectModel/System.ObjectModel.dll.sources b/mcs/class/Facades/System.ObjectModel/System.ObjectModel.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.ObjectModel/System.ObjectModel.dll.sources
+++ b/mcs/class/Facades/System.ObjectModel/System.ObjectModel.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.ObjectModel/TypeForwarders.cs b/mcs/class/Facades/System.ObjectModel/TypeForwarders.cs
index 8737de0adc5..2679bd038c5 100644
--- a/mcs/class/Facades/System.ObjectModel/TypeForwarders.cs
+++ b/mcs/class/Facades/System.ObjectModel/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,18 +18,22 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.INotifyPropertyChanged))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.PropertyChangedEventArgs))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.PropertyChangedEventHandler))]
+#if !MONOTOUCH
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ObjectModel.ReadOnlyDictionary<,>))]
+#endif
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ObjectModel.KeyedCollection<,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.INotifyCollectionChanged))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ObjectModel.ObservableCollection<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ObjectModel.ReadOnlyObservableCollection<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.INotifyCollectionChanged))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.NotifyCollectionChangedAction))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.NotifyCollectionChangedEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.NotifyCollectionChangedEventHandler))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Windows.Input.ICommand))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.INotifyDataErrorInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataErrorsChangedEventArgs))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.INotifyDataErrorInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.INotifyPropertyChanged))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.PropertyChangedEventArgs))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.PropertyChangedEventHandler))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Windows.Input.ICommand))]
diff --git a/mcs/class/Facades/System.Reflection.Emit.ILGeneration/AssemblyInfo.cs b/mcs/class/Facades/System.Reflection.Emit.ILGeneration/AssemblyInfo.cs
new file mode 100644
index 00000000000..43035ee9d24
--- /dev/null
+++ b/mcs/class/Facades/System.Reflection.Emit.ILGeneration/AssemblyInfo.cs
@@ -0,0 +1,41 @@
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Reflection.Emit.ILGeneration.dll")]
+[assembly: AssemblyDescription ("System.Reflection.Emit.ILGeneration.dll")]
+[assembly: AssemblyDefaultAlias ("System.Reflection.Emit.ILGeneration.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Reflection.Emit.ILGeneration/Makefile b/mcs/class/Facades/System.Reflection.Emit.ILGeneration/Makefile
new file mode 100644
index 00000000000..d1c857b3b69
--- /dev/null
+++ b/mcs/class/Facades/System.Reflection.Emit.ILGeneration/Makefile
@@ -0,0 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Reflection.Emit.ILGeneration
+SUBDIRS =
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Reflection.Emit.ILGeneration.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Reflection.Emit.ILGeneration/System.Reflection.Emit.ILGeneration.dll.sources b/mcs/class/Facades/System.Reflection.Emit.ILGeneration/System.Reflection.Emit.ILGeneration.dll.sources
new file mode 100644
index 00000000000..8e33d4ddeae
--- /dev/null
+++ b/mcs/class/Facades/System.Reflection.Emit.ILGeneration/System.Reflection.Emit.ILGeneration.dll.sources
@@ -0,0 +1,3 @@
+TypeForwarders.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Reflection.Emit.ILGeneration/TypeForwarders.cs b/mcs/class/Facades/System.Reflection.Emit.ILGeneration/TypeForwarders.cs
new file mode 100644
index 00000000000..3547d6dc6b5
--- /dev/null
+++ b/mcs/class/Facades/System.Reflection.Emit.ILGeneration/TypeForwarders.cs
@@ -0,0 +1,29 @@
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.CustomAttributeBuilder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.ILGenerator))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.Label))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.LocalBuilder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.ParameterBuilder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.SignatureHelper))]
+
diff --git a/mcs/class/Facades/System.Reflection.Emit.Lightweight/AssemblyInfo.cs b/mcs/class/Facades/System.Reflection.Emit.Lightweight/AssemblyInfo.cs
new file mode 100644
index 00000000000..521dee748d3
--- /dev/null
+++ b/mcs/class/Facades/System.Reflection.Emit.Lightweight/AssemblyInfo.cs
@@ -0,0 +1,41 @@
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Reflection.Emit.Lightweight.dll")]
+[assembly: AssemblyDescription ("System.Reflection.Emit.Lightweight.dll")]
+[assembly: AssemblyDefaultAlias ("System.Reflection.Emit.Lightweight.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Reflection.Emit.Lightweight/Makefile b/mcs/class/Facades/System.Reflection.Emit.Lightweight/Makefile
new file mode 100644
index 00000000000..751a8ec956c
--- /dev/null
+++ b/mcs/class/Facades/System.Reflection.Emit.Lightweight/Makefile
@@ -0,0 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Reflection.Emit.Lightweight
+SUBDIRS =
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Reflection.Emit.Lightweight.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Reflection.Emit.Lightweight/System.Reflection.Emit.Lightweight.dll.sources b/mcs/class/Facades/System.Reflection.Emit.Lightweight/System.Reflection.Emit.Lightweight.dll.sources
new file mode 100644
index 00000000000..8e33d4ddeae
--- /dev/null
+++ b/mcs/class/Facades/System.Reflection.Emit.Lightweight/System.Reflection.Emit.Lightweight.dll.sources
@@ -0,0 +1,3 @@
+TypeForwarders.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Reflection.Emit.Lightweight/TypeForwarders.cs b/mcs/class/Facades/System.Reflection.Emit.Lightweight/TypeForwarders.cs
new file mode 100644
index 00000000000..7cd359e90a0
--- /dev/null
+++ b/mcs/class/Facades/System.Reflection.Emit.Lightweight/TypeForwarders.cs
@@ -0,0 +1,24 @@
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.DynamicMethod))]
+
diff --git a/mcs/class/Facades/System.Reflection.Emit/AssemblyInfo.cs b/mcs/class/Facades/System.Reflection.Emit/AssemblyInfo.cs
new file mode 100644
index 00000000000..656df0b1224
--- /dev/null
+++ b/mcs/class/Facades/System.Reflection.Emit/AssemblyInfo.cs
@@ -0,0 +1,41 @@
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Reflection.Emit.dll")]
+[assembly: AssemblyDescription ("System.Reflection.Emit.dll")]
+[assembly: AssemblyDefaultAlias ("System.Reflection.Emit.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Reflection.Emit/Makefile b/mcs/class/Facades/System.Reflection.Emit/Makefile
new file mode 100644
index 00000000000..43659a90cac
--- /dev/null
+++ b/mcs/class/Facades/System.Reflection.Emit/Makefile
@@ -0,0 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Reflection.Emit
+SUBDIRS =
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Reflection.Emit.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Reflection.Emit/System.Reflection.Emit.dll.sources b/mcs/class/Facades/System.Reflection.Emit/System.Reflection.Emit.dll.sources
new file mode 100644
index 00000000000..8e33d4ddeae
--- /dev/null
+++ b/mcs/class/Facades/System.Reflection.Emit/System.Reflection.Emit.dll.sources
@@ -0,0 +1,3 @@
+TypeForwarders.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Reflection.Emit/TypeForwarders.cs b/mcs/class/Facades/System.Reflection.Emit/TypeForwarders.cs
new file mode 100644
index 00000000000..c00424dbfa6
--- /dev/null
+++ b/mcs/class/Facades/System.Reflection.Emit/TypeForwarders.cs
@@ -0,0 +1,34 @@
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.AssemblyBuilder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.AssemblyBuilderAccess))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.ConstructorBuilder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.EnumBuilder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.EventBuilder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.FieldBuilder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.GenericTypeParameterBuilder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.MethodBuilder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.ModuleBuilder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.PropertyBuilder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.TypeBuilder))]
+
diff --git a/mcs/class/Facades/System.Reflection.Extensions/AssemblyInfo.cs b/mcs/class/Facades/System.Reflection.Extensions/AssemblyInfo.cs
index 9124e1b2b5e..7b9237816ec 100644
--- a/mcs/class/Facades/System.Reflection.Extensions/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Reflection.Extensions/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Reflection.Extensions.dll")]
[assembly: AssemblyDescription ("System.Reflection.Extensions.dll")]
[assembly: AssemblyDefaultAlias ("System.Reflection.Extensions.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Reflection.Extensions/Makefile b/mcs/class/Facades/System.Reflection.Extensions/Makefile
index aaf20facb06..ff09a4df751 100644
--- a/mcs/class/Facades/System.Reflection.Extensions/Makefile
+++ b/mcs/class/Facades/System.Reflection.Extensions/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Reflection.Extensions
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Reflection.Extensions.dll
-LIB_MCS_FLAGS =
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Reflection.Extensions/System.Reflection.Extensions.dll.sources b/mcs/class/Facades/System.Reflection.Extensions/System.Reflection.Extensions.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Reflection.Extensions/System.Reflection.Extensions.dll.sources
+++ b/mcs/class/Facades/System.Reflection.Extensions/System.Reflection.Extensions.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Reflection.Extensions/TypeForwarders.cs b/mcs/class/Facades/System.Reflection.Extensions/TypeForwarders.cs
index 3ed6cd94c08..0bb74c4e2cd 100644
--- a/mcs/class/Facades/System.Reflection.Extensions/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Reflection.Extensions/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.CustomAttributeExtensions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.InterfaceMapping))]
diff --git a/mcs/class/Facades/System.Reflection.Primitives/AssemblyInfo.cs b/mcs/class/Facades/System.Reflection.Primitives/AssemblyInfo.cs
index 0141d30c0ee..260b4584c69 100644
--- a/mcs/class/Facades/System.Reflection.Primitives/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Reflection.Primitives/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Reflection.Primitives.dll")]
[assembly: AssemblyDescription ("System.Reflection.Primitives.dll")]
[assembly: AssemblyDefaultAlias ("System.Reflection.Primitives.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Reflection.Primitives/Makefile b/mcs/class/Facades/System.Reflection.Primitives/Makefile
index 602815ba56c..6d1d422f0fa 100644
--- a/mcs/class/Facades/System.Reflection.Primitives/Makefile
+++ b/mcs/class/Facades/System.Reflection.Primitives/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Reflection.Primitives
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Reflection.Primitives.dll
-LIB_MCS_FLAGS =
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Reflection.Primitives/System.Reflection.Primitives.dll.sources b/mcs/class/Facades/System.Reflection.Primitives/System.Reflection.Primitives.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Reflection.Primitives/System.Reflection.Primitives.dll.sources
+++ b/mcs/class/Facades/System.Reflection.Primitives/System.Reflection.Primitives.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Reflection.Primitives/TypeForwarders.cs b/mcs/class/Facades/System.Reflection.Primitives/TypeForwarders.cs
index 8dfe9b4b950..d19ab64febc 100644
--- a/mcs/class/Facades/System.Reflection.Primitives/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Reflection.Primitives/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,14 +18,24 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
+#if !MONOTOUCH
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.FlowControl))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.OpCode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.OpCodes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.OpCodeType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.OperandType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.PackingSize))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Emit.StackBehaviour))]
+#endif
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.CallingConventions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.EventAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.FieldAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.GenericParameterAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.MethodAttributes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.MethodImplAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.ParameterAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.PropertyAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TypeAttributes))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.MethodImplAttributes))]
diff --git a/mcs/class/Facades/System.Reflection/AssemblyInfo.cs b/mcs/class/Facades/System.Reflection/AssemblyInfo.cs
index 6c614cdb549..36520e0b758 100644
--- a/mcs/class/Facades/System.Reflection/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Reflection/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Reflection.dll")]
[assembly: AssemblyDescription ("System.Reflection.dll")]
[assembly: AssemblyDefaultAlias ("System.Reflection.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Reflection/Makefile b/mcs/class/Facades/System.Reflection/Makefile
index 85c5ac89f13..12e2a5f649e 100644
--- a/mcs/class/Facades/System.Reflection/Makefile
+++ b/mcs/class/Facades/System.Reflection/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Reflection
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Reflection.dll
-LIB_MCS_FLAGS =
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Reflection/System.Reflection.dll.sources b/mcs/class/Facades/System.Reflection/System.Reflection.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Reflection/System.Reflection.dll.sources
+++ b/mcs/class/Facades/System.Reflection/System.Reflection.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Reflection/TypeForwarders.cs b/mcs/class/Facades/System.Reflection/TypeForwarders.cs
index 5e5d09de03e..511c1fe2ed3 100644
--- a/mcs/class/Facades/System.Reflection/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Reflection/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,31 +18,32 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.MemberInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AmbiguousMatchException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Assembly))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyContentType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyName))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.MethodBase))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.ConstructorInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.CustomAttributeData))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.CustomAttributeNamedArgument))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.CustomAttributeTypedArgument))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.EventInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.FieldInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.IntrospectionExtensions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.IReflectableType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.LocalVariableInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.ManifestResourceInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.MemberInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.MethodBase))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.MethodInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Module))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.ParameterInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.PropertyInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.ReflectionContext))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.ReflectionTypeLoadException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.ResourceLocation))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TargetInvocationException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TargetParameterCountException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.ManifestResourceInfo))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.ResourceLocation))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyContentType))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.CustomAttributeData))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.CustomAttributeNamedArgument))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.CustomAttributeTypedArgument))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.IntrospectionExtensions))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.IReflectableType))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.LocalVariableInfo))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.ReflectionContext))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.TypeInfo))]
diff --git a/mcs/class/Facades/System.Resources.ResourceManager/AssemblyInfo.cs b/mcs/class/Facades/System.Resources.ResourceManager/AssemblyInfo.cs
index 97c869f804d..067874f4f03 100644
--- a/mcs/class/Facades/System.Resources.ResourceManager/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Resources.ResourceManager/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Resources.ResourceManager.dll")]
[assembly: AssemblyDescription ("System.Resources.ResourceManager.dll")]
[assembly: AssemblyDefaultAlias ("System.Resources.ResourceManager.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Resources.ResourceManager/Makefile b/mcs/class/Facades/System.Resources.ResourceManager/Makefile
index 0a3cf9d3479..018d0779058 100644
--- a/mcs/class/Facades/System.Resources.ResourceManager/Makefile
+++ b/mcs/class/Facades/System.Resources.ResourceManager/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Resources.ResourceManager
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Resources.ResourceManager.dll
-LIB_MCS_FLAGS =
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Resources.ResourceManager/System.Resources.ResourceManager.dll.sources b/mcs/class/Facades/System.Resources.ResourceManager/System.Resources.ResourceManager.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Resources.ResourceManager/System.Resources.ResourceManager.dll.sources
+++ b/mcs/class/Facades/System.Resources.ResourceManager/System.Resources.ResourceManager.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Resources.ResourceManager/TypeForwarders.cs b/mcs/class/Facades/System.Resources.ResourceManager/TypeForwarders.cs
index 349023f6cc6..bea32f418ed 100644
--- a/mcs/class/Facades/System.Resources.ResourceManager/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Resources.ResourceManager/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Resources.MissingManifestResourceException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Resources.NeutralResourcesLanguageAttribute))]
diff --git a/mcs/class/Facades/System.Runtime.Extensions/AssemblyInfo.cs b/mcs/class/Facades/System.Runtime.Extensions/AssemblyInfo.cs
index 8d2517ab53f..f3163e0d806 100644
--- a/mcs/class/Facades/System.Runtime.Extensions/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Runtime.Extensions/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Runtime.Extensions.dll")]
[assembly: AssemblyDescription ("System.Runtime.Extensions.dll")]
[assembly: AssemblyDefaultAlias ("System.Runtime.Extensions.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Runtime.Extensions/Makefile b/mcs/class/Facades/System.Runtime.Extensions/Makefile
index 9c371e1bedf..489c457dc9c 100644
--- a/mcs/class/Facades/System.Runtime.Extensions/Makefile
+++ b/mcs/class/Facades/System.Runtime.Extensions/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Runtime.Extensions
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Runtime.Extensions.dll
-LIB_MCS_FLAGS = /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Runtime.Extensions/System.Runtime.Extensions.dll.sources b/mcs/class/Facades/System.Runtime.Extensions/System.Runtime.Extensions.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Runtime.Extensions/System.Runtime.Extensions.dll.sources
+++ b/mcs/class/Facades/System.Runtime.Extensions/System.Runtime.Extensions.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Runtime.Extensions/TypeForwarders.cs b/mcs/class/Facades/System.Runtime.Extensions/TypeForwarders.cs
index d0c05ecc047..a12987dbdc9 100644
--- a/mcs/class/Facades/System.Runtime.Extensions/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Runtime.Extensions/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,17 +18,18 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UriBuilder))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.BitConverter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Convert))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Stopwatch))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Environment))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Path))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Math))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Random))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.StringComparer))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Stopwatch))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.MidpointRounding))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Progress<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IO.Path))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.WebUtility))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Progress<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Random))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.StringComparer))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UriBuilder))]
diff --git a/mcs/class/Facades/System.Runtime.InteropServices/AssemblyInfo.cs b/mcs/class/Facades/System.Runtime.InteropServices/AssemblyInfo.cs
index fa299ae9c62..25b7d0a0538 100644
--- a/mcs/class/Facades/System.Runtime.InteropServices/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Runtime.InteropServices/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Runtime.InteropServices.dll")]
[assembly: AssemblyDescription ("System.Runtime.InteropServices.dll")]
[assembly: AssemblyDefaultAlias ("System.Runtime.InteropServices.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Runtime.InteropServices/Makefile b/mcs/class/Facades/System.Runtime.InteropServices/Makefile
index 133466068cd..b3e4a41c80e 100644
--- a/mcs/class/Facades/System.Runtime.InteropServices/Makefile
+++ b/mcs/class/Facades/System.Runtime.InteropServices/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Runtime.InteropServices
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Runtime.InteropServices.dll
-LIB_MCS_FLAGS = /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System /r:System.Core
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Runtime.InteropServices/System.Runtime.InteropServices.dll.sources b/mcs/class/Facades/System.Runtime.InteropServices/System.Runtime.InteropServices.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Runtime.InteropServices/System.Runtime.InteropServices.dll.sources
+++ b/mcs/class/Facades/System.Runtime.InteropServices/System.Runtime.InteropServices.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs b/mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs
index 29d69ea40a1..0c7e63a212e 100644
--- a/mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,10 +18,16 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
+#if !MONOTOUCH
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComImportAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DispatchWrapper))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ErrorWrapper))]
+#endif
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DataMisalignedException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Missing))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DllNotFoundException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.Missing))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ArrayWithOffset))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.BestFitMappingAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.BStrWrapper))]
@@ -37,10 +38,8 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComDefaultInterfaceAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComEventInterfaceAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.COMException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComInterfaceType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComMemberType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComSourceInterfacesAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CriticalHandle))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CurrencyWrapper))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DefaultCharSetAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DispIdAttribute))]
@@ -50,23 +49,17 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.GuidAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ICustomAdapter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.InAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.InterfaceTypeAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.InvalidComObjectException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.InvalidOleVariantTypeException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.MarshalAsAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.MarshalDirectiveException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.OptionalAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.PreserveSigAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.SafeArrayRankMismatchException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.SafeArrayTypeMismatchException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.SafeHandle))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.SafeBuffer))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.SEHException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.TypeIdentifierAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.UnknownWrapper))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.UnmanagedType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.VarEnum))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.VariantWrapper))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.DefaultParameterValueAttribute))]
diff --git a/mcs/class/Facades/System.Runtime.Numerics/AssemblyInfo.cs b/mcs/class/Facades/System.Runtime.Numerics/AssemblyInfo.cs
index 3a4e894f56b..00b01219c87 100644
--- a/mcs/class/Facades/System.Runtime.Numerics/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Runtime.Numerics/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Runtime.Numerics.dll")]
[assembly: AssemblyDescription ("System.Runtime.Numerics.dll")]
[assembly: AssemblyDefaultAlias ("System.Runtime.Numerics.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Runtime.Numerics/Makefile b/mcs/class/Facades/System.Runtime.Numerics/Makefile
index eb821c86566..b21abddbabe 100644
--- a/mcs/class/Facades/System.Runtime.Numerics/Makefile
+++ b/mcs/class/Facades/System.Runtime.Numerics/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Runtime.Numerics
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Runtime.Numerics.dll
-LIB_MCS_FLAGS = /r:System.Numerics
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System.Numerics
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Runtime.Numerics/System.Runtime.Numerics.dll.sources b/mcs/class/Facades/System.Runtime.Numerics/System.Runtime.Numerics.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Runtime.Numerics/System.Runtime.Numerics.dll.sources
+++ b/mcs/class/Facades/System.Runtime.Numerics/System.Runtime.Numerics.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Runtime.Numerics/TypeForwarders.cs b/mcs/class/Facades/System.Runtime.Numerics/TypeForwarders.cs
index e937f327cdc..ac647df3d15 100644
--- a/mcs/class/Facades/System.Runtime.Numerics/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Runtime.Numerics/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Numerics.BigInteger))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Numerics.Complex))]
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Json/AssemblyInfo.cs b/mcs/class/Facades/System.Runtime.Serialization.Json/AssemblyInfo.cs
index 6eda657d09a..6710dca152a 100644
--- a/mcs/class/Facades/System.Runtime.Serialization.Json/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Runtime.Serialization.Json/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Runtime.Serialization.Json.dll")]
[assembly: AssemblyDescription ("System.Runtime.Serialization.Json.dll")]
[assembly: AssemblyDefaultAlias ("System.Runtime.Serialization.Json.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Json/Makefile b/mcs/class/Facades/System.Runtime.Serialization.Json/Makefile
index 8997f73155f..30bc06f1d19 100644
--- a/mcs/class/Facades/System.Runtime.Serialization.Json/Makefile
+++ b/mcs/class/Facades/System.Runtime.Serialization.Json/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Runtime.Serialization.Json
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Runtime.Serialization.Json.dll
-LIB_MCS_FLAGS = /r:System.Runtime.Serialization /r:System.Xml
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System.Runtime.Serialization
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Json/System.Runtime.Serialization.Json.dll.sources b/mcs/class/Facades/System.Runtime.Serialization.Json/System.Runtime.Serialization.Json.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Runtime.Serialization.Json/System.Runtime.Serialization.Json.dll.sources
+++ b/mcs/class/Facades/System.Runtime.Serialization.Json/System.Runtime.Serialization.Json.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Json/TypeForwarders.cs b/mcs/class/Facades/System.Runtime.Serialization.Json/TypeForwarders.cs
index 9ccfd6eba2a..57aeedd78ae 100644
--- a/mcs/class/Facades/System.Runtime.Serialization.Json/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Runtime.Serialization.Json/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,9 +18,10 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.Json.DataContractJsonSerializer))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.DateTimeFormat))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.EmitTypeInformation))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.Json.DataContractJsonSerializer))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.Json.DataContractJsonSerializerSettings))]
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Primitives/AssemblyInfo.cs b/mcs/class/Facades/System.Runtime.Serialization.Primitives/AssemblyInfo.cs
index b7749b99031..c76790eaf0e 100644
--- a/mcs/class/Facades/System.Runtime.Serialization.Primitives/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Runtime.Serialization.Primitives/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Runtime.Serialization.Primitives.dll")]
[assembly: AssemblyDescription ("System.Runtime.Serialization.Primitives.dll")]
[assembly: AssemblyDefaultAlias ("System.Runtime.Serialization.Primitives.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Primitives/Makefile b/mcs/class/Facades/System.Runtime.Serialization.Primitives/Makefile
index 4210975d19c..403f973fba7 100644
--- a/mcs/class/Facades/System.Runtime.Serialization.Primitives/Makefile
+++ b/mcs/class/Facades/System.Runtime.Serialization.Primitives/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Runtime.Serialization.Primitives
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Runtime.Serialization.Primitives.dll
-LIB_MCS_FLAGS = /r:System.Runtime.Serialization /r:System.Xml
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System.Runtime.Serialization
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Primitives/System.Runtime.Serialization.Primitives.dll.sources b/mcs/class/Facades/System.Runtime.Serialization.Primitives/System.Runtime.Serialization.Primitives.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Runtime.Serialization.Primitives/System.Runtime.Serialization.Primitives.dll.sources
+++ b/mcs/class/Facades/System.Runtime.Serialization.Primitives/System.Runtime.Serialization.Primitives.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Primitives/TypeForwarders.cs b/mcs/class/Facades/System.Runtime.Serialization.Primitives/TypeForwarders.cs
index 10faec2b27d..ce3180fe1f1 100644
--- a/mcs/class/Facades/System.Runtime.Serialization.Primitives/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Runtime.Serialization.Primitives/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.CollectionDataContractAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.ContractNamespaceAttribute))]
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Xml/AssemblyInfo.cs b/mcs/class/Facades/System.Runtime.Serialization.Xml/AssemblyInfo.cs
index 2194c610058..f88da3f3a59 100644
--- a/mcs/class/Facades/System.Runtime.Serialization.Xml/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Runtime.Serialization.Xml/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Runtime.Serialization.Xml.dll")]
[assembly: AssemblyDescription ("System.Runtime.Serialization.Xml.dll")]
[assembly: AssemblyDefaultAlias ("System.Runtime.Serialization.Xml.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Xml/Makefile b/mcs/class/Facades/System.Runtime.Serialization.Xml/Makefile
index 9be218059f0..cf4c9ab90eb 100644
--- a/mcs/class/Facades/System.Runtime.Serialization.Xml/Makefile
+++ b/mcs/class/Facades/System.Runtime.Serialization.Xml/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Runtime.Serialization.Xml
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Runtime.Serialization.Xml.dll
-LIB_MCS_FLAGS = /r:System.Runtime.Serialization /r:System.Xml
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System.Runtime.Serialization /r:System.Xml
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Xml/System.Runtime.Serialization.Xml.dll.sources b/mcs/class/Facades/System.Runtime.Serialization.Xml/System.Runtime.Serialization.Xml.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Runtime.Serialization.Xml/System.Runtime.Serialization.Xml.dll.sources
+++ b/mcs/class/Facades/System.Runtime.Serialization.Xml/System.Runtime.Serialization.Xml.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Runtime.Serialization.Xml/TypeForwarders.cs b/mcs/class/Facades/System.Runtime.Serialization.Xml/TypeForwarders.cs
index ffedd4dbbfc..34638aee54c 100644
--- a/mcs/class/Facades/System.Runtime.Serialization.Xml/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Runtime.Serialization.Xml/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,19 +18,20 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.XmlObjectSerializer))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.DataContractResolver))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.DataContractSerializer))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.DataContractSerializerSettings))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.InvalidDataContractException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.XmlObjectSerializer))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.IXmlDictionary))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.UniqueId))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlBinaryReaderSession))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlBinaryWriterSession))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlDictionary))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlDictionaryReader))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlDictionaryReaderQuotas))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlDictionaryString))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlDictionaryWriter))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.DataContractResolver))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.DataContractSerializerSettings))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlBinaryReaderSession))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlBinaryWriterSession))]
diff --git a/mcs/class/Facades/System.Runtime/AssemblyInfo.cs b/mcs/class/Facades/System.Runtime/AssemblyInfo.cs
index c921c6c1150..359e2334b7e 100644
--- a/mcs/class/Facades/System.Runtime/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Runtime/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Runtime.dll")]
[assembly: AssemblyDescription ("System.Runtime.dll")]
[assembly: AssemblyDefaultAlias ("System.Runtime.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Runtime/Makefile b/mcs/class/Facades/System.Runtime/Makefile
index bb482472a14..72ada093b09 100644
--- a/mcs/class/Facades/System.Runtime/Makefile
+++ b/mcs/class/Facades/System.Runtime/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Runtime
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Runtime.dll
-LIB_MCS_FLAGS = /r:System /r:System.Core /r:System.ComponentModel.Composition
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System /r:System.ComponentModel.Composition /r:System.Core
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Runtime/System.Runtime.dll.sources b/mcs/class/Facades/System.Runtime/System.Runtime.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Runtime/System.Runtime.dll.sources
+++ b/mcs/class/Facades/System.Runtime/System.Runtime.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Runtime/TypeForwarders.cs b/mcs/class/Facades/System.Runtime/TypeForwarders.cs
index 2a6afa89aea..4a6a0166b30 100644
--- a/mcs/class/Facades/System.Runtime/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Runtime/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,89 +18,144 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,,,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ExtensionAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Uri))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UriComponents))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UriFormat))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UriKind))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DefaultValueAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.EditorBrowsableAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.EditorBrowsableState))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(object))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ValueType))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IComparable))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IComparable<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IEquatable<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IFormattable))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(decimal))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Delegate))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.MulticastDelegate))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Activator))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Exception))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ArgumentException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ArgumentNullException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ArgumentOutOfRangeException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ArithmeticException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IEnumerable))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ICollection))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IList))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Array))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ArraySegment<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ArrayTypeMismatchException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.AsyncCallback))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Attribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Enum))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.AttributeTargets))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.AttributeUsageAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.BadImageFormatException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(bool))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Boolean))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Buffer))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(byte))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(char))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Byte))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Char))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.CLSCompliantAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.DictionaryEntry))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.ICollection<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IComparer<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IDictionary<,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IEnumerable<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IEnumerator<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IEqualityComparer<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IList<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IReadOnlyCollection<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IReadOnlyDictionary<,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IReadOnlyList<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.ISet<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.KeyNotFoundException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.KeyValuePair<,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ICollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IComparer))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IDictionary))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IDictionaryEnumerator))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IEnumerable))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IEnumerator))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IEqualityComparer))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IList))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IStructuralComparable))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IStructuralEquatable))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ObjectModel.Collection<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ObjectModel.ReadOnlyCollection<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Comparison<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DefaultValueAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.EditorBrowsableAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.EditorBrowsableState))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DateTime))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DateTimeKind))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DateTimeOffset))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DayOfWeek))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Decimal))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Delegate))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.ConditionalAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.DebuggableAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DivideByZeroException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(double))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Double))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Enum))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.EventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.EventHandler))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.EventHandler<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Exception))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.FlagsAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.FormatException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,,,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.GC))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.GCCollectionMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.DateTimeStyles))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.NumberStyles))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.TimeSpanStyles))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Guid))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IAsyncResult))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IComparable))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IComparable<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ICustomFormatter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IDisposable))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IEquatable<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IFormatProvider))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IFormattable))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IndexOutOfRangeException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(short))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(int))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(long))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Int16))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Int32))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Int64))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IntPtr))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.InvalidCastException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.InvalidOperationException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.InvalidTimeZoneException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IObservable<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IObserver<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IProgress<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Lazy<,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Lazy<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.MemberAccessException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.MissingMemberException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.MTAThreadAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.MulticastDelegate))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.NotImplementedException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.NotSupportedException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Nullable))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Nullable<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.NullReferenceException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Object))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ObjectDisposedException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ObsoleteAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.OutOfMemoryException))]
@@ -114,47 +164,6 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.PlatformNotSupportedException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Predicate<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.RankException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.RuntimeFieldHandle))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.RuntimeMethodHandle))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.RuntimeTypeHandle))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(sbyte))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(float))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IComparer<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IEqualityComparer<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IComparer))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IEqualityComparer))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.StringComparison))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.StringSplitOptions))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.TimeoutException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.TimeSpan))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Type))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.TypeInitializationException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.TypeLoadException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(ushort))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(uint))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(ulong))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UIntPtr))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UnauthorizedAccessException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Version))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(void))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.WeakReference))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.DictionaryEntry))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IDictionary))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IEnumerator))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IDictionaryEnumerator))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IEnumerable<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.ICollection<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IDictionary<,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IEnumerator<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IList<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.KeyNotFoundException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.KeyValuePair<,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ObjectModel.Collection<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ObjectModel.ReadOnlyCollection<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.ConditionalAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.DebuggableAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.DateTimeStyles))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.NumberStyles))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyCompanyAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyConfigurationAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyCopyrightAttribute))]
@@ -167,113 +176,100 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyInformationalVersionAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyKeyFileAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyKeyNameAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyMetadataAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyNameFlags))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyProductAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblySignatureKeyAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyTitleAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyTrademarkAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyVersionAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.DefaultMemberAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AccessedThroughPropertyAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncStateMachineAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.CallerFilePathAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.CallerLineNumberAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.CallerMemberNameAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.CompilationRelaxationsAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.CompilerGeneratedAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.CustomConstantAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.DateTimeConstantAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.DecimalConstantAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ExtensionAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.FixedBufferAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.IndexerNameAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.InternalsVisibleToAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.IStrongBox))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.IsVolatile))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.IteratorStateMachineAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.MethodImplAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.MethodImplOptions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ReferenceAssemblyAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.RuntimeCompatibilityAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.RuntimeHelpers))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.StateMachineAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.StrongBox<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.TypeForwardedFromAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.TypeForwardedToAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.UnsafeValueTypeAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.ExceptionServices.ExceptionDispatchInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.GCLatencyMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.GCSettings))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CharSet))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComVisibleAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.FieldOffsetAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.LayoutKind))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.OutAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.StructLayoutAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Versioning.TargetFrameworkAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.RuntimeFieldHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.RuntimeMethodHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.RuntimeTypeHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.SByte))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AllowPartiallyTrustedCallersAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.SecurityCriticalAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.SecurityException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.SecuritySafeCriticalAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.SecurityTransparentAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.VerificationException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Single))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.STAThreadAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.String))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.StringComparison))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.StringSplitOptions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.StringBuilder))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.WaitHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.LazyThreadSafetyMode))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Timeout))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.InvalidTimeZoneException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.TimeZoneInfo))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.IStrongBox))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.StrongBox<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Globalization.TimeSpanStyles))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Lazy<,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,,,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,,,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.ISet<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Action<,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IStructuralComparable))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.IStructuralEquatable))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Func<,,,,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Lazy<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.WaitHandle))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ThreadStaticAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.TimeoutException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.TimeSpan))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.TimeZoneInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Tuple))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Tuple<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Tuple<,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Tuple<,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Tuple<,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Tuple<,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Tuple<,,,,,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Tuple<,,,,,,>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Tuple<,,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Tuple<,,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Tuple<,,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Tuple<,,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Tuple<,,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Tuple<,,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Tuple<,>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Tuple<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Type))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.TypeAccessException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.TypeForwardedFromAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.TypeForwardedToAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.AllowPartiallyTrustedCallersAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.LazyThreadSafetyMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.TypeInitializationException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.TypeLoadException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UInt16))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UInt32))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UInt64))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UIntPtr))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UnauthorizedAccessException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Uri))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UriComponents))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UriFormat))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UriHostNameType))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.GCCollectionMode))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IObservable<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IObserver<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.GCLatencyMode))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.GCSettings))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.FixedBufferAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.UnsafeValueTypeAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CharSet))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComVisibleAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IReadOnlyCollection<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IReadOnlyList<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.IProgress<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.MTAThreadAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.STAThreadAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.UriKind))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ValueType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Version))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.WeakReference))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.WeakReference<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Generic.IReadOnlyDictionary<,>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblyMetadataAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Reflection.AssemblySignatureKeyAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.StateMachineAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncStateMachineAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.CallerFilePathAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.CallerLineNumberAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.CallerMemberNameAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.IteratorStateMachineAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ReferenceAssemblyAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.ExceptionServices.ExceptionDispatchInfo))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(string))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(void))]
diff --git a/mcs/class/Facades/System.Security.Principal/AssemblyInfo.cs b/mcs/class/Facades/System.Security.Principal/AssemblyInfo.cs
index 9add5807e55..9d0d014384a 100644
--- a/mcs/class/Facades/System.Security.Principal/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Security.Principal/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Security.Principal.dll")]
[assembly: AssemblyDescription ("System.Security.Principal.dll")]
[assembly: AssemblyDefaultAlias ("System.Security.Principal.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Security.Principal/Makefile b/mcs/class/Facades/System.Security.Principal/Makefile
index 6662c5ac9ad..738880ff009 100644
--- a/mcs/class/Facades/System.Security.Principal/Makefile
+++ b/mcs/class/Facades/System.Security.Principal/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Security.Principal
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Security.Principal.dll
-LIB_MCS_FLAGS =
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Security.Principal/System.Security.Principal.dll.sources b/mcs/class/Facades/System.Security.Principal/System.Security.Principal.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Security.Principal/System.Security.Principal.dll.sources
+++ b/mcs/class/Facades/System.Security.Principal/System.Security.Principal.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Security.Principal/TypeForwarders.cs b/mcs/class/Facades/System.Security.Principal/TypeForwarders.cs
index 85a934368b6..a6682541e65 100644
--- a/mcs/class/Facades/System.Security.Principal/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Security.Principal/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Principal.IIdentity))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Principal.IPrincipal))]
diff --git a/mcs/class/Facades/System.ServiceModel.Http/AssemblyInfo.cs b/mcs/class/Facades/System.ServiceModel.Http/AssemblyInfo.cs
index a44d7588ec4..2dc616e75c1 100644
--- a/mcs/class/Facades/System.ServiceModel.Http/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.ServiceModel.Http/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.ServiceModel.Http.dll")]
[assembly: AssemblyDescription ("System.ServiceModel.Http.dll")]
[assembly: AssemblyDefaultAlias ("System.ServiceModel.Http.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.ServiceModel.Http/Makefile b/mcs/class/Facades/System.ServiceModel.Http/Makefile
index b3eda588954..b709ac623e3 100644
--- a/mcs/class/Facades/System.ServiceModel.Http/Makefile
+++ b/mcs/class/Facades/System.ServiceModel.Http/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.ServiceModel.Http
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.ServiceModel.Http.dll
-LIB_MCS_FLAGS = /r:System.ServiceModel
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System.ServiceModel
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.ServiceModel.Http/System.ServiceModel.Http.dll.sources b/mcs/class/Facades/System.ServiceModel.Http/System.ServiceModel.Http.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.ServiceModel.Http/System.ServiceModel.Http.dll.sources
+++ b/mcs/class/Facades/System.ServiceModel.Http/System.ServiceModel.Http.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.ServiceModel.Http/TypeForwarders.cs b/mcs/class/Facades/System.ServiceModel.Http/TypeForwarders.cs
index 79b95a02032..57276e7078c 100644
--- a/mcs/class/Facades/System.ServiceModel.Http/TypeForwarders.cs
+++ b/mcs/class/Facades/System.ServiceModel.Http/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.BasicHttpBinding))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.BasicHttpMessageCredentialType))]
@@ -30,13 +26,14 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.BasicHttpSecurityMode))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.HttpRequestMessageProperty))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.HttpResponseMessageProperty))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.HttpTransportBindingElement))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.HttpsTransportBindingElement))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.HttpTransportBindingElement))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IHttpCookieContainerManager))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.WebSocketTransportSettings))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.WebSocketTransportUsage))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.HttpBindingBase))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.HttpClientCredentialType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.HttpTransportSecurity))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.NetHttpBinding))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.NetHttpMessageEncoding))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.WebSocketTransportSettings))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.WebSocketTransportUsage))]
diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/AssemblyInfo.cs b/mcs/class/Facades/System.ServiceModel.Primitives/AssemblyInfo.cs
index c180411f3e6..02bec1d5c48 100644
--- a/mcs/class/Facades/System.ServiceModel.Primitives/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.ServiceModel.Primitives/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.ServiceModel.Primitives.dll")]
[assembly: AssemblyDescription ("System.ServiceModel.Primitives.dll")]
[assembly: AssemblyDefaultAlias ("System.ServiceModel.Primitives.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/Makefile b/mcs/class/Facades/System.ServiceModel.Primitives/Makefile
index c71d40bc9dc..5391e8cdef3 100644
--- a/mcs/class/Facades/System.ServiceModel.Primitives/Makefile
+++ b/mcs/class/Facades/System.ServiceModel.Primitives/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.ServiceModel.Primitives
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.ServiceModel.Primitives.dll
-LIB_MCS_FLAGS = /r:System.ServiceModel /r:System.Xml
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System.ServiceModel /r:System.Xml
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/System.ServiceModel.Primitives.dll.sources b/mcs/class/Facades/System.ServiceModel.Primitives/System.ServiceModel.Primitives.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.ServiceModel.Primitives/System.ServiceModel.Primitives.dll.sources
+++ b/mcs/class/Facades/System.ServiceModel.Primitives/System.ServiceModel.Primitives.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.ServiceModel.Primitives/TypeForwarders.cs b/mcs/class/Facades/System.ServiceModel.Primitives/TypeForwarders.cs
index 9cb71623204..37b5c7d9157 100644
--- a/mcs/class/Facades/System.ServiceModel.Primitives/TypeForwarders.cs
+++ b/mcs/class/Facades/System.ServiceModel.Primitives/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,132 +18,145 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.XmlSerializerFormatAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.CommunicationException))]
+#if !MONOTOUCH
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.CompressionFormat))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Dispatcher.ClientOperation))]
+#endif
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ActionNotSupportedException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.IDefaultCommunicationTimeouts))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.Binding))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ICommunicationObject))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.CommunicationObject))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IChannelFactory))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ChannelFactory))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ClientBase<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IChannel))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IOutputChannel))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IRequestChannel))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.IExtensibleObject<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.IContextChannel))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.IClientChannel))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.CommunicationObjectAbortedException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.CommunicationObjectFaultedException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.CommunicationState))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.DataContractFormatAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.EndpointAddress))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.EndpointAddressBuilder))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.EndpointNotFoundException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.EnvelopeVersion))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ExceptionDetail))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.FaultCode))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.FaultContractAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.FaultException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.FaultException<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.FaultReason))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.FaultReasonText))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.IExtension<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.IExtensionCollection<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.InvalidMessageContractException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageContractMemberAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageBodyMemberAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageContractAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ProtocolException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageHeaderException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageParameterAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.OperationContext))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.OperationContextScope))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.OperationContractAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.OperationFormatStyle))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.QuotaExceededException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ServerTooBusyException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ServiceActivationException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ServiceContractAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ServiceKnownTypeAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.UnknownMessageReceivedEventArgs))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ChannelFactory<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.AddressHeader))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.AddressHeaderCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.AddressingVersion))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.BindingElement))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.MessageEncodingBindingElement))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.BinaryMessageEncodingBindingElement))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.Binding))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.BindingContext))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.BindingElement))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.BindingElementCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.BindingParameterCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.BodyWriter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.BufferManager))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.ChannelBase))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.ChannelManagerBase))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.ChannelFactoryBase))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IChannelFactory<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.ChannelFactoryBase<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.ChannelManagerBase))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.ChannelParameterCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.CommunicationObject))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.CustomBinding))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.FaultConverter))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.TransportBindingElement))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IInputChannel))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IChannel))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IChannelFactory))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IChannelFactory<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IDuplexChannel))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.ISession))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IInputSession))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IOutputSession))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IDuplexSession))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.ISessionChannel<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IDuplexSessionChannel))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IInputChannel))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IInputSession))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IInputSessionChannel))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IMessageProperty))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IOutputChannel))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IOutputSession))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IOutputSessionChannel))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IRequestChannel))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.IRequestSessionChannel))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.ISession))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.ISessionChannel<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.Message))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.MessageBuffer))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.MessageEncoder))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.MessageEncoderFactory))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.MessageEncodingBindingElement))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.MessageFault))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.MessageHeaderInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.MessageHeader))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.MessageHeaderInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.MessageHeaders))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.MessageProperties))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.MessageState))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.MessageVersion))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.RequestContext))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.TextMessageEncodingBindingElement))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.TransportBindingElement))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ClientBase<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.CommunicationException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.CommunicationObjectAbortedException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.CommunicationObjectFaultedException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.CommunicationState))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.DataContractFormatAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.ClientCredentials))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.ContractDescription))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.DataContractSerializerOperationBehavior))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.FaultDescription))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.FaultDescriptionCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.IContractBehavior))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.IEndpointBehavior))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.IOperationBehavior))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.MessageBodyDescription))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.MessageDescription))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.MessageDescriptionCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.MessageDirection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.MessageHeaderDescription))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.MessageHeaderDescriptionCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.MessagePartDescription))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.MessagePartDescriptionCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.MessagePropertyDescription))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.MessagePropertyDescriptionCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.OperationDescription))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.OperationDescriptionCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.ServiceEndpoint))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.MessageSecurityException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.SecurityAccessDeniedException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.UserNamePasswordClientCredential))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ChannelFactory<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Dispatcher.ClientRuntime))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Dispatcher.DispatchOperation))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Dispatcher.DispatchRuntime))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Dispatcher.EndpointDispatcher))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Dispatcher.IClientMessageFormatter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Dispatcher.IClientMessageInspector))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Dispatcher.IClientOperationSelector))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Dispatcher.IParameterInspector))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.EndpointAddress))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.EndpointAddressBuilder))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.EndpointIdentity))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.EndpointNotFoundException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.EnvelopeVersion))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ExceptionDetail))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.FaultCode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.FaultContractAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.FaultException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.FaultException<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.FaultReason))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.FaultReasonText))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.IClientChannel))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ICommunicationObject))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.IContextChannel))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.IDefaultCommunicationTimeouts))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.IExtensibleObject<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.IExtension<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.IExtensionCollection<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.InvalidMessageContractException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageBodyMemberAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageContractAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageContractMemberAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageCredentialType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageHeader<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.SecurityMode))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.TransferMode))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.IEndpointBehavior))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.IOperationBehavior))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.DataContractSerializerOperationBehavior))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.IContractBehavior))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.MessageHeaderDescription))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.MessageHeaderDescriptionCollection))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.MessagePropertyDescription))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Description.MessagePropertyDescriptionCollection))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageHeaderException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.MessageParameterAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.OperationContext))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.OperationContextScope))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.OperationContractAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.OperationFormatStyle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ProtocolException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.QuotaExceededException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.HttpDigestClientCredential))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.MessageSecurityException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.SecurityAccessDeniedException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.UserNamePasswordClientCredential))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Security.WindowsClientCredential))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.SecurityMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ServerTooBusyException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ServiceActivationException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ServiceContractAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.ServiceKnownTypeAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.TransferMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.UnknownMessageReceivedEventArgs))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.XmlSerializerFormatAttribute))]
diff --git a/mcs/class/Facades/System.Text.Encoding.Extensions/AssemblyInfo.cs b/mcs/class/Facades/System.Text.Encoding.Extensions/AssemblyInfo.cs
index e8e33f00cdf..33c51e01878 100644
--- a/mcs/class/Facades/System.Text.Encoding.Extensions/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Text.Encoding.Extensions/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Text.Encoding.Extensions.dll")]
[assembly: AssemblyDescription ("System.Text.Encoding.Extensions.dll")]
[assembly: AssemblyDefaultAlias ("System.Text.Encoding.Extensions.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Text.Encoding.Extensions/Makefile b/mcs/class/Facades/System.Text.Encoding.Extensions/Makefile
index eb7bed83717..b8cbfb22831 100644
--- a/mcs/class/Facades/System.Text.Encoding.Extensions/Makefile
+++ b/mcs/class/Facades/System.Text.Encoding.Extensions/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Text.Encoding.Extensions
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Text.Encoding.Extensions.dll
-LIB_MCS_FLAGS =
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Text.Encoding.Extensions/System.Text.Encoding.Extensions.dll.sources b/mcs/class/Facades/System.Text.Encoding.Extensions/System.Text.Encoding.Extensions.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Text.Encoding.Extensions/System.Text.Encoding.Extensions.dll.sources
+++ b/mcs/class/Facades/System.Text.Encoding.Extensions/System.Text.Encoding.Extensions.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Text.Encoding.Extensions/TypeForwarders.cs b/mcs/class/Facades/System.Text.Encoding.Extensions/TypeForwarders.cs
index 8b7affa11a1..fe366378eb9 100644
--- a/mcs/class/Facades/System.Text.Encoding.Extensions/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Text.Encoding.Extensions/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.UnicodeEncoding))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.UTF8Encoding))]
diff --git a/mcs/class/Facades/System.Text.Encoding/AssemblyInfo.cs b/mcs/class/Facades/System.Text.Encoding/AssemblyInfo.cs
index 5f879260508..ff006b094f9 100644
--- a/mcs/class/Facades/System.Text.Encoding/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Text.Encoding/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Text.Encoding.dll")]
[assembly: AssemblyDescription ("System.Text.Encoding.dll")]
[assembly: AssemblyDefaultAlias ("System.Text.Encoding.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Text.Encoding/Makefile b/mcs/class/Facades/System.Text.Encoding/Makefile
index cdbab840439..bf200cf7c5f 100644
--- a/mcs/class/Facades/System.Text.Encoding/Makefile
+++ b/mcs/class/Facades/System.Text.Encoding/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Text.Encoding
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Text.Encoding.dll
-LIB_MCS_FLAGS =
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Text.Encoding/System.Text.Encoding.dll.sources b/mcs/class/Facades/System.Text.Encoding/System.Text.Encoding.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Text.Encoding/System.Text.Encoding.dll.sources
+++ b/mcs/class/Facades/System.Text.Encoding/System.Text.Encoding.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Text.Encoding/TypeForwarders.cs b/mcs/class/Facades/System.Text.Encoding/TypeForwarders.cs
index d15e3143460..8c132eccc56 100644
--- a/mcs/class/Facades/System.Text.Encoding/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Text.Encoding/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.Decoder))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.DecoderFallbackException))]
diff --git a/mcs/class/Facades/System.Text.RegularExpressions/AssemblyInfo.cs b/mcs/class/Facades/System.Text.RegularExpressions/AssemblyInfo.cs
index 4caaa79a5df..41f882f463e 100644
--- a/mcs/class/Facades/System.Text.RegularExpressions/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Text.RegularExpressions/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Text.RegularExpressions.dll")]
[assembly: AssemblyDescription ("System.Text.RegularExpressions.dll")]
[assembly: AssemblyDefaultAlias ("System.Text.RegularExpressions.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Text.RegularExpressions/Makefile b/mcs/class/Facades/System.Text.RegularExpressions/Makefile
index 34e35c98949..24cd5d7fce2 100644
--- a/mcs/class/Facades/System.Text.RegularExpressions/Makefile
+++ b/mcs/class/Facades/System.Text.RegularExpressions/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Text.RegularExpressions
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Text.RegularExpressions.dll
-LIB_MCS_FLAGS = /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Text.RegularExpressions/System.Text.RegularExpressions.dll.sources b/mcs/class/Facades/System.Text.RegularExpressions/System.Text.RegularExpressions.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Text.RegularExpressions/System.Text.RegularExpressions.dll.sources
+++ b/mcs/class/Facades/System.Text.RegularExpressions/System.Text.RegularExpressions.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Text.RegularExpressions/TypeForwarders.cs b/mcs/class/Facades/System.Text.RegularExpressions/TypeForwarders.cs
index 62e0e5c58b6..be4c7cc58bc 100644
--- a/mcs/class/Facades/System.Text.RegularExpressions/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Text.RegularExpressions/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.RegularExpressions.Capture))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.RegularExpressions.CaptureCollection))]
@@ -32,6 +28,6 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.RegularExpressions.MatchCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.RegularExpressions.MatchEvaluator))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.RegularExpressions.Regex))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.RegularExpressions.RegexOptions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.RegularExpressions.RegexMatchTimeoutException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Text.RegularExpressions.RegexOptions))]
diff --git a/mcs/class/Facades/System.Threading.Tasks.Parallel/AssemblyInfo.cs b/mcs/class/Facades/System.Threading.Tasks.Parallel/AssemblyInfo.cs
index d01e3e586a7..25719f70bf7 100644
--- a/mcs/class/Facades/System.Threading.Tasks.Parallel/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Threading.Tasks.Parallel/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Threading.Tasks.Parallel.dll")]
[assembly: AssemblyDescription ("System.Threading.Tasks.Parallel.dll")]
[assembly: AssemblyDefaultAlias ("System.Threading.Tasks.Parallel.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Threading.Tasks.Parallel/Makefile b/mcs/class/Facades/System.Threading.Tasks.Parallel/Makefile
index 1704d13f704..37059d95bfc 100644
--- a/mcs/class/Facades/System.Threading.Tasks.Parallel/Makefile
+++ b/mcs/class/Facades/System.Threading.Tasks.Parallel/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Threading.Tasks.Parallel
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Threading.Tasks.Parallel.dll
-LIB_MCS_FLAGS =
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Threading.Tasks.Parallel/System.Threading.Tasks.Parallel.dll.sources b/mcs/class/Facades/System.Threading.Tasks.Parallel/System.Threading.Tasks.Parallel.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Threading.Tasks.Parallel/System.Threading.Tasks.Parallel.dll.sources
+++ b/mcs/class/Facades/System.Threading.Tasks.Parallel/System.Threading.Tasks.Parallel.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Threading.Tasks.Parallel/TypeForwarders.cs b/mcs/class/Facades/System.Threading.Tasks.Parallel/TypeForwarders.cs
index 16a8a39a14c..bdf9140205c 100644
--- a/mcs/class/Facades/System.Threading.Tasks.Parallel/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Threading.Tasks.Parallel/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.Parallel))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.ParallelLoopResult))]
diff --git a/mcs/class/Facades/System.Threading.Tasks/AssemblyInfo.cs b/mcs/class/Facades/System.Threading.Tasks/AssemblyInfo.cs
index 94041db6ebf..b4b38c47067 100644
--- a/mcs/class/Facades/System.Threading.Tasks/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Threading.Tasks/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Threading.Tasks.dll")]
[assembly: AssemblyDescription ("System.Threading.Tasks.dll")]
[assembly: AssemblyDefaultAlias ("System.Threading.Tasks.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Threading.Tasks/Makefile b/mcs/class/Facades/System.Threading.Tasks/Makefile
index 57f18235443..2358e77f0ff 100644
--- a/mcs/class/Facades/System.Threading.Tasks/Makefile
+++ b/mcs/class/Facades/System.Threading.Tasks/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Threading.Tasks
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Threading.Tasks.dll
-LIB_MCS_FLAGS = /r:System.Core /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System.Core
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Threading.Tasks/System.Threading.Tasks.dll.sources b/mcs/class/Facades/System.Threading.Tasks/System.Threading.Tasks.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Threading.Tasks/System.Threading.Tasks.dll.sources
+++ b/mcs/class/Facades/System.Threading.Tasks/System.Threading.Tasks.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Threading.Tasks/TypeForwarders.cs b/mcs/class/Facades/System.Threading.Tasks/TypeForwarders.cs
index 9d1d9bd1760..bebef9da525 100644
--- a/mcs/class/Facades/System.Threading.Tasks/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Threading.Tasks/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,35 +18,36 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.TaskExtensions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.AggregateException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.OperationCanceledException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncTaskMethodBuilder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncTaskMethodBuilder<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncVoidMethodBuilder))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ConfiguredTaskAwaitable))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ConfiguredTaskAwaitable<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.IAsyncStateMachine))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ICriticalNotifyCompletion))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.INotifyCompletion))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.TaskAwaiter))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.TaskAwaiter<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.YieldAwaitable))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.CancellationToken))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.CancellationTokenRegistration))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.CancellationTokenSource))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.ConcurrentExclusiveSchedulerPair))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.Task))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.Task<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.TaskCanceledException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.TaskCompletionSource<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.TaskContinuationOptions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.TaskCreationOptions))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.TaskExtensions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.TaskFactory))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.TaskFactory<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.TaskScheduler))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.TaskSchedulerException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.TaskStatus))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.UnobservedTaskExceptionEventArgs))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncTaskMethodBuilder))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncTaskMethodBuilder<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncVoidMethodBuilder))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ConfiguredTaskAwaitable))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.INotifyCompletion))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ICriticalNotifyCompletion))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ConfiguredTaskAwaitable<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.IAsyncStateMachine))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.TaskAwaiter))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.TaskAwaiter<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.YieldAwaitable))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.ConcurrentExclusiveSchedulerPair))]
diff --git a/mcs/class/Facades/System.Threading/AssemblyInfo.cs b/mcs/class/Facades/System.Threading/AssemblyInfo.cs
index 2b90731b7ff..c68b68a0939 100644
--- a/mcs/class/Facades/System.Threading/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Threading/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Threading.dll")]
[assembly: AssemblyDescription ("System.Threading.dll")]
[assembly: AssemblyDefaultAlias ("System.Threading.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Threading/Makefile b/mcs/class/Facades/System.Threading/Makefile
index 5d845c942e0..62788e4c86f 100644
--- a/mcs/class/Facades/System.Threading/Makefile
+++ b/mcs/class/Facades/System.Threading/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Threading
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Threading.dll
-LIB_MCS_FLAGS = /r:System.Core /r:System
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System /r:System.Core
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Threading/System.Threading.dll.sources b/mcs/class/Facades/System.Threading/System.Threading.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Threading/System.Threading.dll.sources
+++ b/mcs/class/Facades/System.Threading/System.Threading.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Threading/TypeForwarders.cs b/mcs/class/Facades/System.Threading/TypeForwarders.cs
index 605b66f26b5..7d6affcb011 100644
--- a/mcs/class/Facades/System.Threading/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Threading/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,32 +18,33 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.SynchronizationContext))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.EventWaitHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.AbandonedMutexException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.AutoResetEvent))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Interlocked))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.ManualResetEvent))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Monitor))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.SendOrPostCallback))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.SynchronizationLockException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.LockRecursionPolicy))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.ReaderWriterLockSlim))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Barrier))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.BarrierPostPhaseException))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Semaphore))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.AbandonedMutexException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.CountdownEvent))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.EventResetMode))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.EventWaitHandle))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Interlocked))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.LazyInitializer))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.LockRecursionException))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.LockRecursionPolicy))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.ManualResetEvent))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.ManualResetEventSlim))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Monitor))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Mutex))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.ReaderWriterLockSlim))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Semaphore))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.SemaphoreFullException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.SemaphoreSlim))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.SendOrPostCallback))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.SpinLock))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.SpinWait))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.SynchronizationContext))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.SynchronizationLockException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.ThreadLocal<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.WaitHandleCannotBeOpenedException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Volatile))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.WaitHandleCannotBeOpenedException))]
diff --git a/mcs/class/Facades/System.Xml.ReaderWriter/AssemblyInfo.cs b/mcs/class/Facades/System.Xml.ReaderWriter/AssemblyInfo.cs
index 54a6d7d37a7..d0510511555 100644
--- a/mcs/class/Facades/System.Xml.ReaderWriter/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Xml.ReaderWriter/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Xml.ReaderWriter.dll")]
[assembly: AssemblyDescription ("System.Xml.ReaderWriter.dll")]
[assembly: AssemblyDefaultAlias ("System.Xml.ReaderWriter.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Xml.ReaderWriter/Makefile b/mcs/class/Facades/System.Xml.ReaderWriter/Makefile
index 5f91ff210c7..57feb51f2aa 100644
--- a/mcs/class/Facades/System.Xml.ReaderWriter/Makefile
+++ b/mcs/class/Facades/System.Xml.ReaderWriter/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Xml.ReaderWriter
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Xml.ReaderWriter.dll
-LIB_MCS_FLAGS = /r:System.Xml
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System.Xml
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Xml.ReaderWriter/System.Xml.ReaderWriter.dll.sources b/mcs/class/Facades/System.Xml.ReaderWriter/System.Xml.ReaderWriter.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Xml.ReaderWriter/System.Xml.ReaderWriter.dll.sources
+++ b/mcs/class/Facades/System.Xml.ReaderWriter/System.Xml.ReaderWriter.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Xml.ReaderWriter/TypeForwarders.cs b/mcs/class/Facades/System.Xml.ReaderWriter/TypeForwarders.cs
index 0d3ab53df0d..f3ee0d8101f 100644
--- a/mcs/class/Facades/System.Xml.ReaderWriter/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Xml.ReaderWriter/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,21 +18,24 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.ConformanceLevel))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.DtdProcessing))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.IXmlLineInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.IXmlNamespaceResolver))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.NamespaceHandling))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlNameTable))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.NameTable))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.NewLineHandling))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.ReadState))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Schema.XmlSchema))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Schema.XmlSchemaForm))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.WriteState))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlConvert))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlNamespaceManager))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlNamespaceScope))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlNameTable))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlNodeType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlParserContext))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlQualifiedName))]
@@ -46,6 +44,4 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlSpace))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlWriter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.XmlWriterSettings))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Schema.XmlSchema))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Schema.XmlSchemaForm))]
diff --git a/mcs/class/Facades/System.Xml.XDocument/AssemblyInfo.cs b/mcs/class/Facades/System.Xml.XDocument/AssemblyInfo.cs
index e3f2265166d..bd6476be523 100644
--- a/mcs/class/Facades/System.Xml.XDocument/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Xml.XDocument/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Xml.XDocument.dll")]
[assembly: AssemblyDescription ("System.Xml.XDocument.dll")]
[assembly: AssemblyDefaultAlias ("System.Xml.XDocument.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Xml.XDocument/Makefile b/mcs/class/Facades/System.Xml.XDocument/Makefile
index a02bc52e680..2f2aa6fabdd 100644
--- a/mcs/class/Facades/System.Xml.XDocument/Makefile
+++ b/mcs/class/Facades/System.Xml.XDocument/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Xml.XDocument
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Xml.XDocument.dll
-LIB_MCS_FLAGS = /r:System.Xml.Linq /r:System.Xml
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System.Xml.Linq /r:System.Xml
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Xml.XDocument/System.Xml.XDocument.dll.sources b/mcs/class/Facades/System.Xml.XDocument/System.Xml.XDocument.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Xml.XDocument/System.Xml.XDocument.dll.sources
+++ b/mcs/class/Facades/System.Xml.XDocument/System.Xml.XDocument.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Xml.XDocument/TypeForwarders.cs b/mcs/class/Facades/System.Xml.XDocument/TypeForwarders.cs
index 4a74cd240e9..4bedfba794f 100644
--- a/mcs/class/Facades/System.Xml.XDocument/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Xml.XDocument/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,15 +18,13 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.Extensions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.LoadOptions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.ReaderOptions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.SaveOptions))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XObject))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XNode))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XText))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XCData))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XComment))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XContainer))]
@@ -41,10 +34,13 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XElement))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XName))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XNamespace))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XNode))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XNodeDocumentOrderComparer))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XNodeEqualityComparer))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XObject))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XObjectChange))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XObjectChangeEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XProcessingInstruction))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XStreamingElement))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Linq.XText))]
diff --git a/mcs/class/Facades/System.Xml.XmlSerializer/AssemblyInfo.cs b/mcs/class/Facades/System.Xml.XmlSerializer/AssemblyInfo.cs
index 4a33ba5a72f..71235d79b0b 100644
--- a/mcs/class/Facades/System.Xml.XmlSerializer/AssemblyInfo.cs
+++ b/mcs/class/Facades/System.Xml.XmlSerializer/AssemblyInfo.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,6 +18,7 @@
// 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;
@@ -31,10 +27,9 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Xml.XmlSerializer.dll")]
[assembly: AssemblyDescription ("System.Xml.XmlSerializer.dll")]
[assembly: AssemblyDefaultAlias ("System.Xml.XmlSerializer.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -42,3 +37,5 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Xml.XmlSerializer/Makefile b/mcs/class/Facades/System.Xml.XmlSerializer/Makefile
index 700ad785b56..c627fca3050 100644
--- a/mcs/class/Facades/System.Xml.XmlSerializer/Makefile
+++ b/mcs/class/Facades/System.Xml.XmlSerializer/Makefile
@@ -1,15 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
thisdir = class/Facades/System.Xml.XmlSerializer
SUBDIRS =
-include ../../../build/rules.make
+include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Xml.XmlSerializer.dll
-LIB_MCS_FLAGS = /r:System.Xml
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib /r:System.Xml
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
-include ../../../build/library.make
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Xml.XmlSerializer/System.Xml.XmlSerializer.dll.sources b/mcs/class/Facades/System.Xml.XmlSerializer/System.Xml.XmlSerializer.dll.sources
index 74532efb2ea..8e33d4ddeae 100644
--- a/mcs/class/Facades/System.Xml.XmlSerializer/System.Xml.XmlSerializer.dll.sources
+++ b/mcs/class/Facades/System.Xml.XmlSerializer/System.Xml.XmlSerializer.dll.sources
@@ -1,3 +1,3 @@
-AssemblyInfo.cs
TypeForwarders.cs
-../../../build/common/Consts.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Xml.XmlSerializer/TypeForwarders.cs b/mcs/class/Facades/System.Xml.XmlSerializer/TypeForwarders.cs
index bda6911b92a..df2b775f4ec 100644
--- a/mcs/class/Facades/System.Xml.XmlSerializer/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Xml.XmlSerializer/TypeForwarders.cs
@@ -1,21 +1,16 @@
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
+//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -23,28 +18,29 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+//
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlSerializer))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlArrayItemAttributes))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAttributeOverrides))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAttributes))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlElementAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.IXmlSerializable))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAnyAttributeAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAnyElementAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAnyElementAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlArrayAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlArrayItemAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlArrayItemAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAttributeAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAttributeOverrides))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlChoiceIdentifierAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlElementAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlElementAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlEnumAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlIgnoreAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlIncludeAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlNamespaceDeclarationsAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlRootAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlSchemaProviderAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlSerializer))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlSerializerNamespaces))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlTextAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlTypeAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAnyElementAttributes))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlSerializerNamespaces))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAnyElementAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlNamespaceDeclarationsAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAnyAttributeAttribute))]
diff --git a/mcs/class/I18N/CJK/ISO2022JP.cs b/mcs/class/I18N/CJK/ISO2022JP.cs
index 675cd2a333f..cd79fad402b 100644
--- a/mcs/class/I18N/CJK/ISO2022JP.cs
+++ b/mcs/class/I18N/CJK/ISO2022JP.cs
@@ -642,7 +642,7 @@ namespace I18N.CJK
continue;
}
i++;
- if (bytes [i] == 0x42)
+ if (bytes [i] == 0x42 || bytes [i] == 0x40)
m = wide ? ISO2022JPMode.JISX0208 : ISO2022JPMode.ASCII;
else if (bytes [i] == 0x4A) // obsoleted
m = ISO2022JPMode.ASCII;
@@ -730,7 +730,7 @@ namespace I18N.CJK
continue;
}
i++;
- if (bytes [i] == 0x42)
+ if (bytes [i] == 0x42 || bytes [i] == 0x40)
m = wide ? ISO2022JPMode.JISX0208 : ISO2022JPMode.ASCII;
else if (bytes [i] == 0x4A) // obsoleted
m = ISO2022JPMode.ASCII;
diff --git a/mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs b/mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs
index ddc58c7fd15..274ee160adc 100644
--- a/mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs
+++ b/mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs
@@ -575,6 +575,14 @@ namespace MonoTests.I18N.CJK
Assert.AreEqual ("don\u2019t", s);
}
+
+ [Test]
+ public void Bug14591 ()
+ {
+ var expected = "\u4f50\u85e4\u8c4a";
+ var text = Encoding.GetEncoding ("iso-2022-jp").GetString (Convert.FromBase64String ("GyRAOjRGI0stGyhK"));
+ Assert.AreEqual (expected, text, "#1");
+ }
#endregion
#region Korean
diff --git a/mcs/class/Makefile b/mcs/class/Makefile
index 67eeae47cbf..db444031339 100644
--- a/mcs/class/Makefile
+++ b/mcs/class/Makefile
@@ -68,6 +68,7 @@ common_dirs := \
Novell.Directory.Ldap \
Mono.Security.Win32 \
System.DirectoryServices \
+ System.DirectoryServices.Protocols \
RabbitMQ.Client \
Mono.Messaging \
System.Messaging \
@@ -105,7 +106,6 @@ net_2_0_dirs := \
System.Web.Extensions.Design \
System.ComponentModel.DataAnnotations \
System.Web.DynamicData \
- System.ServiceModel.Web \
System.Web.Mvc2 \
Mono.C5 \
Mono.Management \
@@ -123,9 +123,12 @@ net_2_0_only_dirs := \
System.Web.Extensions.Design_1.0 \
Compat.ICSharpCode.SharpZipLib \
WindowsBase \
+ System.ServiceModel.Web \
System.Data.Services.Client \
System.Data.Services \
- System.Web.Mvc
+ System.Web.Mvc \
+
+pcl_facade_dirs := Facades
mobile_dirs := \
corlib \
@@ -155,7 +158,7 @@ mobile_dirs := \
System.Net \
System.Windows \
System.Xml.Serialization \
- Facades
+ $(pcl_facade_dirs)
monodroid_dirs := \
Mono.CompilerServices.SymbolWriter \
@@ -164,33 +167,7 @@ monodroid_dirs := \
System.Net.Http
monotouch_runtime_dirs := \
- corlib \
- System \
- System.XML \
- Mono.Posix \
- System.Core \
- Mono.Security \
- System \
- System.Security \
- System.Configuration \
- System \
- System.XML \
- $(resgen_dir) \
- System.Drawing \
- System.Transactions \
- System.EnterpriseServices \
- Mono.Data.Tds \
- System.Data \
- Accessibility \
- Mono.WebBrowser \
- System.Runtime.Serialization.Formatters.Soap \
- Managed.Windows.Forms \
- Mono.Data.Sqlite \
- System.Web.ApplicationServices \
- System.Web \
- Mono.Web \
- System.Web.Services \
- System.Web
+ corlib
net_3_5_only_dirs := \
Microsoft.Build.Framework \
@@ -205,6 +182,8 @@ net_4_0_dirs := \
System.Windows.Forms.DataVisualization \
System.Xaml \
WindowsBase \
+ System.ServiceModel.Activation \
+ System.ServiceModel \
System.ServiceModel.Routing \
System.ServiceModel.Discovery \
System.Runtime.Caching \
@@ -222,6 +201,7 @@ net_4_0_dirs := \
System.Reactive.Debugger \
Microsoft.Web.Infrastructure \
WebMatrix.Data \
+ System.ServiceModel.Web \
System.Data.Services.Client \
System.Data.Services \
System.Json.Microsoft \
@@ -251,12 +231,13 @@ net_4_5_dirs := \
System.IO.Compression.FileSystem \
System.Windows \
System.Xml.Serialization \
- Facades
+ $(pcl_facade_dirs)
net_2_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_2_0_only_dirs) aot-compiler
monodroid_SUBDIRS := $(mobile_dirs) $(monodroid_dirs)
monotouch_SUBDIRS := $(mobile_dirs)
monotouch_runtime_SUBDIRS := $(monotouch_runtime_dirs)
+mobile_static_SUBDIRS := $(mobile_dirs)
mobile_SUBDIRS := $(mobile_dirs)
net_3_5_SUBDIRS := $(net_3_5_only_dirs)
net_4_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs)
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Hwnd.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Hwnd.cs
index 404c0e2156a..505a41a0449 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Hwnd.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Hwnd.cs
@@ -76,6 +76,7 @@ namespace System.Windows.Forms {
internal bool whacky_wm;
internal bool fixed_size;
internal bool zombie; /* X11 only flag. true if the X windows have been destroyed but we haven't been Disposed */
+ internal bool topmost; /* X11 only. */
internal Region user_clip;
internal XEventQueue queue;
internal WindowExStyles initial_ex_style;
@@ -122,6 +123,7 @@ namespace System.Windows.Forms {
children = new ArrayList ();
resizing_or_moving = false;
whacky_wm = false;
+ topmost = false;
}
public void Dispose() {
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuStrip.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuStrip.cs
index 8cad840c4ee..8470f2987b7 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuStrip.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MenuStrip.cs
@@ -173,6 +173,8 @@ namespace System.Windows.Forms
this.MenuDroppedDown = false;
base.Dismiss (reason);
+
+ this.FireMenuDeactivate ();
}
internal void FireMenuActivate ()
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs
index 45f3ff801f1..30c0d89f5fb 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs
@@ -894,7 +894,7 @@ namespace System.Windows.Forms
if (this is MenuStrip && mouse_currently_over is ToolStripMenuItem && !(mouse_currently_over as ToolStripMenuItem).HasDropDownItems)
return;
} else {
- this.HideMenus (true, ToolStripDropDownCloseReason.AppClicked);
+ this.Dismiss (ToolStripDropDownCloseReason.AppClicked);
}
if (this is MenuStrip)
@@ -1503,17 +1503,6 @@ namespace System.Windows.Forms
this.GetTopLevelToolStrip ().Dismiss (ToolStripDropDownCloseReason.ItemClicked);
}
- internal void HideMenus (bool release, ToolStripDropDownCloseReason reason)
- {
- if (this is MenuStrip && release && menu_selected)
- (this as MenuStrip).FireMenuDeactivate ();
-
- if (release)
- menu_selected = false;
-
- NotifySelectedChanged (null);
- }
-
internal void NotifySelectedChanged (ToolStripItem tsi)
{
foreach (ToolStripItem tsi2 in this.DisplayedItems)
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs
index da16b149adc..4df33979088 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs
@@ -315,12 +315,9 @@ namespace System.Windows.Forms
protected override void OnMouseUp (MouseEventArgs e)
{
if (this.close_on_mouse_release) {
- this.DropDown.Dismiss (ToolStripDropDownCloseReason.ItemClicked);
+ this.Parent.Dismiss (ToolStripDropDownCloseReason.ItemClicked);
this.Invalidate ();
this.close_on_mouse_release = false;
-
- if (!this.IsOnDropDown && this.Parent is MenuStrip)
- (this.Parent as MenuStrip).MenuDroppedDown = false;
}
if (!this.HasDropDownItems && Enabled)
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
index 9b6c13014ae..be296615725 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
@@ -1619,11 +1619,23 @@ namespace System.Windows.Forms {
if (hwnd.zombie)
return;
- if ((windows & WindowType.Whole) != 0) {
- XMapWindow(DisplayHandle, hwnd.whole_window);
- }
- if ((windows & WindowType.Client) != 0) {
- XMapWindow(DisplayHandle, hwnd.client_window);
+ if (hwnd.topmost) {
+ // Most window managers will respect the _NET_WM_STATE property.
+ // If not, use XMapRaised to map the window at the top level as
+ // a last ditch effort.
+ if ((windows & WindowType.Whole) != 0) {
+ XMapRaised(DisplayHandle, hwnd.whole_window);
+ }
+ if ((windows & WindowType.Client) != 0) {
+ XMapRaised(DisplayHandle, hwnd.client_window);
+ }
+ } else {
+ if ((windows & WindowType.Whole) != 0) {
+ XMapWindow(DisplayHandle, hwnd.whole_window);
+ }
+ if ((windows & WindowType.Client) != 0) {
+ XMapWindow(DisplayHandle, hwnd.client_window);
+ }
}
hwnd.mapped = true;
@@ -2972,13 +2984,8 @@ namespace System.Windows.Forms {
XSelectInput(DisplayHandle, hwnd.client_window, new IntPtr ((int)(SelectInputMask | EventMask.StructureNotifyMask | Keyboard.KeyEventMask)));
}
- if (ExStyleSet (cp.ExStyle, WindowExStyles.WS_EX_TOPMOST)) {
- atoms = new int[2];
- atoms[0] = _NET_WM_WINDOW_TYPE_NORMAL.ToInt32();
- XChangeProperty(DisplayHandle, hwnd.whole_window, _NET_WM_WINDOW_TYPE, (IntPtr)Atom.XA_ATOM, 32, PropertyMode.Replace, atoms, 1);
-
- XSetTransientForHint (DisplayHandle, hwnd.whole_window, RootWindow);
- }
+ if (ExStyleSet (cp.ExStyle, WindowExStyles.WS_EX_TOPMOST))
+ SetTopmost(hwnd.whole_window, true);
SetWMStyles(hwnd, cp);
@@ -5787,6 +5794,7 @@ namespace System.Windows.Forms {
{
Hwnd hwnd = Hwnd.ObjectFromHandle(handle);
+ hwnd.topmost = enabled;
if (enabled) {
lock (XlibLock) {
@@ -6405,6 +6413,13 @@ namespace System.Windows.Forms {
DebugHelper.TraceWriteLine ("XMapWindow");
return _XMapWindow(display, window);
}
+ [DllImport ("libX11", EntryPoint="XMapRaised")]
+ internal extern static int _XMapRaised(IntPtr display, IntPtr window);
+ internal static int XMapRaised(IntPtr display, IntPtr window)
+ {
+ DebugHelper.TraceWriteLine ("XMapRaised");
+ return _XMapRaised(display, window);
+ }
[DllImport ("libX11", EntryPoint="XUnmapWindow")]
internal extern static int _XUnmapWindow(IntPtr display, IntPtr window);
internal static int XUnmapWindow(IntPtr display, IntPtr window)
@@ -7255,6 +7270,9 @@ namespace System.Windows.Forms {
[DllImport ("libX11", EntryPoint="XMapWindow")]
internal extern static int XMapWindow(IntPtr display, IntPtr window);
+ [DllImport ("libX11", EntryPoint="XMapRaised")]
+ internal extern static int XMapRaised(IntPtr display, IntPtr window);
+
[DllImport ("libX11", EntryPoint="XUnmapWindow")]
internal extern static int XUnmapWindow(IntPtr display, IntPtr window);
diff --git a/mcs/class/Managed.Windows.Forms/build-csproj b/mcs/class/Managed.Windows.Forms/build-csproj
index abfee61e418..8479a337f0b 100755
--- a/mcs/class/Managed.Windows.Forms/build-csproj
+++ b/mcs/class/Managed.Windows.Forms/build-csproj
@@ -177,7 +177,7 @@ SWFresourcelist()
{
cat $Resource | while read SRC; do
SRC=`echo $SRC | $tr '/' '\\\\'`
-SRC=`echo $SRC | sed 's/-resource://' | gawk -F , '{print " RelPath = \"" $1 "\"\n CustomToolNameSpace = \"" $2 "\""}' | fgrep -v \"\"`
+SRC=`echo $SRC | sed 's/-resource://' | awk -F , '{print " RelPath = \"" $1 "\"\n CustomToolNameSpace = \"" $2 "\""}' | fgrep -v \"\"`
cat << EOT
<File
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionFactorExpresion.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionFactorExpresion.cs
index 709fedf1ce8..bf619219025 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionFactorExpresion.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionFactorExpresion.cs
@@ -109,6 +109,11 @@ namespace Microsoft.Build.BuildEngine {
{
if (token.Type == TokenType.Number)
return true;
+ else if (token.Type == TokenType.String) {
+ var text = StringEvaluate (context);
+ Single number;
+ return Single.TryParse (text, out number);
+ }
else
return false;
}
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/DirectoryScanner.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/DirectoryScanner.cs
index 624bd71ac7f..4636d27250b 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/DirectoryScanner.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/DirectoryScanner.cs
@@ -96,14 +96,17 @@ namespace Microsoft.Build.BuildEngine {
return;
int offset = 0;
+ string full_path;
if (Path.IsPathRooted (name)) {
+ full_path = name;
baseDirectory = new DirectoryInfo (Path.GetPathRoot (name));
if (IsRunningOnWindows)
// skip the "drive:"
offset = 1;
+ } else {
+ full_path = Path.GetFullPath (Path.Combine (Environment.CurrentDirectory, name));
}
- string full_path = Path.GetFullPath (Path.Combine (Environment.CurrentDirectory, include_item.ItemSpec));
fileInfo = ParseIncludeExclude (separatedPath, offset, baseDirectory);
int wildcard_offset = full_path.IndexOf ("**");
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Engine.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Engine.cs
index 51b9f4588a7..577a4379d29 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Engine.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Engine.cs
@@ -118,6 +118,11 @@ namespace Microsoft.Build.BuildEngine {
Toolsets.Add (new Toolset ("4.0",
ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version40)));
#endif
+#if NET_4_5
+ Toolsets.Add (new Toolset("12.0",
+ ToolLocationHelper.GetMSBuildInstallPath ("12.0"),
+ ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version40)));
+#endif
}
[MonoTODO]
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs
index 653f4a80b23..351aea02087 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs
@@ -159,12 +159,23 @@ namespace Microsoft.Build.BuildEngine {
else
base_dir_info = new DirectoryInfo (Directory.GetCurrentDirectory ());
- IEnumerable<string> extn_paths = has_extn_ref ? GetExtensionPaths (project) : new string [] {null};
+ var importPaths = GetImportPathsFromString (project_attribute, project, base_dir_info);
+ var extensionPaths = GetExtensionPaths (project);
+
+ if (!has_extn_ref) {
+ foreach (var importPath in importPaths) {
+ foreach (var extensionPath in extensionPaths) {
+ has_extn_ref = has_extn_ref || importPath.IndexOf (extensionPath) >= 0;
+ }
+ }
+ }
+
+ IEnumerable<string> extn_paths = has_extn_ref ? extensionPaths : new string [] { null };
bool import_needed = false;
var currentLoadSettings = project.ProjectLoadSettings;
-
+
try {
- foreach (var settings in new ProjectLoadSettings [] { ProjectLoadSettings.None, currentLoadSettings}) {
+ foreach (var settings in new ProjectLoadSettings [] { ProjectLoadSettings.None, currentLoadSettings }) {
foreach (string path in extn_paths) {
string extn_msg = null;
if (has_extn_ref) {
@@ -183,7 +194,7 @@ namespace Microsoft.Build.BuildEngine {
// We stop if atleast one file got imported.
// Remaining extension paths are *not* tried
bool atleast_one = false;
- foreach (string importPath in GetImportPathsFromString (project_attribute, project, base_dir_info)) {
+ foreach (string importPath in importPaths) {
try {
if (func (importPath, extn_msg))
atleast_one = true;
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs
index 5c66cf72308..d7edd5f2961 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs
@@ -555,7 +555,8 @@ namespace Microsoft.Build.BuildEngine {
public void Load (TextReader textReader, ProjectLoadSettings projectLoadSettings)
{
project_load_settings = projectLoadSettings;
- fullFileName = String.Empty;
+ if (!string.IsNullOrEmpty (fullFileName))
+ PushThisFileProperty (fullFileName);
DoLoad (textReader);
}
@@ -567,7 +568,8 @@ namespace Microsoft.Build.BuildEngine {
public void LoadXml (string projectXml, ProjectLoadSettings projectLoadSettings)
{
project_load_settings = projectLoadSettings;
- fullFileName = String.Empty;
+ if (!string.IsNullOrEmpty (fullFileName))
+ PushThisFileProperty (fullFileName);
DoLoad (new StringReader (projectXml));
MarkProjectAsDirty ();
}
@@ -935,6 +937,9 @@ namespace Microsoft.Build.BuildEngine {
case "Import":
AddImport (xe, ip, true);
break;
+ case "ImportGroup":
+ AddImportGroup (xe, ip, true);
+ break;
case "ItemGroup":
AddItemGroup (xe, ip);
break;
@@ -945,7 +950,7 @@ namespace Microsoft.Build.BuildEngine {
AddChoose (xe, ip);
break;
default:
- throw new InvalidProjectFileException (String.Format ("Invalid element '{0}' in project file.", xe.Name));
+ throw new InvalidProjectFileException (String.Format ("Invalid element '{0}' in project file '{1}'.", xe.Name, ip.FullFileName));
}
}
}
@@ -1027,7 +1032,17 @@ namespace Microsoft.Build.BuildEngine {
SetExtensionsPathProperties (DefaultExtensionsPath);
evaluatedProperties.AddProperty (new BuildProperty ("MSBuildProjectDefaultTargets", DefaultTargets, PropertyType.Reserved));
evaluatedProperties.AddProperty (new BuildProperty ("OS", OS, PropertyType.Environment));
-
+#if NET_4_5
+ // see http://msdn.microsoft.com/en-us/library/vstudio/hh162058(v=vs.120).aspx
+ if (effective_tools_version == "12.0") {
+ evaluatedProperties.AddProperty (new BuildProperty ("MSBuildToolsPath32", toolsPath, PropertyType.Reserved));
+ string frameworkToolsPath = parentEngine.Toolsets [effective_tools_version].FrameworkToolsPath;
+ if (frameworkToolsPath == null)
+ throw new Exception (String.Format ("Invalid tools version '{0}', no framework tools path set for this.", effective_tools_version));
+ evaluatedProperties.AddProperty (new BuildProperty ("MSBuildFrameworkToolsPath", frameworkToolsPath, PropertyType.Reserved));
+ evaluatedProperties.AddProperty (new BuildProperty ("MSBuildFrameworkToolsPath32", frameworkToolsPath, PropertyType.Reserved));
+ }
+#endif
// FIXME: make some internal method that will work like GetDirectoryName but output String.Empty on null/String.Empty
string projectDir;
if (FullFileName == String.Empty)
@@ -1102,9 +1117,10 @@ namespace Microsoft.Build.BuildEngine {
void AddImport (XmlElement xmlElement, ImportedProject importingProject, bool evaluate_properties)
{
// eval all the properties etc till the import
- if (evaluate_properties)
+ if (evaluate_properties) {
groupingCollection.Evaluate (EvaluationType.Property);
-
+ groupingCollection.Evaluate (EvaluationType.Choose);
+ }
try {
PushThisFileProperty (importingProject != null ? importingProject.FullFileName : FullFileName);
@@ -1119,6 +1135,30 @@ namespace Microsoft.Build.BuildEngine {
}
}
+ void AddImportGroup (XmlElement xmlElement, ImportedProject importedProject, bool evaluate_properties)
+ {
+ // eval all the properties etc till the import group
+ if (evaluate_properties) {
+ groupingCollection.Evaluate (EvaluationType.Property);
+ groupingCollection.Evaluate (EvaluationType.Choose);
+ }
+ string condition_attribute = xmlElement.GetAttribute ("Condition");
+ if (!ConditionParser.ParseAndEvaluate (condition_attribute, this))
+ return;
+ foreach (XmlNode xn in xmlElement.ChildNodes) {
+ if (xn is XmlElement) {
+ XmlElement xe = (XmlElement) xn;
+ switch (xe.Name) {
+ case "Import":
+ AddImport (xe, importedProject, evaluate_properties);
+ break;
+ default:
+ throw new InvalidProjectFileException(String.Format("Invalid element '{0}' inside ImportGroup in project file '{1}'.", xe.Name, importedProject.FullFileName));
+ }
+ }
+ }
+ }
+
bool AddSingleImport (XmlElement xmlElement, string projectPath, ImportedProject importingProject, string from_source_msg)
{
Import import = new Import (xmlElement, projectPath, this, importingProject);
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Toolset.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Toolset.cs
index 5db46fcbfbd..0957f298c50 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Toolset.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Toolset.cs
@@ -31,15 +31,21 @@ namespace Microsoft.Build.BuildEngine
{
public class Toolset
{
- public Toolset (string toolsVersion, string toolsPath, BuildPropertyGroup buildProperties)
+ public Toolset (string toolsVersion, string toolsPath, string toolsFrameworkPath, BuildPropertyGroup buildProperties)
{
ToolsVersion = toolsVersion;
ToolsPath = toolsPath;
+ FrameworkToolsPath = toolsFrameworkPath;
BuildProperties = buildProperties;
}
-
- public Toolset (string toolsVersion, string toolsPath)
- : this (toolsVersion, toolsPath, null)
+
+ public Toolset (string toolsVersion, string toolsPath, string toolsFrameworkPath)
+ : this (toolsVersion, toolsPath, toolsFrameworkPath, null)
+ {
+ }
+
+ public Toolset(string toolsVersion, string toolsPath)
+ : this (toolsVersion, toolsPath, toolsPath)
{
}
@@ -47,5 +53,6 @@ namespace Microsoft.Build.BuildEngine
public string ToolsVersion { get; private set; }
public string ToolsPath { get; private set; }
+ public string FrameworkToolsPath { get; private set; }
}
}
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/ProjectTest.cs b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/ProjectTest.cs
index 8a78fad3c8e..48aba112fb9 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/ProjectTest.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/ProjectTest.cs
@@ -2231,6 +2231,17 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
}
}
+ [Test]
+ public void FileNameNotResetOnLoad ()
+ {
+ // Test for bug #14295
+ Project p = new Project ();
+ p.FullFileName = "foo";
+ p.LoadXml ("<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\"/>");
+ Assert.AreEqual ("foo", p.FullFileName);
+ Assert.AreEqual ("foo", p.EvaluatedProperties ["MSBuildThisFile"].Value);
+ }
+
void DeleteAllInDir (string path)
{
if (!Directory.Exists (path))
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/TargetTest.cs b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/TargetTest.cs
index 74d597e24b2..2cced758f05 100644
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/TargetTest.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine/TargetTest.cs
@@ -366,7 +366,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
var type = Type.GetType ("Microsoft.Build.Evaluation.ProjectCollection, Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
var prop = type.GetProperty ("GlobalProjectCollection");
- var coll = prop.GetValue (null);
+ var coll = prop.GetValue (null, null);
var loadProject = coll.GetType ().GetMethod (
"LoadProject", new Type[] { typeof (XmlReader), typeof (string) });
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework.dll.sources b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework.dll.sources
index 3b83e2da7b9..255a6855403 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework.dll.sources
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework.dll.sources
@@ -29,6 +29,7 @@ Microsoft.Build.Framework/ITask.cs
Microsoft.Build.Framework/ITaskHost.cs
Microsoft.Build.Framework/ITaskItem.cs
Microsoft.Build.Framework/ITaskItem2.cs
+Microsoft.Build.Framework/LazyFormattedBuildEventArgs.cs
Microsoft.Build.Framework/LoadInSeparateAppDomainAttribute.cs
Microsoft.Build.Framework/LoggerException.cs
Microsoft.Build.Framework/LoggerVerbosity.cs
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventArgs.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventArgs.cs
index 60be917bf46..f94f11c265a 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventArgs.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventArgs.cs
@@ -49,12 +49,18 @@ namespace Microsoft.Build.Framework
protected BuildEventArgs (string message, string helpKeyword,
string senderName)
+ : this (message, helpKeyword, senderName, DateTime.Now)
+ {
+ }
+
+ protected BuildEventArgs (string message, string helpKeyword,
+ string senderName, DateTime eventTimestamp)
{
this.message = message;
this.helpKeyword = helpKeyword;
this.senderName = senderName;
this.threadId = Thread.CurrentThread.GetHashCode ();
- this.timestamp = DateTime.Now;
+ this.timestamp = eventTimestamp;
}
public string HelpKeyword {
@@ -90,4 +96,4 @@ namespace Microsoft.Build.Framework
}
}
-#endif \ No newline at end of file
+#endif
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildFinishedEventArgs.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildFinishedEventArgs.cs
index 6397a9e0d1d..6595f05f0d9 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildFinishedEventArgs.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildFinishedEventArgs.cs
@@ -43,7 +43,25 @@ namespace Microsoft.Build.Framework {
public BuildFinishedEventArgs (string message,
string helpKeyword,
bool succeeded)
- : base (message, helpKeyword, null)
+ : this (message, helpKeyword, succeeded, DateTime.Now)
+ {
+ }
+
+ public BuildFinishedEventArgs (string message,
+ string helpKeyword,
+ bool succeeded,
+ DateTime eventTimestamp)
+ : base (message, helpKeyword, null, eventTimestamp)
+ {
+ this.succeeded = succeeded;
+ }
+
+ public BuildFinishedEventArgs (string message,
+ string helpKeyword,
+ bool succeeded,
+ DateTime eventTimestamp,
+ params object [] messageArgs)
+ : base (message, helpKeyword, null, eventTimestamp, messageArgs)
{
this.succeeded = succeeded;
}
@@ -56,4 +74,4 @@ namespace Microsoft.Build.Framework {
}
}
-#endif \ No newline at end of file
+#endif
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStartedEventArgs.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStartedEventArgs.cs
index 8a48d844cc8..54b0303b301 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStartedEventArgs.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStartedEventArgs.cs
@@ -29,6 +29,7 @@
#if NET_2_0
using System;
+using System.Collections.Generic;
namespace Microsoft.Build.Framework {
[Serializable]
@@ -40,10 +41,34 @@ namespace Microsoft.Build.Framework {
public BuildStartedEventArgs (string message,
string helpKeyword)
+ : this (message, helpKeyword, DateTime.Now)
+ {
+ }
+
+ public BuildStartedEventArgs (string message,
+ string helpKeyword,
+ IDictionary<string, string> environmentOfBuild)
: base (message, helpKeyword, null)
{
+ // deal with environmentOfBuild
+ throw new NotImplementedException ();
+ }
+
+ public BuildStartedEventArgs (string message,
+ string helpKeyword,
+ DateTime eventTimestamp)
+ : base (message, helpKeyword, null, eventTimestamp)
+ {
+ }
+
+ public BuildStartedEventArgs (string message,
+ string helpKeyword,
+ DateTime eventTimestamp,
+ params object [] messageArgs)
+ : base (message, helpKeyword, null, eventTimestamp, messageArgs)
+ {
}
}
}
-#endif \ No newline at end of file
+#endif
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStatusEventArgs.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStatusEventArgs.cs
index e3bf6c235d3..cad96026ff1 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStatusEventArgs.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStatusEventArgs.cs
@@ -33,7 +33,7 @@ using System;
namespace Microsoft.Build.Framework
{
[Serializable]
- public abstract class BuildStatusEventArgs : BuildEventArgs {
+ public abstract class BuildStatusEventArgs : LazyFormattedBuildEventArgs {
protected BuildStatusEventArgs ()
{
@@ -45,7 +45,24 @@ namespace Microsoft.Build.Framework
: base (message, helpKeyword, senderName)
{
}
+
+ protected BuildStatusEventArgs (string message,
+ string helpKeyword,
+ string senderName,
+ DateTime eventTimestamp)
+ : base (message, helpKeyword, senderName, eventTimestamp)
+ {
+ }
+
+ protected BuildStatusEventArgs (string message,
+ string helpKeyword,
+ string senderName,
+ DateTime eventTimestamp,
+ params object [] messageArgs)
+ : base (message, helpKeyword, senderName, eventTimestamp, messageArgs)
+ {
+ }
}
}
-#endif \ No newline at end of file
+#endif
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/LazyFormattedBuildEventArgs.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/LazyFormattedBuildEventArgs.cs
new file mode 100644
index 00000000000..398578430f0
--- /dev/null
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/LazyFormattedBuildEventArgs.cs
@@ -0,0 +1,55 @@
+//
+// LazyFormattedBuildEventArgs.cs
+//
+// Author:
+// Atsushi Enomoto <atsushi@xamarin.com>
+//
+// (C) 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 System.Threading;
+
+namespace Microsoft.Build.Framework
+{
+ [Serializable]
+ public abstract class LazyFormattedBuildEventArgs : BuildEventArgs
+ {
+
+ protected LazyFormattedBuildEventArgs ()
+ : this (null, null, null)
+ {
+ }
+
+ protected LazyFormattedBuildEventArgs (string message, string helpKeyword,
+ string senderName)
+ : this (message, helpKeyword, senderName, DateTime.Now)
+ {
+ }
+
+ protected LazyFormattedBuildEventArgs (string message, string helpKeyword,
+ string senderName, DateTime eventTimestamp,
+ params object [] messageArgs)
+ : base (string.Format (message, messageArgs), helpKeyword, senderName, eventTimestamp)
+ {
+ }
+ }
+}
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GenerateResource.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GenerateResource.cs
index 98f614613c2..60dd7a68c4b 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GenerateResource.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GenerateResource.cs
@@ -82,7 +82,7 @@ namespace Microsoft.Build.Tasks {
result &= CompileResourceFile (sourceFile, outputFile);
ITaskItem newItem = new TaskItem (source);
- source.ItemSpec = outputFile;
+ newItem.ItemSpec = outputFile;
temporaryFilesWritten.Add (newItem);
}
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetReferenceAssemblyPaths.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetReferenceAssemblyPaths.cs
index b590d2dacba..e78b92dc8fc 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetReferenceAssemblyPaths.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetReferenceAssemblyPaths.cs
@@ -60,6 +60,8 @@ namespace Microsoft.Build.Tasks
Log.LogWarning ("Unable to find framework corresponding to the target framework moniker '{0}'. " +
"Framework assembly references will be resolved from the GAC, which might not be " +
"the intended behavior.", TargetFrameworkMoniker);
+ if (moniker.Identifier.Equals (".NETPortable"))
+ return CheckPclReferenceAssemblies (moniker);
return true;
}
@@ -69,6 +71,17 @@ namespace Microsoft.Build.Tasks
return true;
}
+ bool CheckPclReferenceAssemblies (FrameworkMoniker moniker)
+ {
+ // Check for a supported profile
+ var check = new FrameworkMoniker (".NETPortable", "v4.0", "Profile24");
+ if (GetFrameworkDirectoriesForMoniker (check) != null)
+ Log.LogError ("Unsupported PCL Profile '{0}'.", moniker);
+ else
+ Log.LogError ("PCL Reference Assemblies not installed.");
+ return false;
+ }
+
Framework GetFrameworkDirectoriesForMoniker (FrameworkMoniker moniker)
{
string dirs = String.Join (PathSeparatorAsString, new string [] {
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs
index 730216cf8c1..7b386c2eddd 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs
@@ -408,7 +408,7 @@ namespace Microsoft.Build.Tasks {
return;
foreach (string ext in allowedRelatedFileExtensions) {
- string rfile = filename + ext;
+ string rfile = Path.ChangeExtension (filename, ext);
if (File.Exists (rfile)) {
ITaskItem item = new TaskItem (rfile);
SetCopyLocal (item, parent_copy_local);
diff --git a/mcs/class/Microsoft.Build.Utilities/Makefile b/mcs/class/Microsoft.Build.Utilities/Makefile
index 32f34e3f401..585e5bb0a4f 100644
--- a/mcs/class/Microsoft.Build.Utilities/Makefile
+++ b/mcs/class/Microsoft.Build.Utilities/Makefile
@@ -19,7 +19,7 @@ LIB_MCS_FLAGS = \
/r:System.dll \
/r:$(BUILD_FRAMEWORK)
-TEST_MCS_FLAGS = /r:$(BUILD_FRAMEWORK) -r:System.dll
+TEST_MCS_FLAGS = /r:$(BUILD_FRAMEWORK) -r:System.dll -r:System.Core.dll
export TESTING_MONO=a
XBUILD_DIR=../../tools/xbuild
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities.Test.csproj b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities.Test.csproj
index e8eeb392c04..718e3c2e01f 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities.Test.csproj
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities.Test.csproj
@@ -51,5 +51,6 @@
<Compile Include="Test\Microsoft.Build.Utilities\LoggerTest.cs" />
<Compile Include="Test\Microsoft.Build.Utilities\TaskItemTest.cs" />
<Compile Include="Test\Microsoft.Build.Utilities\TaskLoggingHelperTest.cs" />
+ <Compile Include="Test\Microsoft.Build.Utilities\ToolTaskTest.cs" />
</ItemGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs
index cc5b84cb904..f16603fcfd0 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs
@@ -48,6 +48,9 @@ namespace Microsoft.Build.Utilities
t2 = t1.Parent;
lib_mono_dir = t2.FullName;
+#if NET_4_0
+ var windowsPath = Environment.GetFolderPath (Environment.SpecialFolder.Windows);
+#endif
if (Environment.GetEnvironmentVariable ("TESTING_MONO") != null) {
mono_dir = new string [] {
Path.Combine (lib_mono_dir, "net_1_0"),
@@ -57,6 +60,18 @@ namespace Microsoft.Build.Utilities
Path.Combine (lib_mono_dir, "net_4_0"),
Path.Combine (lib_mono_dir, "net_4_5")
};
+#if NET_4_0
+ } else if (!string.IsNullOrEmpty (windowsPath) && lib_mono_dir.StartsWith (windowsPath)) {
+ //running in .NET, not Mono
+ mono_dir = new string [] {
+ Path.Combine (lib_mono_dir, "v1.0.3705"),
+ Path.Combine (lib_mono_dir, "v2.0.50727"),
+ Path.Combine (lib_mono_dir, "v2.0.50727"),
+ Path.Combine (lib_mono_dir, "v3.5"),
+ Path.Combine (lib_mono_dir, "v4.0.30319"),
+ Path.Combine (lib_mono_dir, "v4.0.30319")
+ };
+#endif
} else {
mono_dir = new string [] {
Path.Combine (lib_mono_dir, "1.0"),
@@ -93,6 +108,15 @@ namespace Microsoft.Build.Utilities
return mono_dir [(int)version];
}
+#if NET_4_0
+ public static string GetMSBuildInstallPath (string version)
+ {
+ //see http://msdn.microsoft.com/en-us/library/vstudio/bb397428(v=vs.120).aspx
+ var programFiles = Environment.GetFolderPath (Environment.SpecialFolder.ProgramFilesX86);
+ return Path.Combine (programFiles, "MSBuild", version, "bin");
+ }
+#endif
+
[MonoTODO]
public static string GetPathToDotNetFrameworkFile (string fileName,
TargetDotNetFrameworkVersion version)
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
index 4094c122e3b..77814aab862 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
@@ -464,13 +464,25 @@ namespace Microsoft.Build.Utilities
}
}
- // Snatched from our codedom code, with some changes to make it compatible with csc
- // (the line+column group is optional is csc)
+ // Keep in sync with mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
+ const string ErrorRegexPattern = @"
+ ^
+ (\s*(?<file>[^\(]+) # filename (optional)
+ (\((?<line>\d*)(,(?<column>\d*[\+]*))?\))? # line+column (optional)
+ :\s+)?
+ (?<level>\w+) # error|warning
+ \s+
+ (?<number>[^:]*\d) # CS1234
+ :
+ \s*
+ (?<message>.*)$";
+
static Regex errorRegex;
static Regex CscErrorRegex {
get {
if (errorRegex == null)
- errorRegex = new Regex (@"^(\s*(?<file>[^\(]+)(\((?<line>\d*)(,(?<column>\d*[\+]*))?\))?:\s+)*(?<level>\w+)\s+(?<number>.*\d):\s*(?<message>.*)", RegexOptions.Compiled | RegexOptions.ExplicitCapture);
+ errorRegex = new Regex (ErrorRegexPattern,
+ RegexOptions.Compiled | RegexOptions.ExplicitCapture | RegexOptions.IgnorePatternWhitespace);
return errorRegex;
}
}
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities_test.dll.sources b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities_test.dll.sources
index 8f797a06ec8..b1a3758e980 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities_test.dll.sources
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities_test.dll.sources
@@ -2,3 +2,4 @@ Microsoft.Build.Utilities/CommandLineBuilderTest.cs
Microsoft.Build.Utilities/LoggerTest.cs
Microsoft.Build.Utilities/TaskItemTest.cs
Microsoft.Build.Utilities/TaskLoggingHelperTest.cs
+Microsoft.Build.Utilities/ToolTaskTest.cs
diff --git a/mcs/class/Microsoft.Build.Utilities/Test/Microsoft.Build.Utilities/ToolTaskTest.cs b/mcs/class/Microsoft.Build.Utilities/Test/Microsoft.Build.Utilities/ToolTaskTest.cs
new file mode 100644
index 00000000000..8b3ae6e69c4
--- /dev/null
+++ b/mcs/class/Microsoft.Build.Utilities/Test/Microsoft.Build.Utilities/ToolTaskTest.cs
@@ -0,0 +1,141 @@
+//
+// ToolTaskTest.cs:
+//
+// Author:
+// Jonathan Pryor (jonp@xamarin.com)
+//
+// (C) 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 System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+
+using Microsoft.Build.Framework;
+using Microsoft.Build.Utilities;
+
+using NUnit.Framework;
+
+namespace MonoTests.Microsoft.Build.Utilities {
+
+ [TestFixture]
+ public class ToolTaskTest {
+
+ [Test]
+ public void LogEventsFromTextOutput ()
+ {
+ var messages = new[] {
+ new {Code = "CS0152", Line = "class1.cs(16,4): error CS0152: The label `case 1:' already occurs in this switch statement" },
+ };
+
+ var task = new LogEventsFromTextOutputToolTask ();
+ foreach (var m in messages) {
+ task.LogEventsFromTextOutput (m.Line);
+ Assert.IsTrue (task.Codes.Count > 0, "No error logged for line: {0}", m.Line);
+ Assert.AreEqual (m.Code, task.Codes [0]);
+ task.Codes.Clear ();
+ }
+ }
+ }
+
+ class LogEventsFromTextOutputToolTask : ToolTask {
+
+ public List<string> Codes {
+ get {return engine.Codes;}
+ }
+
+ CodeLoggingBuildEngine engine = new CodeLoggingBuildEngine ();
+
+ public LogEventsFromTextOutputToolTask ()
+ {
+ BuildEngine = engine;
+ }
+
+ protected override string GenerateFullPathToTool ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override string ToolName {
+ get {throw new NotImplementedException ();}
+ }
+
+ public void LogEventsFromTextOutput (string line)
+ {
+ base.LogEventsFromTextOutput (line, MessageImportance.Normal);
+ }
+ }
+
+ class CodeLoggingBuildEngine : IBuildEngine {
+
+ public List<string> Codes = new List<string> ();
+
+ public int ColumnNumberOfTaskNode {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool ContinueOnError {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int LineNumberOfTaskNode {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string ProjectFileOfTaskNode {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool BuildProjectFile (string projectFileName, string[] targetNames, System.Collections.IDictionary globalProperties, System.Collections.IDictionary targetOutputs)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void LogCustomEvent (CustomBuildEventArgs e)
+ {
+ }
+
+ public void LogErrorEvent (BuildErrorEventArgs e)
+ {
+ Codes.Add (e.Code);
+ }
+
+ public void LogMessageEvent (BuildMessageEventArgs e)
+ {
+ }
+
+ public void LogWarningEvent (BuildWarningEventArgs e)
+ {
+ Codes.Add (e.Code);
+ }
+ }
+}
+
diff --git a/mcs/class/Microsoft.Build/Makefile b/mcs/class/Microsoft.Build/Makefile
index 173638c9831..339dd9094ef 100644
--- a/mcs/class/Microsoft.Build/Makefile
+++ b/mcs/class/Microsoft.Build/Makefile
@@ -19,7 +19,9 @@ LIB_MCS_FLAGS = \
/r:Microsoft.Build.Engine.dll \
/r:Microsoft.Build.Framework.dll
-TEST_MCS_FLAGS = /r:System.Core.dll
+TEST_MCS_FLAGS = /r:System.Core.dll \
+ /r:Microsoft.Build.Engine.dll \
+ /r:Microsoft.Build.Framework.dll
EXTRA_DISTFILES = \
Test/FunctionalTestReferenceProject.csproj \
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Logging/ConsoleLogger.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Logging/ConsoleLogger.cs
index 161476c2c0b..476d4d0a5be 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Logging/ConsoleLogger.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Logging/ConsoleLogger.cs
@@ -25,65 +25,257 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using Microsoft.Build.Framework;
-
using System;
+using System.Globalization;
+using Microsoft.Build.Framework;
namespace Microsoft.Build.Logging
{
- public class ConsoleLogger : INodeLogger
- {
- public ConsoleLogger ()
- : this (LoggerVerbosity.Normal)
- {
- }
-
- public ConsoleLogger (LoggerVerbosity verbosity)
- {
- throw new NotImplementedException ();
- }
-
- public ConsoleLogger (LoggerVerbosity verbosity, WriteHandler write, ColorSetter colorSet, ColorResetter colorReset)
- {
- throw new NotImplementedException ();
- }
-
- #region INodeLogger implementation
- public void Initialize (IEventSource eventSource, int nodeCount)
- {
- throw new NotImplementedException ();
- }
- #endregion
-
- #region ILogger implementation
- public void Initialize (IEventSource eventSource)
- {
- throw new NotImplementedException ();
- }
-
- public void Shutdown ()
- {
- throw new NotImplementedException ();
- }
-
- public string Parameters {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- public LoggerVerbosity Verbosity {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
- #endregion
- }
+ public class ConsoleLogger : INodeLogger
+ {
+ public ConsoleLogger ()
+ : this (LoggerVerbosity.Normal)
+ {
+ }
+
+ public ConsoleLogger (LoggerVerbosity verbosity)
+ : this (verbosity, message => Console.WriteLine (message), color => Console.ForegroundColor = color, Console.ResetColor)
+ {
+ }
+
+ public ConsoleLogger (LoggerVerbosity verbosity, WriteHandler write, ColorSetter colorSet, ColorResetter colorReset)
+ {
+ if (write == null)
+ throw new ArgumentNullException ("write");
+ if (colorSet == null)
+ throw new ArgumentNullException ("colorSet");
+ if (colorReset == null)
+ throw new ArgumentNullException ("colorReset");
+ Verbosity = verbosity;
+ this.write = write;
+ set_color = colorSet;
+ reset_color = colorReset;
+ }
+
+ WriteHandler write;
+ ColorSetter set_color;
+ ColorResetter reset_color;
+
+ #region INodeLogger implementation
+
+ public virtual void Initialize (IEventSource eventSource, int nodeCount)
+ {
+ throw new NotImplementedException ();
+ }
+
+ #endregion
+
+ #region ILogger implementation
+
+ public virtual void Initialize (IEventSource eventSource)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void Shutdown ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public string Parameters { get; set; }
+
+ public LoggerVerbosity Verbosity { get; set; }
+
+ public bool ShowSummary { get; set; }
+
+ public bool SkipProjectStartedText { get; set; }
+
+ public WriteHandler WriteHandler {
+ get { return write; }
+ set {
+ if (value == null)
+ throw new ArgumentNullException ("value");
+ write = value;
+ }
+ }
+
+ #endregion
+
+ public void ApplyParameter (string parameterName, string parameterValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ DateTime build_started;
+
+ public void BuildFinishedHandler (object sender, BuildFinishedEventArgs e)
+ {
+ if (Verbosity == LoggerVerbosity.Quiet || Verbosity == LoggerVerbosity.Minimal)
+ return;
+
+ set_color (ConsoleColor.White);
+ write (e.Message);
+ write ("");
+ write ("");
+ write ("");
+ // .NET doesn't care if BuildStarted is actually invoked.
+ write (string.Format ("Time Elapsed {0}", (e.Timestamp - build_started).ToString ("hh\\:mm\\:ss\\.ff")));
+ write ("");
+ reset_color ();
+ }
+
+ public void BuildStartedHandler (object sender, BuildStartedEventArgs e)
+ {
+ if (Verbosity == LoggerVerbosity.Quiet || Verbosity == LoggerVerbosity.Minimal)
+ return;
+
+ build_started = e.Timestamp;
+ set_color (ConsoleColor.White);
+ write (string.Format ("Build started {0}.", e.Timestamp.ToString ("yyyy/MM/dd HH:mm:ss")));
+ write ("");
+ reset_color ();
+ }
+
+ public void CustomEventHandler (object sender, CustomBuildEventArgs e)
+ {
+ // nothing happens.
+ }
+
+ string GetLocation (int lineNumber, int columnNumber, int endLineNumber, int endColumnNumber)
+ {
+ string line = null, col = null;
+ if (lineNumber > 0) {
+ if (endLineNumber > 0)
+ line = string.Format ("{0}-{1}", lineNumber, endLineNumber);
+ else
+ line = lineNumber.ToString ();
+ }
+ if (columnNumber > 0) {
+ if (endColumnNumber > 0)
+ col = string.Format ("{0}-{1}", columnNumber, endColumnNumber);
+ else
+ col = columnNumber.ToString ();
+ }
+ string loc = line != null ? line + (col != null ? "," + col : null) : null;
+ return string.IsNullOrEmpty (loc) ? string.Empty : '(' + loc + ')';
+ }
+
+ public void ErrorHandler (object sender, BuildErrorEventArgs e)
+ {
+ if (Verbosity == LoggerVerbosity.Quiet)
+ return;
+
+ set_color (ConsoleColor.Red);
+ string loc = GetLocation (e.LineNumber, e.ColumnNumber, e.EndLineNumber, e.EndColumnNumber);
+ write (string.Format ("{0}{1} : {2} error {3}: {4}", e.File, loc, e.Subcategory, e.Code, e.Message));
+ write ("");
+ reset_color ();
+ }
+
+ public void MessageHandler (object sender, BuildMessageEventArgs e)
+ {
+ switch (e.Importance) {
+ case MessageImportance.High:
+ set_color (ConsoleColor.White);
+ break;
+ case MessageImportance.Low:
+ case MessageImportance.Normal:
+ set_color (ConsoleColor.Gray);
+ break;
+ }
+ write (e.Message);
+ reset_color ();
+ }
+
+ public void ProjectFinishedHandler (object sender, ProjectFinishedEventArgs e)
+ {
+ if (Verbosity == LoggerVerbosity.Quiet || Verbosity == LoggerVerbosity.Minimal)
+ return;
+
+ set_color (ConsoleColor.Cyan);
+ write (e.Message);
+ write ("");
+ write ("");
+ write ("");
+ reset_color ();
+ }
+
+ public void ProjectStartedHandler (object sender, ProjectStartedEventArgs e)
+ {
+ if (Verbosity == LoggerVerbosity.Quiet || Verbosity == LoggerVerbosity.Minimal)
+ return;
+
+ set_color (ConsoleColor.Cyan);
+ write ("__________________________________________________");
+ write ("");
+ write (string.Format ("Project \"{0}\" ({1} target(s)):", e.ProjectFile, e.TargetNames));
+ write ("");
+ write ("");
+ write ("");
+ reset_color ();
+ }
+
+ public void TargetFinishedHandler (object sender, TargetFinishedEventArgs e)
+ {
+ if (Verbosity != LoggerVerbosity.Detailed && Verbosity != LoggerVerbosity.Diagnostic)
+ return;
+
+ set_color (ConsoleColor.Cyan);
+ write (e.Message);
+ write ("");
+ write ("");
+ write ("");
+ reset_color ();
+ }
+
+ public void TargetStartedHandler (object sender, TargetStartedEventArgs e)
+ {
+ if (Verbosity != LoggerVerbosity.Detailed && Verbosity != LoggerVerbosity.Diagnostic)
+ return;
+
+ string message = Verbosity == LoggerVerbosity.Detailed ?
+ string.Format ("Target \"{0}\":", e.TargetName) :
+ string.Format ("Target \"{0}\" in file \"{1}\":", e.TargetName, e.TargetFile);
+
+ set_color (ConsoleColor.Cyan);
+ write (message);
+ write ("");
+ reset_color ();
+ }
+
+ public void TaskFinishedHandler (object sender, TaskFinishedEventArgs e)
+ {
+ if (Verbosity != LoggerVerbosity.Detailed && Verbosity != LoggerVerbosity.Diagnostic)
+ return;
+
+ set_color (ConsoleColor.Cyan);
+ write (" " + e.Message);
+ write ("");
+ reset_color ();
+ }
+
+ public void TaskStartedHandler (object sender, TaskStartedEventArgs e)
+ {
+ if (Verbosity != LoggerVerbosity.Detailed && Verbosity != LoggerVerbosity.Diagnostic)
+ return;
+
+ set_color (ConsoleColor.Cyan);
+ write (" " + e.Message);
+ write ("");
+ reset_color ();
+ }
+
+ public void WarningHandler (object sender, BuildWarningEventArgs e)
+ {
+ if (Verbosity == LoggerVerbosity.Quiet)
+ return;
+
+ set_color (ConsoleColor.Yellow);
+ string loc = GetLocation (e.LineNumber, e.ColumnNumber, e.EndLineNumber, e.EndColumnNumber);
+ write (string.Format ("{0}{1} : {2} warning {3}: {4}", e.File, loc, e.Subcategory, e.Code, e.Message));
+ write ("");
+ reset_color ();
+ }
+ }
}
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Logging/FileLogger.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Logging/FileLogger.cs
index 331d29ab9b2..be9d2f0869d 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Logging/FileLogger.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Logging/FileLogger.cs
@@ -26,11 +26,26 @@
//
using System;
+using Microsoft.Build.Framework;
namespace Microsoft.Build.Logging
{
- public class FileLogger
- {
- }
+ public class FileLogger : ConsoleLogger
+ {
+ public override void Initialize (IEventSource eventSource)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override void Initialize (IEventSource eventSource, int nodeCount)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override void Shutdown ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
}
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build_test.dll.sources b/mcs/class/Microsoft.Build/Microsoft.Build_test.dll.sources
index 0258038dccf..0c25ab81124 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build_test.dll.sources
+++ b/mcs/class/Microsoft.Build/Microsoft.Build_test.dll.sources
@@ -1,2 +1,3 @@
FunctionalTest.cs
Microsoft.Build.Internal/CollectionFromEnumerableTest.cs
+Microsoft.Build.Logging/ConsoleLoggerTest.cs
diff --git a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Logging/ConsoleLoggerTest.cs b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Logging/ConsoleLoggerTest.cs
new file mode 100644
index 00000000000..8dd705f6b10
--- /dev/null
+++ b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Logging/ConsoleLoggerTest.cs
@@ -0,0 +1,72 @@
+
+using System;
+using System.IO;
+using Microsoft.Build.Framework;
+using Microsoft.Build.Logging;
+using NUnit.Framework;
+
+namespace MonoTests.Microsoft.Build.Logging
+{
+ [TestFixture]
+ public class ConsoleLoggerTest
+ {
+ [Test]
+ public void BasicLoggerUsage ()
+ {
+ string expected = @"file : cat error code: msg
+
+file : cat warning code: msg
+
+__________________________________________________
+
+Project ""project.txt"" (target target(s)):
+
+
+
+Build started 2013/01/01 00:00:00.
+
+Target ""target"" in file ""target.txt"":
+
+ start task
+
+ finished task
+
+finished target
+
+
+
+finished project
+
+
+
+finished build
+
+
+
+Time Elapsed 00:00:00.01
+
+".Replace ("\r\n", "\n");
+ var sw = new StringWriter();
+ var e = new ConsoleLogger(LoggerVerbosity.Diagnostic, msg => sw.WriteLine(msg), c => {}, () => {});
+ e.Verbosity = LoggerVerbosity.Diagnostic;
+ e.ErrorHandler (null, new BuildErrorEventArgs ("cat", "code", "file", 0, 0, 0, 0, "msg", "help", "sender"));
+ e.WarningHandler (null, new BuildWarningEventArgs ("cat", "code", "file", 0, 0, 0, 0, "msg", "help", "sender"));
+ e.ProjectStartedHandler (null, new ProjectStartedEventArgs ("start project", "HELPME", "project.txt", "target", null, null));
+ e.BuildStartedHandler (null, new BuildStartedEventArgs ("start build", "HELPME", new DateTime (2013, 1, 1)));
+ e.TargetStartedHandler (null, new TargetStartedEventArgs ("start target", "HELPME", "target", "project.txt", "target.txt"/*, "parent"*/));
+ e.TaskStartedHandler (null, new TaskStartedEventArgs ("start task", "HELPME", "project.txt", "task.txt", "task"));
+ e.TaskFinishedHandler (null, new TaskFinishedEventArgs ("finished task", "HELPME", "project.txt", "task.txt", "task", false));
+ e.TargetFinishedHandler (null, new TargetFinishedEventArgs ("finished target", "HELPME", "target", "project.txt", "target.txt", false));
+ e.ProjectFinishedHandler (null, new ProjectFinishedEventArgs ("finished project", "HELPME", "project.txt", false));
+ e.BuildFinishedHandler (null, new BuildFinishedEventArgs ("finished build", "HELPME", false, new DateTime (2013, 1, 1).AddMilliseconds (1)));
+
+ e.CustomEventHandler(null, new MyCustomBuildEventArgs ());
+ Assert.AreEqual (expected, sw.ToString ().Replace ("\r\n", "\n"), "#1");
+ }
+ }
+
+ class MyCustomBuildEventArgs : CustomBuildEventArgs
+ {
+ }
+}
+
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
index 105ff4fb67d..712953b29d5 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
@@ -285,6 +285,9 @@ namespace Mono.Debugger.Soft
public bool Uncaught {
get; set;
}
+ public bool Subclasses {
+ get; set;
+ }
}
class AssemblyModifier : Modifier {
@@ -395,7 +398,7 @@ namespace Mono.Debugger.Soft
* with newer runtimes, and vice versa.
*/
internal const int MAJOR_VERSION = 2;
- internal const int MINOR_VERSION = 24;
+ internal const int MINOR_VERSION = 26;
enum WPSuspendPolicy {
NONE = 0,
@@ -2174,6 +2177,11 @@ namespace Mono.Debugger.Soft
} else if (!em.Caught || !em.Uncaught) {
throw new NotSupportedException ("This request is not supported by the protocol version implemented by the debuggee.");
}
+ if (Version.MajorVersion > 2 || Version.MinorVersion > 24) {
+ w.WriteBool (em.Subclasses);
+ } else if (!em.Subclasses) {
+ throw new NotSupportedException ("This request is not supported by the protocol version implemented by the debuggee.");
+ }
} else if (mod is AssemblyModifier) {
w.WriteByte ((byte)ModifierKind.ASSEMBLY_ONLY);
var amod = (mod as AssemblyModifier);
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEventRequest.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEventRequest.cs
index 07d4d8ccdd0..906b43fd839 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEventRequest.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ExceptionEventRequest.cs
@@ -6,7 +6,7 @@ namespace Mono.Debugger.Soft
public sealed class ExceptionEventRequest : EventRequest {
TypeMirror exc_type;
- bool caught, uncaught;
+ bool caught, uncaught, subclasses;
internal ExceptionEventRequest (VirtualMachine vm, TypeMirror exc_type, bool caught, bool uncaught) : base (vm, EventType.Exception) {
if (exc_type != null) {
@@ -18,6 +18,7 @@ namespace Mono.Debugger.Soft
this.exc_type = exc_type;
this.caught = caught;
this.uncaught = uncaught;
+ this.subclasses = true;
}
public TypeMirror ExceptionType {
@@ -26,9 +27,21 @@ namespace Mono.Debugger.Soft
}
}
+ // Defaults to true
+ // Supported since protocol version 2.25
+ public bool IncludeSubclasses {
+ get {
+ return subclasses;
+ }
+ set {
+ vm.CheckProtocolVersion (2, 25);
+ subclasses = value;
+ }
+ }
+
public override void Enable () {
var mods = new List <Modifier> ();
- mods.Add (new ExceptionModifier () { Type = exc_type != null ? exc_type.Id : 0, Caught = caught, Uncaught = uncaught });
+ mods.Add (new ExceptionModifier () { Type = exc_type != null ? exc_type.Id : 0, Caught = caught, Uncaught = uncaught, Subclasses = subclasses });
SendReq (mods);
}
}
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEventRequest.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEventRequest.cs
index cb3c79231ba..035fbcee56d 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEventRequest.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StepEventRequest.cs
@@ -23,7 +23,11 @@ namespace Mono.Debugger.Soft
StaticCtor = 1,
/* Since protocol version 2.20 */
/* Methods which have the [DebuggerHidden] attribute */
+ /* Before protocol version 2.26, this includes [DebuggerStepThrough] as well */
DebuggerHidden = 2,
+ /* Since protocol version 2.26 */
+ /* Methods which have the [DebuggerStepThrough] attribute */
+ DebuggerStepThrough = 4,
}
public sealed class StepEventRequest : EventRequest {
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
index 3cd1edeadf4..125d780fd0e 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
@@ -26,6 +26,7 @@ namespace Mono.Debugger.Soft
TypeMirror[] ifaces;
Dictionary<TypeMirror, InterfaceMappingMirror> iface_map;
TypeMirror[] type_args;
+ bool cached_base_type;
bool inited;
internal const BindingFlags DefaultBindingFlags =
@@ -78,9 +79,9 @@ namespace Mono.Debugger.Soft
public TypeMirror BaseType {
get {
- // FIXME: base_type could be null for object/interfaces
- if (base_type == null) {
+ if (!cached_base_type) {
base_type = vm.GetType (GetInfo ().base_type);
+ cached_base_type = true;
}
return base_type;
}
@@ -591,11 +592,11 @@ namespace Mono.Debugger.Soft
string[] source_files;
string[] source_files_full_path;
- public string[] GetSourceFiles (bool return_full_paths) {
- string[] res = return_full_paths ? source_files_full_path : source_files;
+ public string[] GetSourceFiles (bool returnFullPaths) {
+ string[] res = returnFullPaths ? source_files_full_path : source_files;
if (res == null) {
- res = vm.conn.Type_GetSourceFiles (id, return_full_paths);
- if (return_full_paths)
+ res = vm.conn.Type_GetSourceFiles (id, returnFullPaths);
+ if (returnFullPaths)
source_files_full_path = res;
else
source_files = res;
@@ -684,29 +685,38 @@ namespace Mono.Debugger.Soft
* used by the reflection-only functionality on .net.
*/
public CustomAttributeDataMirror[] GetCustomAttributes (bool inherit) {
- return GetCAttrs (null, inherit);
+ return GetCustomAttrs (null, inherit);
}
public CustomAttributeDataMirror[] GetCustomAttributes (TypeMirror attributeType, bool inherit) {
if (attributeType == null)
throw new ArgumentNullException ("attributeType");
- return GetCAttrs (attributeType, inherit);
+ return GetCustomAttrs (attributeType, inherit);
}
- CustomAttributeDataMirror[] GetCAttrs (TypeMirror type, bool inherit) {
+ void AppendCustomAttrs (IList<CustomAttributeDataMirror> attrs, TypeMirror type, bool inherit)
+ {
if (cattrs == null && Metadata != null && !Metadata.HasCustomAttributes)
cattrs = new CustomAttributeDataMirror [0];
- // FIXME: Handle inherit
if (cattrs == null) {
CattrInfo[] info = vm.conn.Type_GetCustomAttributes (id, 0, false);
cattrs = CustomAttributeDataMirror.Create (vm, info);
}
- var res = new List<CustomAttributeDataMirror> ();
- foreach (var attr in cattrs)
+
+ foreach (var attr in cattrs) {
if (type == null || attr.Constructor.DeclaringType == type)
- res.Add (attr);
- return res.ToArray ();
+ attrs.Add (attr);
+ }
+
+ if (inherit && BaseType != null)
+ BaseType.AppendCustomAttrs (attrs, type, inherit);
+ }
+
+ CustomAttributeDataMirror[] GetCustomAttrs (TypeMirror type, bool inherit) {
+ var attrs = new List<CustomAttributeDataMirror> ();
+ AppendCustomAttrs (attrs, type, inherit);
+ return attrs.ToArray ();
}
public MethodMirror[] GetMethodsByNameFlags (string name, BindingFlags flags, bool ignoreCase) {
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
index 26c45e10d5b..176bb8f6bcd 100644
--- a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
+++ b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
@@ -132,6 +132,13 @@ public struct GStruct<T> {
}
}
+public struct NestedStruct {
+ NestedInner nested1, nested2;
+}
+
+public struct NestedInner {
+}
+
interface ITest
{
void Foo ();
@@ -166,7 +173,12 @@ class TestIfaces<T> : ITest<T>
}
}
-public class Tests : TestsBase
+public interface ITest2
+{
+ int invoke_iface ();
+}
+
+public class Tests : TestsBase, ITest2
{
#pragma warning disable 0414
int field_i;
@@ -193,9 +205,11 @@ public class Tests : TestsBase
public AStruct field_struct;
public object field_boxed_struct;
public GStruct<int> generic_field_struct;
+ public KeyValuePair<int, object> boxed_struct_field;
[ThreadStatic]
public static int tls_i;
public static bool is_attached = Debugger.IsAttached;
+ public NestedStruct nested_struct;
#pragma warning restore 0414
@@ -343,7 +357,9 @@ public class Tests : TestsBase
} catch {
}
ss7 ();
+ ss_nested ();
ss_regress_654694 ();
+ ss_step_through ();
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
@@ -418,6 +434,50 @@ public class Tests : TestsBase
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void ss_nested () {
+ ss_nested_1 (ss_nested_2 ());
+ ss_nested_1 (ss_nested_2 ());
+ ss_nested_3 ();
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void ss_nested_1 (int i) {
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static int ss_nested_2 () {
+ return 0;
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void ss_nested_3 () {
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void ss_step_through () {
+ step_through_1 ();
+ StepThroughClass.step_through_2 ();
+ step_through_3 ();
+ }
+
+ [DebuggerStepThrough]
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void step_through_1 () {
+ }
+
+ [DebuggerStepThrough]
+ class StepThroughClass {
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void step_through_2 () {
+ }
+ }
+
+ [DebuggerStepThrough]
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void step_through_3 () {
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
public static bool is_even (int i) {
return i % 2 == 0;
}
@@ -498,7 +558,7 @@ public class Tests : TestsBase
}
public static void vtypes () {
- Tests t = new Tests () { field_struct = new AStruct () { i = 42, s = "S", k = 43 }, generic_field_struct = new GStruct<int> () { i = 42 }, field_boxed_struct = new AStruct () { i = 42 }};
+ Tests t = new Tests () { field_struct = new AStruct () { i = 42, s = "S", k = 43 }, generic_field_struct = new GStruct<int> () { i = 42 }, field_boxed_struct = new AStruct () { i = 42 }, boxed_struct_field = new KeyValuePair<int, object> (1, (long)42 ) };
AStruct s = new AStruct { i = 44, s = "T", k = 45 };
AStruct[] arr = new AStruct[] {
new AStruct () { i = 1, s = "S1" },
@@ -553,7 +613,9 @@ public class Tests : TestsBase
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
+#if NET_4_5
[StateMachine (typeof (int))]
+#endif
public static void locals2<T> (string[] args, int arg, T t, ref string rs) {
long i = 42;
string s = "AB";
@@ -567,6 +629,7 @@ public class Tests : TestsBase
rs = "A";
}
+
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void locals3 () {
string s = "B";
@@ -809,6 +872,10 @@ public class Tests : TestsBase
throw new Exception ();
}
+ public int invoke_iface () {
+ return 42;
+ }
+
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void exceptions () {
try {
@@ -827,6 +894,15 @@ public class Tests : TestsBase
throw new OverflowException ();
} catch (Exception) {
}
+ // no subclasses
+ try {
+ throw new OverflowException ();
+ } catch (Exception) {
+ }
+ try {
+ throw new Exception ();
+ } catch (Exception) {
+ }
object o = null;
try {
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
index 5d3f8794c7a..e2170ec3e8e 100644
--- a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
+++ b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
@@ -105,7 +105,7 @@ public class DebuggerTests
MethodMirror m = entry_point.DeclaringType.GetMethod (name);
Assert.IsNotNull (m);
//Console.WriteLine ("X: " + name + " " + m.ILOffsets.Count + " " + m.Locations.Count);
- vm.SetBreakpoint (m, m.ILOffsets [0]);
+ var req = vm.SetBreakpoint (m, m.ILOffsets [0]);
Event e = null;
@@ -116,6 +116,8 @@ public class DebuggerTests
break;
}
+ req.Disable ();
+
Assert.IsInstanceOfType (typeof (BreakpointEvent), e);
Assert.AreEqual (m.Name, (e as BreakpointEvent).Method.Name);
@@ -135,6 +137,16 @@ public class DebuggerTests
return e;
}
+ Event step_until (ThreadMirror t, string method_name) {
+ Event e;
+ while (true) {
+ e = single_step (t);
+ if ((e as StepEvent).Method.Name == method_name)
+ break;
+ }
+ return e;
+ }
+
void check_arg_val (StackFrame frame, int pos, Type type, object eval) {
object val = frame.GetArgument (pos);
Assert.IsTrue (val is PrimitiveValue);
@@ -365,15 +377,19 @@ public class DebuggerTests
Assert.AreEqual (method, (e as StepEvent).Method.Name);
}
+ StepEventRequest create_step (Event e) {
+ var req = vm.CreateStepRequest (e.Thread);
+ step_req = req;
+ return req;
+ }
+
[Test]
public void SingleStepping () {
Event e = run_until ("single_stepping");
- var req = vm.CreateStepRequest (e.Thread);
+ var req = create_step (e);
req.Enable ();
- step_req = req;
-
// Step over 'bool b = true'
e = step_once ();
assert_location (e, "single_stepping");
@@ -392,49 +408,24 @@ public class DebuggerTests
e = step_once ();
assert_location (e, "single_stepping");
- // Change to step over
- req.Disable ();
- req.Depth = StepDepth.Over;
- req.Enable ();
-
// Step over ss2
- e = step_once ();
+ e = step_over ();
assert_location (e, "single_stepping");
- // Change to step into
- req.Disable ();
- req.Depth = StepDepth.Into;
- req.Enable ();
-
// Step into ss3
- e = step_once ();
+ e = step_into ();
assert_location (e, "ss3");
- // Change to step out
- req.Disable ();
- req.Depth = StepDepth.Out;
- req.Enable ();
-
// Step back into single_stepping
- e = step_once ();
+ e = step_out ();
assert_location (e, "single_stepping");
- // Change to step into
- req.Disable ();
- req.Depth = StepDepth.Into;
- req.Enable ();
-
// Step into ss3_2 ()
- e = step_once ();
+ e = step_into ();
assert_location (e, "ss3_2");
- // Change to step over
- req.Disable ();
- req.Depth = StepDepth.Over;
- req.Enable ();
-
// Step over ss3_2_2 ()
- e = step_once ();
+ e = step_over ();
assert_location (e, "ss3_2");
// Recreate the request
@@ -448,13 +439,8 @@ public class DebuggerTests
e = step_once ();
assert_location (e, "single_stepping");
- // Change to step into
- req.Disable ();
- req.Depth = StepDepth.Into;
- req.Enable ();
-
// Step into ss4 ()
- e = step_once ();
+ e = step_into ();
assert_location (e, "ss4");
// Skip nop
@@ -494,13 +480,12 @@ public class DebuggerTests
assert_location (e, "is_even");
// FIXME: Check that single stepping works with lock (obj)
-
req.Disable ();
// Run until ss6
e = run_until ("ss6");
- req = vm.CreateStepRequest (e.Thread);
+ req = create_step (e);
req.Depth = StepDepth.Over;
req.Enable ();
@@ -512,18 +497,50 @@ public class DebuggerTests
// Check that a step over stops at an EH clause
e = run_until ("ss7_2");
- req = vm.CreateStepRequest (e.Thread);
+ req = create_step (e);
req.Depth = StepDepth.Out;
req.Enable ();
e = step_once ();
assert_location (e, "ss7");
req.Disable ();
- req = vm.CreateStepRequest (e.Thread);
+ req = create_step (e);
req.Depth = StepDepth.Over;
req.Enable ();
e = step_once ();
assert_location (e, "ss7");
req.Disable ();
+
+ // Check that stepping stops between nested calls
+ e = run_until ("ss_nested_2");
+ e = step_out ();
+ assert_location (e, "ss_nested");
+ e = step_into ();
+ assert_location (e, "ss_nested_1");
+ e = step_out ();
+ assert_location (e, "ss_nested");
+ // Check that step over steps over nested calls
+ e = step_over ();
+ assert_location (e, "ss_nested");
+ e = step_into ();
+ assert_location (e, "ss_nested_3");
+ req.Disable ();
+
+ // Check DebuggerStepThrough support
+ e = run_until ("ss_step_through");
+ req = create_step (e);
+ req.Filter = StepFilter.DebuggerStepThrough;
+ e = step_into ();
+ // Step through step_through_1 ()
+ e = step_into ();
+ assert_location (e, "ss_step_through");
+ // Step through StepThroughClass.step_through_2 ()
+ e = step_into ();
+ assert_location (e, "ss_step_through");
+ req.Disable ();
+ req.Filter = StepFilter.None;
+ e = step_into ();
+ assert_location (e, "step_through_3");
+ req.Disable ();
}
[Test]
@@ -1103,7 +1120,7 @@ public class DebuggerTests
t = frame.Method.GetParameters ()[8].ParameterType;
Assert.AreEqual ("Tests2", t.Name);
var attrs = t.GetCustomAttributes (true);
- Assert.AreEqual (3, attrs.Length);
+ Assert.AreEqual (5, attrs.Length);
foreach (var attr in attrs) {
if (attr.Constructor.DeclaringType.Name == "DebuggerDisplayAttribute") {
Assert.AreEqual (1, attr.ConstructorArguments.Count);
@@ -1122,6 +1139,12 @@ public class DebuggerTests
Assert.AreEqual (2, attr.NamedArguments.Count);
Assert.AreEqual ("afield", attr.NamedArguments [0].Field.Name);
Assert.AreEqual ("bfield", attr.NamedArguments [1].Field.Name);
+ } else if (attr.Constructor.DeclaringType.Name == "ClassInterfaceAttribute") {
+ // inherited from System.Object
+ //} else if (attr.Constructor.DeclaringType.Name == "Serializable") {
+ // inherited from System.Object
+ } else if (attr.Constructor.DeclaringType.Name == "ComVisibleAttribute") {
+ // inherited from System.Object
} else {
Assert.Fail (attr.Constructor.DeclaringType.Name);
}
@@ -1325,6 +1348,21 @@ public class DebuggerTests
Assert.AreEqual ("AStruct", s.Type.Name);
AssertValue (42, s ["i"]);
+ // Check decoding of nested structs (#14942)
+ obj = o.GetValue (o.Type.GetField ("nested_struct"));
+ o.SetValue (o.Type.GetField ("nested_struct"), obj);
+
+ // Check round tripping of boxed struct fields (#12354)
+ obj = o.GetValue (o.Type.GetField ("boxed_struct_field"));
+ o.SetValue (o.Type.GetField ("boxed_struct_field"), obj);
+ obj = o.GetValue (o.Type.GetField ("boxed_struct_field"));
+ s = obj as StructMirror;
+ AssertValue (1, s ["key"]);
+ obj = s ["value"];
+ Assert.IsTrue (obj is StructMirror);
+ s = obj as StructMirror;
+ AssertValue (42, s ["m_value"]);
+
// vtypes as arguments
s = frame.GetArgument (0) as StructMirror;
AssertValue (44, s ["i"]);
@@ -1361,11 +1399,7 @@ public class DebuggerTests
// this on vtype methods
e = run_until ("vtypes2");
-
- // Skip nop
- e = single_step (e.Thread);
-
- e = single_step (e.Thread);
+ e = step_until (e.Thread, "foo");
frame = e.Thread.GetFrames () [0];
@@ -1380,11 +1414,7 @@ public class DebuggerTests
// this on static vtype methods
e = run_until ("vtypes3");
-
- // Skip nop
- e = single_step (e.Thread);
-
- e = single_step (e.Thread);
+ e = step_until (e.Thread, "static_foo");
frame = e.Thread.GetFrames () [0];
@@ -1462,6 +1492,27 @@ public class DebuggerTests
return e;
}
+ Event step_into () {
+ step_req.Disable ();
+ step_req.Depth = StepDepth.Into;
+ step_req.Enable ();
+ return step_once ();
+ }
+
+ Event step_over () {
+ step_req.Disable ();
+ step_req.Depth = StepDepth.Over;
+ step_req.Enable ();
+ return step_once ();
+ }
+
+ Event step_out () {
+ step_req.Disable ();
+ step_req.Depth = StepDepth.Out;
+ step_req.Enable ();
+ return step_once ();
+ }
+
[Test]
public void Locals () {
var be = run_until ("locals1");
@@ -1483,9 +1534,8 @@ public class DebuggerTests
object val = frame.GetValue (frame.Method.GetLocal ("i"));
AssertValue (0, val);
- var req = vm.CreateStepRequest (be.Thread);
+ var req = create_step (be);
req.Enable ();
- step_req = req;
// Skip nop
step_once ();
@@ -1567,9 +1617,8 @@ public class DebuggerTests
// gsharedvt
be = run_until ("locals7");
- req = vm.CreateStepRequest (be.Thread);
+ req = create_step (be);
req.Enable ();
- step_req = req;
// Skip nop
e = step_once ();
@@ -1685,16 +1734,28 @@ public class DebuggerTests
// FIXME: Merge this with LineNumbers () when its fixed
- step_req = vm.CreateStepRequest (e.Thread);
+ step_req = create_step (e);
step_req.Depth = StepDepth.Into;
step_req.Enable ();
Location l;
- vm.Resume ();
+ while (true) {
+ vm.Resume ();
+ e = GetNextEvent ();
+ Assert.IsTrue (e is StepEvent);
+ if (e.Thread.GetFrames ()[0].Method.Name == "ln1")
+ break;
+ }
+
+ // Do an additional step over so we are not on the beginning line of the method
+ step_req.Disable ();
+ step_req.Depth = StepDepth.Over;
+ step_req.Enable ();
+ vm.Resume ();
e = GetNextEvent ();
- Assert.IsTrue (e is StepEvent);
+ Assert.IsTrue (e is StepEvent);
l = e.Thread.GetFrames ()[0].Location;
@@ -1709,7 +1770,7 @@ public class DebuggerTests
public void LineNumbers () {
Event e = run_until ("line_numbers");
- step_req = vm.CreateStepRequest (e.Thread);
+ step_req = create_step (e);
step_req.Depth = StepDepth.Into;
step_req.Enable ();
@@ -2004,6 +2065,12 @@ public class DebuggerTests
Assert.IsInstanceOfType (typeof (ObjectMirror), v);
Assert.AreEqual ("Tests", (v as ObjectMirror).Type.Name);
+ // interface method
+ var cl1 = frame.Method.DeclaringType.Assembly.GetType ("ITest2");
+ m = cl1.GetMethod ("invoke_iface");
+ v = this_obj.InvokeMethod (e.Thread, m, null);
+ AssertValue (42, v);
+
// Argument checking
// null thread
@@ -2227,8 +2294,13 @@ public class DebuggerTests
while (invoke_results.Count < 2) {
Thread.Sleep (100);
}
- AssertValue ("ABC", invoke_results [0]);
- AssertValue (42, invoke_results [1]);
+ if (invoke_results [0] is PrimitiveValue) {
+ AssertValue ("ABC", invoke_results [1]);
+ AssertValue (42, invoke_results [0]);
+ } else {
+ AssertValue ("ABC", invoke_results [0]);
+ AssertValue (42, invoke_results [1]);
+ }
}
void invoke_multiple_cb (IAsyncResult ar) {
@@ -2395,13 +2467,11 @@ public class DebuggerTests
Assert.IsNull (v);
// Try a single step after the invoke
- var req = vm.CreateStepRequest (e.Thread);
+ var req = create_step (e);
req.Depth = StepDepth.Into;
req.Size = StepSize.Line;
req.Enable ();
- step_req = req;
-
// Skip nop
step_once ();
@@ -2456,6 +2526,17 @@ public class DebuggerTests
Assert.AreEqual ("OverflowException", (e as ExceptionEvent).Exception.Type.Name);
req.Disable ();
+ // no subclasses
+ req.IncludeSubclasses = false;
+ req.Enable ();
+
+ vm.Resume ();
+
+ e = GetNextEvent ();
+ Assert.IsInstanceOfType (typeof (ExceptionEvent), e);
+ Assert.AreEqual ("Exception", (e as ExceptionEvent).Exception.Type.Name);
+ req.Disable ();
+
// Implicit exceptions
req = vm.CreateExceptionRequest (null);
req.Enable ();
@@ -2480,7 +2561,7 @@ public class DebuggerTests
Assert.AreEqual ("exceptions2", frames [0].Method.Name);
req.Disable ();
- var sreq = vm.CreateStepRequest (e.Thread);
+ var sreq = create_step (e);
sreq.Depth = StepDepth.Over;
sreq.Size = StepSize.Line;
sreq.Enable ();
@@ -2884,7 +2965,7 @@ public class DebuggerTests
e = GetNextEvent ();
Assert.IsTrue (e is BreakpointEvent);
- var req = vm.CreateStepRequest (e.Thread);
+ var req = create_step (e);
req.Depth = StepDepth.Over;
req.Size = StepSize.Line;
req.Enable ();
diff --git a/mcs/class/Mono.Management/Mono.Attach/VirtualMachine.cs b/mcs/class/Mono.Management/Mono.Attach/VirtualMachine.cs
index d6205a2d4d1..7e57265a62a 100644
--- a/mcs/class/Mono.Management/Mono.Attach/VirtualMachine.cs
+++ b/mcs/class/Mono.Management/Mono.Attach/VirtualMachine.cs
@@ -42,20 +42,7 @@ namespace Mono.Attach
}
public string GetWorkingDirectory () {
- int len = 256;
-
- while (true) {
- StringBuilder sb = new StringBuilder (len);
-
- int res = Syscall.readlink ("/proc/" + pid + "/cwd", sb);
- if (res == -1)
- throw new IOException ("Syscall.readlink () failed with error " + res + ".");
- else if (res == len) {
- len = len * 2;
- } else {
- return sb.ToString ();
- }
- }
+ return UnixPath.ReadLink ("/proc/" + pid + "/cwd");
}
/*
diff --git a/mcs/class/Mono.Posix/Mono.Posix_test.dll.sources b/mcs/class/Mono.Posix/Mono.Posix_test.dll.sources
index b0c430596b2..270b0b6aee6 100644
--- a/mcs/class/Mono.Posix/Mono.Posix_test.dll.sources
+++ b/mcs/class/Mono.Posix/Mono.Posix_test.dll.sources
@@ -1,3 +1,4 @@
+Mono.Unix/ReadlinkTest.cs
Mono.Unix/StdioFileStreamTest.cs
Mono.Unix/UnixEncodingTest.cs
Mono.Unix/UnixGroupTest.cs
diff --git a/mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs b/mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs
index 27d241539d5..7488f79b56f 100644
--- a/mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs
+++ b/mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs
@@ -3937,17 +3937,51 @@ namespace Mono.Unix.Native {
[MarshalAs (UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(FileNameMarshaler))]
string newpath);
+ delegate long DoReadlinkFun (byte[] target);
+
+ // Helper function for readlink(string, StringBuilder) and readlinkat (int, string, StringBuilder)
+ static int ReadlinkIntoStringBuilder (DoReadlinkFun doReadlink, [Out] StringBuilder buf, ulong bufsiz)
+ {
+ // bufsiz > int.MaxValue can't work because StringBuilder can store only int.MaxValue chars
+ int bufsizInt = checked ((int) bufsiz);
+ var target = new byte [bufsizInt];
+
+ var r = doReadlink (target);
+ if (r < 0)
+ return checked ((int) r);
+
+ buf.Length = 0;
+ var chars = UnixEncoding.Instance.GetChars (target, 0, checked ((int) r));
+ // Make sure that at more bufsiz chars are written
+ buf.Append (chars, 0, System.Math.Min (bufsizInt, chars.Length));
+ if (r == bufsizInt) {
+ // may not have read full contents; fill 'buf' so that caller can properly check
+ buf.Append (new string ('\x00', bufsizInt - buf.Length));
+ }
+ return buf.Length;
+ }
+
// readlink(2)
- // int readlink(const char *path, char *buf, size_t bufsize);
+ // ssize_t readlink(const char *path, char *buf, size_t bufsize);
+ public static int readlink (string path, [Out] StringBuilder buf, ulong bufsiz)
+ {
+ return ReadlinkIntoStringBuilder (target => readlink (path, target), buf, bufsiz);
+ }
+
+ public static int readlink (string path, [Out] StringBuilder buf)
+ {
+ return readlink (path, buf, (ulong) buf.Capacity);
+ }
+
[DllImport (MPH, SetLastError=true,
EntryPoint="Mono_Posix_Syscall_readlink")]
- public static extern int readlink (
+ private static extern long readlink (
[MarshalAs (UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(FileNameMarshaler))]
- string path, [Out] StringBuilder buf, ulong bufsiz);
+ string path, byte[] buf, ulong bufsiz);
- public static int readlink (string path, [Out] StringBuilder buf)
+ public static long readlink (string path, byte[] buf)
{
- return readlink (path, buf, (ulong) buf.Capacity);
+ return readlink (path, buf, (ulong) buf.LongLength);
}
[DllImport (LIBC, SetLastError=true)]
@@ -4226,16 +4260,26 @@ namespace Mono.Unix.Native {
}
// readlinkat(2)
- // int readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsize);
+ // ssize_t readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsize);
+ public static int readlinkat (int dirfd, string pathname, [Out] StringBuilder buf, ulong bufsiz)
+ {
+ return ReadlinkIntoStringBuilder (target => readlinkat (dirfd, pathname, target), buf, bufsiz);
+ }
+
+ public static int readlinkat (int dirfd, string pathname, [Out] StringBuilder buf)
+ {
+ return readlinkat (dirfd, pathname, buf, (ulong) buf.Capacity);
+ }
+
[DllImport (MPH, SetLastError=true,
EntryPoint="Mono_Posix_Syscall_readlinkat")]
- public static extern int readlinkat (int dirfd,
+ private static extern long readlinkat (int dirfd,
[MarshalAs (UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(FileNameMarshaler))]
- string pathname, [Out] StringBuilder buf, ulong bufsiz);
+ string pathname, byte[] buf, ulong bufsiz);
- public static int readlinkat (int dirfd, string pathname, [Out] StringBuilder buf)
+ public static long readlinkat (int dirfd, string pathname, byte[] buf)
{
- return readlinkat (dirfd, pathname, buf, (ulong) buf.Capacity);
+ return readlinkat (dirfd, pathname, buf, (ulong) buf.LongLength);
}
[DllImport (LIBC, SetLastError=true)]
diff --git a/mcs/class/Mono.Posix/Mono.Unix/UnixPath.cs b/mcs/class/Mono.Posix/Mono.Unix/UnixPath.cs
index 659e0bd6d50..e577edb74d4 100644
--- a/mcs/class/Mono.Posix/Mono.Unix/UnixPath.cs
+++ b/mcs/class/Mono.Posix/Mono.Unix/UnixPath.cs
@@ -209,69 +209,59 @@ namespace Mono.Unix {
// Read the specified symbolic link. If the file isn't a symbolic link,
// return null; otherwise, return the contents of the symbolic link.
- //
- // readlink(2) is horribly evil, as there is no way to query how big the
- // symlink contents are. Consequently, it's trial and error...
internal static string ReadSymbolicLink (string path)
{
- StringBuilder buf = new StringBuilder (256);
+ string target = TryReadLink (path);
+ if (target == null) {
+ Native.Errno errno = Native.Stdlib.GetLastError ();
+ if (errno != Native.Errno.EINVAL)
+ UnixMarshal.ThrowExceptionForError (errno);
+ }
+ return target;
+ }
+
+ public static string TryReadLink (string path)
+ {
+ byte[] buf = new byte[256];
do {
- int r = Native.Syscall.readlink (path, buf);
- if (r < 0) {
- Native.Errno e;
- switch (e = Native.Stdlib.GetLastError()) {
- case Native.Errno.EINVAL:
- // path isn't a symbolic link
- return null;
- default:
- UnixMarshal.ThrowExceptionForError (e);
- break;
- }
- }
- else if (r == buf.Capacity) {
- buf.Capacity *= 2;
- }
+ long r = Native.Syscall.readlink (path, buf);
+ if (r < 0)
+ return null;
+ else if (r == buf.Length)
+ buf = new byte[checked (buf.LongLength * 2)];
else
- return buf.ToString (0, r);
+ return UnixEncoding.Instance.GetString (buf, 0, checked ((int) r));
} while (true);
}
- // Read the specified symbolic link. If the file isn't a symbolic link,
- // return null; otherwise, return the contents of the symbolic link.
- //
- // readlink(2) is horribly evil, as there is no way to query how big the
- // symlink contents are. Consequently, it's trial and error...
- private static string ReadSymbolicLink (string path, out Native.Errno errno)
+ public static string TryReadLinkAt (int dirfd, string path)
{
- errno = (Native.Errno) 0;
- StringBuilder buf = new StringBuilder (256);
+ byte[] buf = new byte[256];
do {
- int r = Native.Syscall.readlink (path, buf);
- if (r < 0) {
- errno = Native.Stdlib.GetLastError ();
+ long r = Native.Syscall.readlinkat (dirfd, path, buf);
+ if (r < 0)
return null;
- }
- else if (r == buf.Capacity) {
- buf.Capacity *= 2;
- }
+ else if (r == buf.Length)
+ buf = new byte[checked (buf.LongLength * 2)];
else
- return buf.ToString (0, r);
+ return UnixEncoding.Instance.GetString (buf, 0, checked ((int) r));
} while (true);
}
- public static string TryReadLink (string path)
+ public static string ReadLink (string path)
{
- Native.Errno errno;
- return ReadSymbolicLink (path, out errno);
+ string target = TryReadLink (path);
+ if (target == null)
+ UnixMarshal.ThrowExceptionForLastError ();
+ return target;
}
- public static string ReadLink (string path)
+ public static string ReadLinkAt (int dirfd, string path)
{
- Native.Errno errno;
- path = ReadSymbolicLink (path, out errno);
- if (errno != 0)
- UnixMarshal.ThrowExceptionForError (errno);
- return path;
+ string target = TryReadLinkAt (dirfd, path);
+ if (target == null)
+ UnixMarshal.ThrowExceptionForLastError ();
+ return target;
}
public static bool IsPathRooted (string path)
diff --git a/mcs/class/Mono.Posix/Mono.Unix/UnixSymbolicLinkInfo.cs b/mcs/class/Mono.Posix/Mono.Unix/UnixSymbolicLinkInfo.cs
index d0026d2b46a..242a294a2a1 100644
--- a/mcs/class/Mono.Posix/Mono.Unix/UnixSymbolicLinkInfo.cs
+++ b/mcs/class/Mono.Posix/Mono.Unix/UnixSymbolicLinkInfo.cs
@@ -56,19 +56,18 @@ namespace Mono.Unix {
public string ContentsPath {
get {
- return ReadLink ();
+ return UnixPath.ReadLink (FullPath);
}
}
public bool HasContents {
get {
- return TryReadLink () != null;
+ return UnixPath.TryReadLink (FullPath) != null;
}
}
public UnixFileSystemInfo GetContents ()
{
- ReadLink ();
return UnixFileSystemInfo.GetFileSystemEntry (
UnixPath.Combine (UnixPath.GetDirectoryName (FullPath),
ContentsPath));
@@ -103,23 +102,6 @@ namespace Mono.Unix {
{
return Native.Syscall.lstat (path, out stat) == 0;
}
-
- private string ReadLink ()
- {
- string r = TryReadLink ();
- if (r == null)
- UnixMarshal.ThrowExceptionForLastError ();
- return r;
- }
-
- private string TryReadLink ()
- {
- StringBuilder sb = new StringBuilder ((int) base.Length+1);
- int r = Native.Syscall.readlink (FullPath, sb);
- if (r == -1)
- return null;
- return sb.ToString (0, r);
- }
}
}
diff --git a/mcs/class/Mono.Posix/Test/Mono.Unix/ReadlinkTest.cs b/mcs/class/Mono.Posix/Test/Mono.Unix/ReadlinkTest.cs
new file mode 100644
index 00000000000..2dd81619705
--- /dev/null
+++ b/mcs/class/Mono.Posix/Test/Mono.Unix/ReadlinkTest.cs
@@ -0,0 +1,288 @@
+//
+// readlink() / readlinkat() Test Cases
+//
+// Authors:
+// Steffen Kiess (s-kiess@web.de)
+//
+// Copyright (C) 2013 Steffen Kiess
+//
+
+using System;
+using System.IO;
+using System.Text;
+
+using Mono.Unix;
+using Mono.Unix.Native;
+
+using NUnit.Framework;
+
+namespace MonoTests.Mono.Unix
+{
+ [TestFixture, Category ("NotDotNet")]
+ public class ReadlinkTest {
+
+ static string[] Targets = {
+ // Simple test cases
+ "a",
+ "test",
+ // With non-ASCII characters
+ "ä",
+ "test ö test",
+ // With non-UTF8 bytes
+ UnixEncoding.Instance.GetString (new byte[] {0xff, 0x80, 0x41, 0x80}),
+ // Size is roughly initial size of buffer
+ new string ('a', 255),
+ new string ('a', 256),
+ new string ('a', 257),
+ // With non-ASCII characters, size is roughly initial size of buffer
+ "ä" + new string ('a', 253), // 254 chars, 255 bytes
+ "ä" + new string ('a', 254), // 255 chars, 256 bytes
+ "ä" + new string ('a', 255), // 256 chars, 257 bytes
+ "ä" + new string ('a', 256), // 257 chars, 258 bytes
+ new string ('a', 253) + "ä", // 254 chars, 255 bytes
+ new string ('a', 254) + "ä", // 255 chars, 256 bytes
+ new string ('a', 255) + "ä", // 256 chars, 257 bytes
+ new string ('a', 256) + "ä", // 257 chars, 258 bytes
+ // With non-UTF8 bytes, size is roughly initial size of buffer
+ "\0\u00ff" + new string ('a', 253), // 255 chars, 254 bytes
+ "\0\u00ff" + new string ('a', 254), // 256 chars, 255 bytes
+ "\0\u00ff" + new string ('a', 255), // 257 chars, 256 bytes
+ "\0\u00ff" + new string ('a', 256), // 258 chars, 257 bytes
+ new string ('a', 253) + "\0\u00ff", // 255 chars, 254 bytes
+ new string ('a', 254) + "\0\u00ff", // 256 chars, 255 bytes
+ new string ('a', 255) + "\0\u00ff", // 257 chars, 256 bytes
+ new string ('a', 256) + "\0\u00ff", // 258 chars, 257 bytes
+ };
+
+ bool HaveReadlinkAt;
+ string TempFolder;
+ int TempFD;
+
+ [SetUp]
+ public void SetUp ()
+ {
+ HaveReadlinkAt = false;
+ try {
+ Syscall.readlinkat (-1, "", new byte[1]);
+ HaveReadlinkAt = true;
+ } catch (EntryPointNotFoundException) {
+ }
+
+
+ TempFolder = Path.Combine (Path.GetTempPath (), this.GetType ().FullName);
+
+ if (Directory.Exists (TempFolder))
+ //Directory.Delete (TempFolder, true); // Fails for long link target paths
+ new UnixDirectoryInfo (TempFolder).Delete (true);
+
+ Directory.CreateDirectory (TempFolder);
+
+ TempFD = Syscall.open (TempFolder, OpenFlags.O_RDONLY | OpenFlags.O_DIRECTORY);
+ if (TempFD < 0)
+ UnixMarshal.ThrowExceptionForLastError ();
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ if (Syscall.close (TempFD) < 0)
+ UnixMarshal.ThrowExceptionForLastError ();
+
+ if (Directory.Exists (TempFolder))
+ //Directory.Delete (TempFolder, true); // Fails for long link target paths
+ new UnixDirectoryInfo (TempFolder).Delete (true);
+ }
+
+ void CreateLink (string s)
+ {
+ string link = UnixPath.Combine (TempFolder, "link");
+
+ //File.Delete (link); // Fails for long link target paths
+ if (Syscall.unlink (link) < 0 && Stdlib.GetLastError () != Errno.ENOENT)
+ UnixMarshal.ThrowExceptionForLastError ();
+
+ if (Syscall.symlink (s, link) < 0)
+ UnixMarshal.ThrowExceptionForLastError ();
+ }
+
+ [Test]
+ public void ReadLink ()
+ {
+ foreach (string s in Targets) {
+ string link = UnixPath.Combine (TempFolder, "link");
+
+ CreateLink (s);
+
+ var target = UnixPath.ReadLink (link);
+ Assert.AreEqual (s, target);
+ }
+ }
+
+ [Test]
+ public void ReadLinkAt ()
+ {
+ if (!HaveReadlinkAt)
+ return;
+
+ foreach (string s in Targets) {
+ CreateLink (s);
+
+ var target = UnixPath.ReadLinkAt (TempFD, "link");
+ Assert.AreEqual (s, target);
+ }
+ }
+
+ [Test]
+ public void TryReadLink ()
+ {
+ foreach (string s in Targets) {
+ string link = UnixPath.Combine (TempFolder, "link");
+
+ CreateLink (s);
+
+ var target = UnixPath.TryReadLink (link);
+ Assert.AreEqual (s, target);
+ }
+ }
+
+ [Test]
+ public void TryReadLinkAt ()
+ {
+ if (!HaveReadlinkAt)
+ return;
+
+ foreach (string s in Targets) {
+ CreateLink (s);
+
+ var target = UnixPath.TryReadLinkAt (TempFD, "link");
+ Assert.AreEqual (s, target);
+ }
+ }
+
+ [Test]
+ public void readlink_byte ()
+ {
+ foreach (string s in Targets) {
+ string link = UnixPath.Combine (TempFolder, "link");
+
+ CreateLink (s);
+
+ string target = null;
+ byte[] buf = new byte[256];
+ do {
+ long r = Syscall.readlink (link, buf);
+ if (r < 0)
+ UnixMarshal.ThrowExceptionForLastError ();
+ Assert.GreaterOrEqual (buf.Length, r);
+ if (r == buf.Length)
+ buf = new byte[checked (buf.Length * 2)];
+ else
+ target = UnixEncoding.Instance.GetString (buf, 0, checked ((int) r));
+ } while (target == null);
+
+ Assert.AreEqual (s, target);
+ }
+ }
+
+ [Test]
+ public void readlinkat_byte ()
+ {
+ if (!HaveReadlinkAt)
+ return;
+
+ foreach (string s in Targets) {
+ CreateLink (s);
+
+ string target = null;
+ byte[] buf = new byte[256];
+ do {
+ long r = Syscall.readlinkat (TempFD, "link", buf);
+ if (r < 0)
+ UnixMarshal.ThrowExceptionForLastError ();
+ Assert.GreaterOrEqual (buf.Length, r);
+ if (r == buf.Length)
+ buf = new byte[checked (buf.Length * 2)];
+ else
+ target = UnixEncoding.Instance.GetString (buf, 0, checked ((int) r));
+ } while (target == null);
+
+ Assert.AreEqual (s, target);
+ }
+ }
+
+ [Test]
+ public void readlink_char ()
+ {
+ foreach (string s in Targets) {
+ string link = UnixPath.Combine (TempFolder, "link");
+
+ CreateLink (s);
+
+ var sb = new StringBuilder (256);
+ do {
+ int oldCapacity = sb.Capacity;
+ int r = Syscall.readlink (link, sb);
+ Assert.AreEqual (oldCapacity, sb.Capacity);
+ if (r < 0)
+ UnixMarshal.ThrowExceptionForLastError ();
+ Assert.AreEqual (r, sb.Length);
+ Assert.GreaterOrEqual (sb.Capacity, r);
+ if (r == sb.Capacity)
+ checked { sb.Capacity *= 2; }
+ else
+ break;
+ } while (true);
+ var target = sb.ToString ();
+
+ Assert.AreEqual (s, target);
+ }
+ }
+
+ [Test]
+ public void readlinkat_char ()
+ {
+ if (!HaveReadlinkAt)
+ return;
+
+ foreach (string s in Targets) {
+ CreateLink (s);
+
+ var sb = new StringBuilder (256);
+ do {
+ int oldCapacity = sb.Capacity;
+ int r = Syscall.readlinkat (TempFD, "link", sb);
+ Assert.AreEqual (oldCapacity, sb.Capacity);
+ if (r < 0)
+ UnixMarshal.ThrowExceptionForLastError ();
+ Assert.AreEqual (r, sb.Length);
+ Assert.GreaterOrEqual (sb.Capacity, r);
+ if (r == sb.Capacity)
+ checked { sb.Capacity *= 2; }
+ else
+ break;
+ } while (true);
+ var target = sb.ToString ();
+
+ Assert.AreEqual (s, target);
+ }
+ }
+
+ [Test]
+ public void ReadlinkMultiByteChar ()
+ {
+ string link = UnixPath.Combine (TempFolder, "link");
+
+ CreateLink ("á");
+
+ var sb = new StringBuilder (2);
+ int res = Syscall.readlink (link, sb);
+ if (res < 0)
+ UnixMarshal.ThrowExceptionForLastError ();
+
+ Assert.AreEqual (res, 2);
+ Assert.AreEqual (sb.Length, 2);
+ Assert.AreEqual (sb.Capacity, 2);
+ Assert.AreEqual (sb.ToString (), "á\u0000");
+ }
+ }
+}
diff --git a/mcs/class/Mono.Security/Mono.Security.X509.Extensions/KeyAttributesExtension.cs b/mcs/class/Mono.Security/Mono.Security.X509.Extensions/KeyAttributesExtension.cs
index e986af912de..cf4385ef55f 100644
--- a/mcs/class/Mono.Security/Mono.Security.X509.Extensions/KeyAttributesExtension.cs
+++ b/mcs/class/Mono.Security/Mono.Security.X509.Extensions/KeyAttributesExtension.cs
@@ -37,32 +37,6 @@ using Mono.Security;
using Mono.Security.X509;
namespace Mono.Security.X509.Extensions {
- // definition found @ http://groups.yahoo.com/group/ssl-talk/message/1964
- //
- // keyAttributes EXTENSION ::= {
- // SYNTAX KeyAttributes
- // IDENTIFIED BY { id-ce 2 } }
- //
- // KeyAttributes ::= SEQUENCE {
- // keyIdentifier KeyIdentifier OPTIONAL,
- // intendedKeyUsage KeyUsage OPTIONAL,
- // privateKeyUsagePeriod PrivateKeyValidity OPTIONAL
- // }
- // KeyUsage ::= BIT STRING {
- // digitalSignature (0),
- // nonRepudiation (1),
- // keyEncipherment (2),
- // dataEncipherment (3),
- // keyAgreement (4),
- // keyCertSign (5),
- // offLineCRLSign (6)
- // }
- // PrivateKeyValidity ::= SEQUENCE {
- // notBefore [0] GeneralizedTime OPTIONAL,
- // notAfter [1] GeneralizedTime OPTIONAL
- // }
- // ( CONSTRAINED BY { -- at least one component shall be present -- })
-
public class KeyAttributesExtension : X509Extension {
private byte[] keyId;
diff --git a/mcs/class/System.ComponentModel.Composition.4.5/Makefile b/mcs/class/System.ComponentModel.Composition.4.5/Makefile
index 947cdc7973d..6c5d3683ba4 100644
--- a/mcs/class/System.ComponentModel.Composition.4.5/Makefile
+++ b/mcs/class/System.ComponentModel.Composition.4.5/Makefile
@@ -12,7 +12,7 @@ CLEAN_FILES += $(STRING_MESSAGES)
EXTRA_DISTFILES = \
src/ComponentModel/Strings.resx
-VALID_PROFILE := $(filter net_4_0 net_4_5 monotouch monodroid, $(PROFILE))
+VALID_PROFILE := $(filter net_4_0 net_4_5 monotouch monodroid mobile_static, $(PROFILE))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-System.ComponentModel.Composition.dll
NO_INSTALL = yes
diff --git a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/GenerationServices.cs b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/GenerationServices.cs
index b6ac428a3c8..c7451bf98fc 100644
--- a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/GenerationServices.cs
+++ b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/GenerationServices.cs
@@ -1,4 +1,4 @@
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
// -----------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// -----------------------------------------------------------------------
diff --git a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/MetadataViewGenerator.cs b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/MetadataViewGenerator.cs
index 9199e0ede3e..28c8a94840b 100644
--- a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/MetadataViewGenerator.cs
+++ b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/MetadataViewGenerator.cs
@@ -1,4 +1,4 @@
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
// -----------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// -----------------------------------------------------------------------
diff --git a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/MetadataViewProvider.cs b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/MetadataViewProvider.cs
index 3ac6fd68598..e1e7dd5692e 100644
--- a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/MetadataViewProvider.cs
+++ b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/MetadataViewProvider.cs
@@ -32,7 +32,7 @@ namespace System.ComponentModel.Composition
{
if(!metadataViewType.IsAttributeDefined<MetadataViewImplementationAttribute>())
{
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
try
{
proxyType = MetadataViewGenerator.GenerateView(metadataViewType);
@@ -87,7 +87,7 @@ namespace System.ComponentModel.Composition
}
catch (TargetInvocationException ex)
{
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
//Unwrap known failures that we want to present as CompositionContractMismatchException
if(metadataViewType.IsInterface)
{
diff --git a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/Primitives/ExportedDelegate.cs b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/Primitives/ExportedDelegate.cs
index 18d81e994bb..799406c57d7 100644
--- a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/Primitives/ExportedDelegate.cs
+++ b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/System/ComponentModel/Composition/Primitives/ExportedDelegate.cs
@@ -42,7 +42,7 @@ namespace System.ComponentModel.Composition.Primitives
private Type CreateStandardDelegateType()
{
-#if MONOTOUCH
+#if FULL_AOT_RUNTIME
throw new NotImplementedException ();
#else
ParameterInfo[] parameters = this._method.GetParameters();
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/Makefile b/mcs/class/System.ComponentModel.DataAnnotations/Makefile
index f0f90784e42..9564b81d88b 100644
--- a/mcs/class/System.ComponentModel.DataAnnotations/Makefile
+++ b/mcs/class/System.ComponentModel.DataAnnotations/Makefile
@@ -18,7 +18,7 @@ endif
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
# This is a .NET 3.5+ assembly
-VALID_PROFILE := $(filter net_2_0 net_4_0 net_4_5 monotouch monodroid, $(PROFILE))
+VALID_PROFILE := $(filter net_2_0 net_4_0 net_4_5 monotouch monodroid mobile_static, $(PROFILE))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-System.ComponentModel.DataAnnotations.dll
NO_INSTALL = yes
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/CompareAttribute.cs b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/CompareAttribute.cs
new file mode 100644
index 00000000000..afec3c9a089
--- /dev/null
+++ b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/CompareAttribute.cs
@@ -0,0 +1,118 @@
+//
+// CompareAttribute.cs
+//
+// Authors:
+// Pablo Ruiz García <pablo.ruiz@gmail.com>
+//
+// Copyright (C) 2012 Xamarin Inc (http://www.xamarin.com)
+// Copyright (C) 2013 Pablo Ruiz García
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_4_5
+
+using System;
+using System.Linq;
+using System.Globalization;
+using System.ComponentModel;
+using System.Collections.Generic;
+
+namespace System.ComponentModel.DataAnnotations
+{
+ [AttributeUsageAttribute (AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
+ public class CompareAttribute : ValidationAttribute
+ {
+ private const string DefaultErrorMessage = "'{0}' and '{1}' do not match.";
+ private const string NonExistingPropertyErrorMessage = "Could not find a property named {0}.";
+ private string _otherProperty;
+ private string _otherPropertyDisplayName;
+
+ public CompareAttribute (string otherProperty)
+ : base (() => DefaultErrorMessage)
+ {
+ if (string.IsNullOrEmpty (otherProperty))
+ throw new ArgumentNullException ("otherProperty");
+
+ _otherProperty = otherProperty;
+ }
+
+ public string OtherProperty { get { return _otherProperty; } }
+ public string OtherPropertyDisplayName { get { return _otherPropertyDisplayName; } }
+ public override bool RequiresValidationContext { get { return true; } }
+
+ private IEnumerable<Attribute> GetPropertyAttributes (Type type, string propertyName)
+ {
+#if MOBILE
+ return TypeDescriptor.GetProperties (type).Find (propertyName, false).Attributes.OfType<Attribute> ();
+#else
+ // Using AMTTDP seems the way to go to be able to relay on attributes declared
+ // by means of associated classes not directly decorating the property.
+ // See: http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.associatedmetadatatypetypedescriptionprovider.aspx
+ return new AssociatedMetadataTypeTypeDescriptionProvider (type)
+ .GetTypeDescriptor (type)
+ .GetProperties ()
+ .Find (propertyName, false)
+ .Attributes.OfType<Attribute> ();
+#endif
+ }
+
+ private void ResolveOtherPropertyDisplayName (ValidationContext context)
+ {
+ if (_otherPropertyDisplayName == null)
+ {
+ // NOTE: From my own tests, it seems MS.NET looksup displayName from various sources, what follows
+ // is a best guess from my on tests, however, I am probably missing some corner cases. (pruiz)
+ var attributes = GetPropertyAttributes (context.ObjectType, _otherProperty);
+ var displayAttr = attributes.FirstOrDefault (x => x is DisplayAttribute) as DisplayAttribute;
+ var displayNameAttr = attributes.FirstOrDefault (x => x is DisplayNameAttribute) as DisplayNameAttribute;
+
+ if (displayAttr != null) _otherPropertyDisplayName = displayAttr.GetName ();
+ else if (displayNameAttr != null) _otherPropertyDisplayName = displayNameAttr.DisplayName;
+ _otherPropertyDisplayName = _otherProperty;
+ }
+ }
+
+ public override string FormatErrorMessage (string name)
+ {
+ var oname = string.IsNullOrEmpty (_otherPropertyDisplayName) ? _otherProperty : _otherPropertyDisplayName;
+ return string.Format (ErrorMessageString, name, oname);
+ }
+
+ protected override ValidationResult IsValid(object value, ValidationContext context)
+ {
+ var property = context.ObjectType.GetProperty (_otherProperty);
+
+ if (property == null) {
+ string message = string.Format (NonExistingPropertyErrorMessage, _otherProperty);
+ return new ValidationResult (message);
+ }
+
+ // XXX: Could not find a better place to call this, as this is
+ // the only place we have access to a ValidationContext. (pruiz)
+ ResolveOtherPropertyDisplayName (context);
+
+ return object.Equals (property.GetValue (context.ObjectInstance, null), value) ? null
+ : new ValidationResult (FormatErrorMessage (context.DisplayName));
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/CreditCardAttribute.cs b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/CreditCardAttribute.cs
new file mode 100644
index 00000000000..66fdc90759c
--- /dev/null
+++ b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/CreditCardAttribute.cs
@@ -0,0 +1,75 @@
+//
+// CreditCardAttribute.cs
+//
+// Authors:
+// Marek Safar <marek.safar@gmail.com>
+// Pablo Ruiz García <pablo.ruiz@gmail.com>
+//
+// Copyright (C) 2013 Xamarin Inc (http://www.xamarin.com)
+// Copyright (C) 2013 Pablo Ruiz García
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_4_5
+
+using System;
+using System.Linq;
+using System.Globalization;
+
+namespace System.ComponentModel.DataAnnotations
+{
+ [AttributeUsageAttribute (AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
+ public class CreditCardAttribute : DataTypeAttribute
+ {
+ private const string DefaultErrorMessage = "The {0} field is not a valid credit card number.";
+
+ public CreditCardAttribute ()
+ : base(DataType.CreditCard)
+ {
+ // XXX: There is no .ctor accepting Func<string> on DataTypeAttribute.. :?
+ base.ErrorMessage = DefaultErrorMessage;
+ }
+
+ public override bool IsValid(object value)
+ {
+ if (value == null)
+ return true;
+
+ if (string.IsNullOrEmpty(value as string))
+ return false;
+
+ // Remove any invalid characters..
+ var creditCardNumber = (value as string).Replace("-", "").Replace(" ", "");
+
+ if (creditCardNumber.Any (x => !Char.IsDigit (x)))
+ return false;
+
+ // Performan a Luhn-based check against credit card number.
+ //
+ // See: http://en.wikipedia.org/wiki/Luhn_algorithm
+ // See: http://rosettacode.org/wiki/Luhn_test_of_credit_card_numbers
+
+ return true;
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/DataType.cs b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/DataType.cs
index 2385e15a2c3..5ad56e74984 100644
--- a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/DataType.cs
+++ b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/DataType.cs
@@ -46,7 +46,12 @@ namespace System.ComponentModel.DataAnnotations
Password,
Url,
#if NET_4_0
- ImageUrl
+ ImageUrl,
+#endif
+#if NET_4_5
+ CreditCard,
+ PostalCode,
+ Upload
#endif
}
}
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/DataTypeAttribute.cs b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/DataTypeAttribute.cs
index 14c5aa5482a..3a373db8545 100644
--- a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/DataTypeAttribute.cs
+++ b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/DataTypeAttribute.cs
@@ -3,10 +3,10 @@
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
+// Pablo Ruiz García <pablo.ruiz@gmail.com>
//
// Copyright (C) 2008 Novell Inc. http://novell.com
-//
-
+// Copyright (C) 2013 Pablo Ruiz García
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -50,6 +50,27 @@ namespace System.ComponentModel.DataAnnotations
displayFormat.ApplyFormatInEditMode = true;
displayFormat.ConvertEmptyStringToNull = true;
displayFormat.DataFormatString = "{0:t}";
+#if NET_4_0
+ displayFormat.HtmlEncode = true;
+#endif
+ break;
+ case DataType.Date:
+ displayFormat = new DisplayFormatAttribute ();
+ displayFormat.ApplyFormatInEditMode = true;
+ displayFormat.ConvertEmptyStringToNull = true;
+ displayFormat.DataFormatString = "{0:d}";
+#if NET_4_0
+ displayFormat.HtmlEncode = true;
+#endif
+ break;
+ case DataType.Currency:
+ displayFormat = new DisplayFormatAttribute ();
+ displayFormat.ApplyFormatInEditMode = false;
+ displayFormat.ConvertEmptyStringToNull = true;
+ displayFormat.DataFormatString = "{0:C}";
+#if NET_4_0
+ displayFormat.HtmlEncode = true;
+#endif
break;
default:
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/EmailAddressAttribute.cs b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/EmailAddressAttribute.cs
new file mode 100644
index 00000000000..5d79b926c19
--- /dev/null
+++ b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/EmailAddressAttribute.cs
@@ -0,0 +1,313 @@
+//
+// EmailAddressAttribute.cs
+//
+// Authors:
+// Marek Safar <marek.safar@gmail.com>
+// Pablo Ruiz García <pablo.ruiz@gmail.com>
+//
+// Copyright (C) 2013 Xamarin Inc (http://www.xamarin.com)
+// Copyright (C) 2013 Pablo Ruiz García
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_4_5
+
+using System;
+using System.Globalization;
+using System.Text.RegularExpressions;
+
+namespace System.ComponentModel.DataAnnotations
+{
+ [AttributeUsageAttribute (AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
+ public class EmailAddressAttribute : DataTypeAttribute
+ {
+ private const string DefaultErrorMessage = "The {0} field is not a valid e-mail address.";
+ const string AtomCharacters = "!#$%&'*+-/=?^_`{|}~";
+
+ static bool IsLetterOrDigit (char c)
+ {
+ return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9');
+ }
+
+ static bool IsAtom (char c)
+ {
+ return IsLetterOrDigit (c) || AtomCharacters.IndexOf (c) != -1;
+ }
+
+ static bool IsDomain (char c)
+ {
+ return IsLetterOrDigit (c) || c == '-';
+ }
+
+ static bool SkipAtom (string text, ref int index)
+ {
+ int startIndex = index;
+
+ while (index < text.Length && IsAtom (text[index]))
+ index++;
+
+ return index > startIndex;
+ }
+
+ static bool SkipSubDomain (string text, ref int index)
+ {
+ if (!IsDomain (text[index]) || text[index] == '-')
+ return false;
+
+ index++;
+
+ while (index < text.Length && IsDomain (text[index]))
+ index++;
+
+ return true;
+ }
+
+ static bool SkipDomain (string text, ref int index)
+ {
+ if (!SkipSubDomain (text, ref index))
+ return false;
+
+ while (index < text.Length && text[index] == '.') {
+ index++;
+
+ if (index == text.Length)
+ return false;
+
+ if (!SkipSubDomain (text, ref index))
+ return false;
+ }
+
+ return true;
+ }
+
+ static bool SkipQuoted (string text, ref int index)
+ {
+ bool escaped = false;
+
+ // skip over leading '"'
+ index++;
+
+ while (index < text.Length) {
+ if (text[index] == (byte) '\\') {
+ escaped = !escaped;
+ } else if (!escaped) {
+ if (text[index] == (byte) '"')
+ break;
+ } else {
+ escaped = false;
+ }
+
+ index++;
+ }
+
+ if (index >= text.Length || text[index] != (byte) '"')
+ return false;
+
+ index++;
+
+ return true;
+ }
+
+ static bool SkipWord (string text, ref int index)
+ {
+ if (text[index] == (byte) '"')
+ return SkipQuoted (text, ref index);
+
+ return SkipAtom (text, ref index);
+ }
+
+ static bool SkipIPv4Literal (string text, ref int index)
+ {
+ int groups = 0;
+
+ while (index < text.Length && groups < 4) {
+ int startIndex = index;
+ int value = 0;
+
+ while (index < text.Length && text[index] >= '0' && text[index] <= '9') {
+ value = (value * 10) + (text[index] - '0');
+ index++;
+ }
+
+ if (index == startIndex || index - startIndex > 3 || value > 255)
+ return false;
+
+ groups++;
+
+ if (groups < 4 && index < text.Length && text[index] == '.')
+ index++;
+ }
+
+ return groups == 4;
+ }
+
+ static bool IsHexDigit (char c)
+ {
+ return (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f') || (c >= '0' && c <= '9');
+ }
+
+ // This needs to handle the following forms:
+ //
+ // IPv6-addr = IPv6-full / IPv6-comp / IPv6v4-full / IPv6v4-comp
+ // IPv6-hex = 1*4HEXDIG
+ // IPv6-full = IPv6-hex 7(":" IPv6-hex)
+ // IPv6-comp = [IPv6-hex *5(":" IPv6-hex)] "::" [IPv6-hex *5(":" IPv6-hex)]
+ // ; The "::" represents at least 2 16-bit groups of zeros
+ // ; No more than 6 groups in addition to the "::" may be
+ // ; present
+ // IPv6v4-full = IPv6-hex 5(":" IPv6-hex) ":" IPv4-address-literal
+ // IPv6v4-comp = [IPv6-hex *3(":" IPv6-hex)] "::"
+ // [IPv6-hex *3(":" IPv6-hex) ":"] IPv4-address-literal
+ // ; The "::" represents at least 2 16-bit groups of zeros
+ // ; No more than 4 groups in addition to the "::" and
+ // ; IPv4-address-literal may be present
+ static bool SkipIPv6Literal (string text, ref int index)
+ {
+ bool compact = false;
+ int colons = 0;
+
+ while (index < text.Length) {
+ int startIndex = index;
+
+ while (index < text.Length && IsHexDigit (text[index]))
+ index++;
+
+ if (index >= text.Length)
+ break;
+
+ if (index > startIndex && colons > 2 && text[index] == '.') {
+ // IPv6v4
+ index = startIndex;
+
+ if (!SkipIPv4Literal (text, ref index))
+ return false;
+
+ break;
+ }
+
+ int count = index - startIndex;
+ if (count > 4)
+ return false;
+
+ if (text[index] != ':')
+ break;
+
+ startIndex = index;
+ while (index < text.Length && text[index] == ':')
+ index++;
+
+ count = index - startIndex;
+ if (count > 2)
+ return false;
+
+ if (count == 2) {
+ if (compact)
+ return false;
+
+ compact = true;
+ colons += 2;
+ } else {
+ colons++;
+ }
+ }
+
+ if (colons < 2)
+ return false;
+
+ if (compact)
+ return colons < 6;
+
+ return colons < 7;
+ }
+
+ static bool Validate (string email)
+ {
+ int index = 0;
+
+ if (email.Length == 0)
+ return false;
+
+ if (!SkipWord (email, ref index) || index >= email.Length)
+ return false;
+
+ while (index < email.Length && email[index] == '.') {
+ index++;
+
+ if (!SkipWord (email, ref index) || index >= email.Length)
+ return false;
+ }
+
+ if (index + 1 >= email.Length || email[index++] != '@')
+ return false;
+
+ if (email[index] != '[') {
+ // domain
+ if (!SkipDomain (email, ref index))
+ return false;
+
+ return index == email.Length;
+ }
+
+ // address literal
+ index++;
+
+ // we need at least 8 more characters
+ if (index + 8 >= email.Length)
+ return false;
+
+ var ipv6 = email.Substring (index, 5);
+ if (ipv6.ToLowerInvariant () == "ipv6:") {
+ index += "IPv6:".Length;
+ if (!SkipIPv6Literal (email, ref index))
+ return false;
+ } else {
+ if (!SkipIPv4Literal (email, ref index))
+ return false;
+ }
+
+ if (index >= email.Length || email[index++] != ']')
+ return false;
+
+ return index == email.Length;
+ }
+
+ public EmailAddressAttribute ()
+ : base(DataType.EmailAddress)
+ {
+ // XXX: There is no .ctor accepting Func<string> on DataTypeAttribute.. :?
+ base.ErrorMessage = DefaultErrorMessage;
+ }
+
+ public override bool IsValid(object value)
+ {
+ if (value == null)
+ return true;
+
+ string email = value as string;
+ if (email == null)
+ return false;
+
+ return Validate (email);
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/FileExtensionsAttribute.cs b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/FileExtensionsAttribute.cs
new file mode 100644
index 00000000000..de9c384d64a
--- /dev/null
+++ b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/FileExtensionsAttribute.cs
@@ -0,0 +1,92 @@
+//
+// FileExtensionAttribute.cs
+//
+// Authors:
+// Marek Safar <marek.safar@gmail.com>
+// Pablo Ruiz García <pablo.ruiz@gmail.com>
+//
+// Copyright (C) 2013 Xamarin Inc (http://www.xamarin.com)
+// Copyright (C) 2013 Pablo Ruiz García
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_4_5
+
+using System;
+using System.Linq;
+using System.Globalization;
+using System.Text.RegularExpressions;
+
+namespace System.ComponentModel.DataAnnotations
+{
+ // See: http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.fileextensionsattribute.aspx
+
+ [AttributeUsageAttribute (AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
+ public class FileExtensionsAttribute : DataTypeAttribute
+ {
+ private const string DefaultErrorMessage = "The {0} field only accepts files with the following extensions: {1}.";
+ private const string DefaultExtensions = "png,jpg,jpeg,gif";
+
+ public FileExtensionsAttribute ()
+ : base (DataType.Upload)
+ {
+ // XXX: There is no .ctor accepting Func<string> on DataTypeAttribute.. :?
+ base.ErrorMessage = DefaultErrorMessage;
+ this.Extensions = DefaultExtensions;
+ }
+
+ public string Extensions { get; set; }
+
+ private string[] GetExtensionList ()
+ {
+ return (Extensions ?? "").Split (',');
+ }
+
+ private string GetExtension (string filename)
+ {
+ var parts = filename.Split ('.');
+ return parts.Length > 0 ? parts [parts.Length - 1] : "";
+ }
+
+ public override string FormatErrorMessage (string name)
+ {
+ var extensions = GetExtensionList().Aggregate ((cur, next) => cur + ", " + next);
+ return string.Format (ErrorMessageString, name, extensions);
+ }
+
+ public override bool IsValid(object value)
+ {
+ if (value == null)
+ return true;
+
+ if (value is string)
+ {
+ var str = value as string;
+ var ext = GetExtension (str);
+ return GetExtensionList ().Any (x => string.Equals (x, ext, StringComparison.InvariantCultureIgnoreCase));
+ }
+
+ return false;
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/MaxLengthAttribute.cs b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/MaxLengthAttribute.cs
index 7a2a2c589cc..84fab2a3a63 100644
--- a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/MaxLengthAttribute.cs
+++ b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/MaxLengthAttribute.cs
@@ -3,6 +3,7 @@
//
// Authors:
// Marek Safar <marek.safar@gmail.com>
+// Pablo Ruiz García <pablo.ruiz@gmail.com>
//
// Copyright (C) 2012 Xamarin Inc (http://www.xamarin.com)
//
@@ -28,22 +29,63 @@
#if NET_4_5
+using System;
+using System.Globalization;
+
namespace System.ComponentModel.DataAnnotations
{
[AttributeUsageAttribute (AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
public class MaxLengthAttribute : ValidationAttribute
{
+ private const string DefaultErrorMessage = "The field {0} must be a string or array type with a maximum length of '{1}'.";
+ private const string InvalidLengthErrorMessage = "MaxLengthAttribute must have a Length value that is greater than zero. " +
+ "Use MaxLength() without parameters to indicate that the string or array can have the maximum allowable length.";
+ private bool _maxLength = true;
+
public MaxLengthAttribute ()
+ : base (() => DefaultErrorMessage)
{
}
public MaxLengthAttribute (int length)
+ : this ()
{
Length = length;
+ _maxLength = false;
}
public int Length { get; private set; }
+
+ public override string FormatErrorMessage (string name)
+ {
+ return string.Format (ErrorMessageString, name, Length);
+ }
+
+ public override bool IsValid (object value)
+ {
+ // See: http://msdn.microsoft.com/en-us/library/gg696614.aspx
+
+ if (this.Length == 0 || this.Length < -1)
+ throw new InvalidOperationException (InvalidLengthErrorMessage);
+
+ // Weird, but using 'MaxLength' with no length seems to be valid
+ // and we should be returning true, and not throwing. (pablo)
+ if (value != null && !_maxLength) {
+
+ if (value is string) {
+ return (value as string).Length <= this.Length;
+ }
+
+ if (value is Array) {
+ return (value as Array).Length <= this.Length;
+ }
+
+ // NOTE: from my tests, MS.NET does not support IEnumerable as value. :(
+ }
+
+ return true;
+ }
}
}
-#endif \ No newline at end of file
+#endif
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/MinLengthAttribute.cs b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/MinLengthAttribute.cs
index 5d82ea12ab2..ff30f7646d3 100644
--- a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/MinLengthAttribute.cs
+++ b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/MinLengthAttribute.cs
@@ -3,6 +3,7 @@
//
// Authors:
// Marek Safar <marek.safar@gmail.com>
+// Pablo Ruiz García <pablo.ruiz@gmail.com>
//
// Copyright (C) 2013 Xamarin Inc (http://www.xamarin.com)
//
@@ -28,30 +29,54 @@
#if NET_4_5
+using System;
+using System.Globalization;
+
namespace System.ComponentModel.DataAnnotations
{
[AttributeUsageAttribute (AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
public class MinLengthAttribute : ValidationAttribute
{
- public MinLengthAttribute (int length)
+ private const string DefaultErrorMessage = "The field {0} must be a string or array type with a minimum length of '{1}'.";
+ private const string InvalidLengthErrorMessage = "MinLengthAttribute must have a Length value that is zero or greater.";
+
+ public MinLengthAttribute ()
{
- Length = length;
}
- [MonoTODO]
- public override bool IsValid (object value)
+ public MinLengthAttribute (int length)
{
- return true;
+ Length = length;
}
-
+
public int Length { get; private set; }
public override string FormatErrorMessage (string name)
{
- // TODO:
- return base.FormatErrorMessage (name);
+ return string.Format (ErrorMessageString, name, Length);
+ }
+
+ public override bool IsValid (object value)
+ {
+ if (this.Length < 0)
+ throw new InvalidOperationException (InvalidLengthErrorMessage);
+
+ if (value != null) {
+
+ if (value is string) {
+ return (value as string).Length >= this.Length;
+ }
+
+ if (value is Array) {
+ return (value as Array).Length >= this.Length;
+ }
+
+ // NOTE: from my tests, MS.NET does not support IEnumerable as value. :(
+ }
+
+ return true;
}
}
}
-#endif \ No newline at end of file
+#endif
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/PhoneAttribute.cs b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/PhoneAttribute.cs
new file mode 100644
index 00000000000..58cec3b6a4c
--- /dev/null
+++ b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/PhoneAttribute.cs
@@ -0,0 +1,69 @@
+//
+// PhoneAttribute.cs
+//
+// Authors:
+// Marek Safar <marek.safar@gmail.com>
+// Pablo Ruiz García <pablo.ruiz@gmail.com>
+//
+// Copyright (C) 2013 Xamarin Inc (http://www.xamarin.com)
+// Copyright (C) 2013 Pablo Ruiz García
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_4_5
+
+using System;
+using System.Globalization;
+using System.Text.RegularExpressions;
+
+namespace System.ComponentModel.DataAnnotations
+{
+ [AttributeUsageAttribute (AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
+ public class PhoneAttribute : DataTypeAttribute
+ {
+ private const string DefaultErrorMessage = "The {0} field is not a valid phone number.";
+ private const string _regexStr = @"^\+?(\d[\d-. ]+)?(\([\d-. ]+\))?[\d-. ]+\d$";
+ private static Regex _regex = new Regex (_regexStr, RegexOptions.IgnoreCase | RegexOptions.Compiled);
+
+ public PhoneAttribute ()
+ : base(DataType.PhoneNumber)
+ {
+ // XXX: There is no .ctor accepting Func<string> on DataTypeAttribute.. :?
+ base.ErrorMessage = DefaultErrorMessage;
+ }
+
+ public override bool IsValid(object value)
+ {
+ if (value == null)
+ return true;
+
+ if (value is string)
+ {
+ var str = value as string;
+ return !string.IsNullOrEmpty(str) ? _regex.IsMatch(str) : false;
+ }
+
+ return false;
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/RangeAttribute.cs b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/RangeAttribute.cs
index 6e91b96affe..9bf52669df9 100644
--- a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/RangeAttribute.cs
+++ b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/RangeAttribute.cs
@@ -28,6 +28,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
+using System.Globalization;
using System.ComponentModel;
namespace System.ComponentModel.DataAnnotations
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/RegularExpressionAttribute.cs b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/RegularExpressionAttribute.cs
index 342076c88e1..d4d304171f5 100644
--- a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/RegularExpressionAttribute.cs
+++ b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/RegularExpressionAttribute.cs
@@ -30,6 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
+using System.Globalization;
using System.ComponentModel;
using System.Text.RegularExpressions;
@@ -60,7 +61,7 @@ namespace System.ComponentModel.DataAnnotations
public override string FormatErrorMessage (string name)
{
- return string.Format(ErrorMessageString, name, Pattern);
+ return string.Format (ErrorMessageString, name, Pattern);
}
// LAMESPEC: does not throw ValidationException when value does not match the regular expression
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/StringLengthAttribute.cs b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/StringLengthAttribute.cs
index 40d272ba6cb..20a59e74abc 100644
--- a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/StringLengthAttribute.cs
+++ b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/StringLengthAttribute.cs
@@ -29,6 +29,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
+using System.Globalization;
using System.ComponentModel;
namespace System.ComponentModel.DataAnnotations
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/TimestampAttribute.cs b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/TimestampAttribute.cs
index 3625b6e975a..4d67b9c49b4 100644
--- a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/TimestampAttribute.cs
+++ b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/TimestampAttribute.cs
@@ -3,8 +3,10 @@
//
// Authors:
// Marek Safar <marek.safar@gmail.com>
+// Pablo Ruiz García <pablo.ruiz@gmail.com>
//
-// Copyright (C) 2012 Xamarin Inc (http://www.xamarin.com)
+// Copyright (C) 2013 Xamarin Inc (http://www.xamarin.com)
+// Copyright (C) 2013 Pablo Ruiz García
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -28,12 +30,14 @@
#if NET_4_0
+using System;
+
namespace System.ComponentModel.DataAnnotations
{
- [AttributeUsageAttribute (AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
- public sealed class TimestampAttribute : Attribute
+ [AttributeUsageAttribute (AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
+ public class TimestampAttribute : Attribute
{
}
}
-#endif \ No newline at end of file
+#endif
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/ValidationAttribute.cs b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/ValidationAttribute.cs
index 76284252bd7..d95ff90b3a5 100644
--- a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/ValidationAttribute.cs
+++ b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/ValidationAttribute.cs
@@ -31,6 +31,7 @@
using System;
using System.ComponentModel;
using System.Reflection;
+using System.Globalization;
namespace System.ComponentModel.DataAnnotations
{
@@ -129,6 +130,12 @@ namespace System.ComponentModel.DataAnnotations
protected string ErrorMessageString {
get { return GetStringFromResourceAccessor (); }
}
+
+#if NET_4_5
+ // See: http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.validationattribute.requiresvalidationcontext.aspx
+ public virtual bool RequiresValidationContext { get { return false; } }
+#endif
+
#if NET_4_0
NotImplementedException NestedNIEX ()
{
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/ValidationResult.cs b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/ValidationResult.cs
index efc38b04cdc..50afd2182c1 100644
--- a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/ValidationResult.cs
+++ b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations/ValidationResult.cs
@@ -57,5 +57,16 @@ namespace System.ComponentModel.DataAnnotations
else
MemberNames = new string[] {};
}
+
+#if NET_4_5
+ public override string ToString ()
+ {
+ // See: http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.validationresult.tostring.aspx
+ if (!string.IsNullOrEmpty (ErrorMessage))
+ return ErrorMessage;
+
+ return base.ToString ();
+ }
+#endif
}
}
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations_test.dll.sources b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations_test.dll.sources
index 8be88206e06..70011cc02ec 100644
--- a/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations_test.dll.sources
+++ b/mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations_test.dll.sources
@@ -14,3 +14,8 @@ System.ComponentModel.DataAnnotations/ValidationContextTest.cs
System.ComponentModel.DataAnnotations/ValidationResultTest.cs
System.ComponentModel.DataAnnotations/ValidatorTest.cs
System.ComponentModel.DataAnnotations/RegularExpressionAttributeTest.cs
+System.ComponentModel.DataAnnotations/EmailAddressAttributeTest.cs
+System.ComponentModel.DataAnnotations/PhoneAttributeTest.cs
+System.ComponentModel.DataAnnotations/CreditCardAttributeTest.cs
+System.ComponentModel.DataAnnotations/FileExtensionsAttributeTest.cs
+System.ComponentModel.DataAnnotations/CompareAttributeTest.cs
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/AssociatedMetadataTypeTypeDescriptionProviderTests.cs b/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/AssociatedMetadataTypeTypeDescriptionProviderTests.cs
index 340cde8c78b..d0d39e121d4 100644
--- a/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/AssociatedMetadataTypeTypeDescriptionProviderTests.cs
+++ b/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/AssociatedMetadataTypeTypeDescriptionProviderTests.cs
@@ -27,6 +27,8 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+
+#if !MOBILE
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
@@ -77,3 +79,4 @@ namespace MonoTests.System.ComponentModel.DataAnnotations
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/CompareAttributeTest.cs b/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/CompareAttributeTest.cs
new file mode 100644
index 00000000000..dc95296fbed
--- /dev/null
+++ b/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/CompareAttributeTest.cs
@@ -0,0 +1,70 @@
+//
+// CompareAttributeTest.cs
+//
+// Authors:
+// Pablo Ruiz García <pablo.ruiz@gmail.com>
+//
+// Copyright (C) 2010 Novell, Inc. (http://novell.com/)
+// Copyright (C) 2013 Pablo Ruiz García
+//
+// 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.ComponentModel.DataAnnotations;
+using System.Text;
+
+using NUnit.Framework;
+using MonoTests.Common;
+
+namespace MonoTests.System.ComponentModel.DataAnnotations
+{
+#if NET_4_5
+ [TestFixture]
+ public class CompareAttributeTest
+ {
+ public class TestModel {
+ public string A { get; set; }
+ [Display(Name = "TheB")]
+ public string B { get; set; }
+ }
+
+ [Test]
+ public void GetValidationResult ()
+ {
+ var sla = new CompareAttribute ("B");
+ var obj = new TestModel { A = "x", B = "x" };
+ var ctx = new ValidationContext(obj, null, null);
+
+ Assert.IsNotNull (sla.GetValidationResult (null, ctx), "#A1-1");
+ Assert.IsNotNull (sla.GetValidationResult (String.Empty, ctx), "#A1-2");
+ Assert.IsNotNull (sla.GetValidationResult (obj, ctx), "#A1-3");
+ Assert.IsNull (sla.GetValidationResult (obj.A, ctx), "#A1-4");
+
+ obj = new TestModel { A = "x", B = "n" };
+
+ Assert.IsNotNull (sla.GetValidationResult (null, ctx), "#B-1");
+ Assert.IsNotNull (sla.GetValidationResult (obj, ctx), "#B-2");
+ Assert.IsNotNull (sla.GetValidationResult (true, ctx), "#B-3");
+ Assert.IsNotNull (sla.GetValidationResult (DateTime.Now, ctx), "#B-4");
+ }
+ }
+#endif
+}
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/CreditCardAttributeTest.cs b/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/CreditCardAttributeTest.cs
new file mode 100644
index 00000000000..67ed9dac283
--- /dev/null
+++ b/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/CreditCardAttributeTest.cs
@@ -0,0 +1,62 @@
+//
+// CreditCardAttributeTest.cs
+//
+// Authors:
+// Pablo Ruiz García <pablo.ruiz@gmail.com>
+//
+// Copyright (C) 2010 Novell, Inc. (http://novell.com/)
+// Copyright (C) 2013 Pablo Ruiz García
+//
+// 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.ComponentModel.DataAnnotations;
+using System.Text;
+
+using NUnit.Framework;
+using MonoTests.Common;
+
+namespace MonoTests.System.ComponentModel.DataAnnotations
+{
+#if NET_4_5
+ [TestFixture]
+ public class CreditCardAttributeTest
+ {
+ [Test]
+ public void IsValid ()
+ {
+ var sla = new CreditCardAttribute ();
+
+ Assert.IsTrue (sla.IsValid (null), "#A1-1");
+ Assert.IsFalse (sla.IsValid (String.Empty), "#A1-2");
+ Assert.IsFalse (sla.IsValid ("string"), "#A1-3");
+ Assert.IsTrue (sla.IsValid ("378282246310005"), "#A1-4");
+ Assert.IsTrue (sla.IsValid ("3782-8224-6310-005"), "#A1-5");
+ Assert.IsTrue (sla.IsValid ("371449635398431"), "#A-6");
+#if false
+ Assert.IsFalse (sla.IsValid ("371449635498431"), "#A-6b");
+#endif
+ Assert.IsFalse (sla.IsValid (true), "#A1-7");
+ Assert.IsFalse (sla.IsValid (DateTime.Now), "#A1-8");
+ }
+ }
+#endif
+}
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/EmailAddressAttributeTest.cs b/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/EmailAddressAttributeTest.cs
new file mode 100644
index 00000000000..09350cde8fd
--- /dev/null
+++ b/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/EmailAddressAttributeTest.cs
@@ -0,0 +1,87 @@
+//
+// EmailAddressAttributeTest.cs
+//
+// Authors:
+// Pablo Ruiz García <pablo.ruiz@gmail.com>
+//
+// Copyright (C) 2010 Novell, Inc. (http://novell.com/)
+// Copyright (C) 2013 Pablo Ruiz García
+//
+// 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.ComponentModel.DataAnnotations;
+using System.Text;
+
+using NUnit.Framework;
+using MonoTests.Common;
+
+namespace MonoTests.System.ComponentModel.DataAnnotations
+{
+#if NET_4_5
+ [TestFixture]
+ public class EmailAddressAttributeTest
+ {
+ static readonly object[] ValidAddresses = new object[] {
+ null,
+ "\"Abc\\@def\"@example.com",
+ "\"Fred Bloggs\"@example.com",
+ "\"Joe\\\\Blow\"@example.com",
+ "\"Abc@def\"@example.com",
+ "customer/department=shipping@example.com",
+ "$A12345@example.com",
+ "!def!xyz%abc@example.com",
+ "_somename@example.com",
+ "valid.ipv4.addr@[123.1.72.10]",
+ "valid.ipv6.addr@[IPv6:0::1]",
+ "valid.ipv6.addr@[IPv6:2607:f0d0:1002:51::4]",
+ "valid.ipv6.addr@[IPv6:fe80::230:48ff:fe33:bc33]",
+ "valid.ipv6v4.addr@[IPv6:aaaa:aaaa:aaaa:aaaa:aaaa:aaaa:127.0.0.1]",
+ };
+
+ static readonly object[] InvalidAddresses = new object[] {
+ "",
+ 123,
+ DateTime.Now,
+ "invalid",
+ "invalid@",
+ "invalid @",
+ "invalid@[555.666.777.888]",
+ "invalid@[IPv6:123456]",
+ "invalid@[127.0.0.1.]",
+ "invalid@[127.0.0.1].",
+ "invalid@[127.0.0.1]x",
+ };
+
+ [Test]
+ public void IsValid ()
+ {
+ var sla = new EmailAddressAttribute ();
+
+ for (int i = 0; i < ValidAddresses.Length; i++)
+ Assert.IsTrue (sla.IsValid (ValidAddresses[i]), "#A1-{0}", i);
+
+ for (int i = 0; i < InvalidAddresses.Length; i++)
+ Assert.IsFalse (sla.IsValid (InvalidAddresses[i]), "#B1-{0}", i);
+ }
+ }
+#endif
+}
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/FileExtensionsAttributeTest.cs b/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/FileExtensionsAttributeTest.cs
new file mode 100644
index 00000000000..257161fc06c
--- /dev/null
+++ b/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/FileExtensionsAttributeTest.cs
@@ -0,0 +1,61 @@
+//
+// FileExtensionsAttributeTest.cs
+//
+// Authors:
+// Pablo Ruiz García <pablo.ruiz@gmail.com>
+//
+// Copyright (C) 2010 Novell, Inc. (http://novell.com/)
+// Copyright (C) 2013 Pablo Ruiz García
+//
+// 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.ComponentModel.DataAnnotations;
+using System.Text;
+
+using NUnit.Framework;
+using MonoTests.Common;
+
+namespace MonoTests.System.ComponentModel.DataAnnotations
+{
+#if NET_4_5
+ [TestFixture]
+ public class FileExtensionsAttributeTest
+ {
+ [Test]
+ public void IsValid ()
+ {
+ var sla = new FileExtensionsAttribute () {
+ Extensions = "txt,jpg"
+ };
+
+ Assert.IsTrue (sla.IsValid (null), "#A1-1");
+ Assert.IsFalse (sla.IsValid (String.Empty), "#A1-2");
+ Assert.IsFalse (sla.IsValid ("string"), "#A1-3");
+ Assert.IsTrue (sla.IsValid ("file.txt"), "#A1-4");
+ Assert.IsTrue (sla.IsValid ("file.jpg"), "#A1-5");
+ Assert.IsTrue (sla.IsValid ("file.xxx.txt"), "#A-6");
+ Assert.IsFalse (sla.IsValid (true), "#A1-7");
+ Assert.IsFalse (sla.IsValid (DateTime.Now), "#A1-8");
+ }
+ }
+#endif
+}
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/PhoneAttributeTest.cs b/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/PhoneAttributeTest.cs
new file mode 100644
index 00000000000..3ca6e0bf3d4
--- /dev/null
+++ b/mcs/class/System.ComponentModel.DataAnnotations/Test/System.ComponentModel.DataAnnotations/PhoneAttributeTest.cs
@@ -0,0 +1,58 @@
+//
+// PhoneAttributeTest.cs
+//
+// Authors:
+// Pablo Ruiz García <pablo.ruiz@gmail.com>
+//
+// Copyright (C) 2010 Novell, Inc. (http://novell.com/)
+// Copyright (C) 2013 Pablo Ruiz García
+//
+// 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.ComponentModel.DataAnnotations;
+using System.Text;
+
+using NUnit.Framework;
+using MonoTests.Common;
+
+namespace MonoTests.System.ComponentModel.DataAnnotations
+{
+#if NET_4_5
+ [TestFixture]
+ public class PhoneAttributeTest
+ {
+ [Test]
+ public void IsValid ()
+ {
+ var sla = new PhoneAttribute ();
+
+ Assert.IsTrue (sla.IsValid (null), "#A1-1");
+ Assert.IsFalse (sla.IsValid (String.Empty), "#A1-2");
+ Assert.IsFalse (sla.IsValid ("string"), "#A1-3");
+ Assert.IsTrue (sla.IsValid ("1-800-642-7676"), "#A1-4");
+ Assert.IsTrue (sla.IsValid ("+86-21-96081318"), "#A1-5");
+ Assert.IsFalse (sla.IsValid (true), "#A1-6");
+ Assert.IsFalse (sla.IsValid (DateTime.Now), "#A1-7");
+ }
+ }
+#endif
+}
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/mobile_static_System.ComponentModel.DataAnnotations.dll.sources b/mcs/class/System.ComponentModel.DataAnnotations/mobile_static_System.ComponentModel.DataAnnotations.dll.sources
new file mode 100644
index 00000000000..3de14f5e0a7
--- /dev/null
+++ b/mcs/class/System.ComponentModel.DataAnnotations/mobile_static_System.ComponentModel.DataAnnotations.dll.sources
@@ -0,0 +1 @@
+#include net_4_5_System.ComponentModel.DataAnnotations.dll.sources
diff --git a/mcs/class/System.ComponentModel.DataAnnotations/net_4_5_System.ComponentModel.DataAnnotations.dll.sources b/mcs/class/System.ComponentModel.DataAnnotations/net_4_5_System.ComponentModel.DataAnnotations.dll.sources
index 8faf2a074fb..49e068c167e 100644
--- a/mcs/class/System.ComponentModel.DataAnnotations/net_4_5_System.ComponentModel.DataAnnotations.dll.sources
+++ b/mcs/class/System.ComponentModel.DataAnnotations/net_4_5_System.ComponentModel.DataAnnotations.dll.sources
@@ -2,6 +2,11 @@
System.ComponentModel.DataAnnotations/MinLengthAttribute.cs
System.ComponentModel.DataAnnotations/MaxLengthAttribute.cs
+System.ComponentModel.DataAnnotations/CreditCardAttribute.cs
+System.ComponentModel.DataAnnotations/EmailAddressAttribute.cs
+System.ComponentModel.DataAnnotations/PhoneAttribute.cs
+System.ComponentModel.DataAnnotations/FileExtensionsAttribute.cs
+System.ComponentModel.DataAnnotations/CompareAttribute.cs
System.ComponentModel.DataAnnotations.Schema/ColumnAttribute.cs
System.ComponentModel.DataAnnotations.Schema/ComplexTypeAttribute.cs
System.ComponentModel.DataAnnotations.Schema/DatabaseGeneratedAttribute.cs
diff --git a/mcs/class/System.Core/Makefile b/mcs/class/System.Core/Makefile
index 0b3e9865cf8..22252d68b9f 100644
--- a/mcs/class/System.Core/Makefile
+++ b/mcs/class/System.Core/Makefile
@@ -14,10 +14,6 @@ ifeq (monodroid, $(PROFILE))
LIB_MCS_FLAGS += -d:FEATURE_CORE_DLR,FEATURE_REFEMIT,ANDROID
endif
-ifeq (monotouch, $(PROFILE))
-LIB_MCS_FLAGS += -d:FULL_AOT_RUNTIME
-endif
-
ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
LIB_MCS_FLAGS += -d:FEATURE_CORE_DLR,FEATURE_REFEMIT,FEATURE_PDBEMIT
endif
diff --git a/mcs/class/System.Core/System.Collections.Generic/HashSet.cs b/mcs/class/System.Core/System.Collections.Generic/HashSet.cs
index 0b8aea3a8fe..9f335aea547 100644
--- a/mcs/class/System.Core/System.Collections.Generic/HashSet.cs
+++ b/mcs/class/System.Core/System.Collections.Generic/HashSet.cs
@@ -566,8 +566,7 @@ namespace System.Collections.Generic {
empty_slot = NO_SLOT;
if (capacity > 0) {
- table = new int[capacity];
- slots = new T[capacity];
+ InitArrays(capacity);
T[] tableArray = (T[]) si.GetValue("Elements", typeof(T[]));
if (tableArray == null)
diff --git a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs
index 005f0882ac6..014cde469fa 100644
--- a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs
+++ b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs
@@ -236,8 +236,18 @@ namespace System.IO.MemoryMappedFiles
[DllImport ("libc", SetLastError=true)]
static extern int open (string path, int flags, int access);
+#if MONODROID
+ [DllImport ("__Internal")]
+ static extern int monodroid_getpagesize ();
+
+ static int getpagesize ()
+ {
+ return monodroid_getpagesize ();
+ }
+#else
[DllImport ("libc")]
static extern int getpagesize ();
+#endif
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern long mono_filesize_from_path (string str);
diff --git a/mcs/class/System.Core/System.Linq.Expressions/BinaryExpression.cs b/mcs/class/System.Core/System.Linq.Expressions/BinaryExpression.cs
index 143f57513f4..b0528917b2c 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/BinaryExpression.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/BinaryExpression.cs
@@ -35,7 +35,9 @@
using System;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
namespace System.Linq.Expressions {
@@ -568,12 +570,48 @@ namespace System.Linq.Expressions {
void EmitRelationalBinary (EmitContext ec)
{
- if (!IsLifted)
+ if (!IsLifted) {
EmitNonLiftedBinary (ec);
- else if (IsLiftedToNull)
+ return;
+ }
+
+ if (IsLiftedToNull) {
EmitLiftedToNullBinary (ec);
- else
- EmitLiftedRelationalBinary (ec);
+ return;
+ }
+
+ if (ConstantExpression.IsNull (right) && !ConstantExpression.IsNull (left) && left.Type.IsNullable ()) {
+ EmitNullEquality (ec, left);
+ return;
+ }
+
+ if (ConstantExpression.IsNull (left) && !ConstantExpression.IsNull (right) && right.Type.IsNullable ()) {
+ EmitNullEquality (ec, right);
+ return;
+ }
+
+ EmitLiftedRelationalBinary (ec);
+ }
+
+ void EmitNullEquality (EmitContext ec, Expression e)
+ {
+ var ig = ec.ig;
+
+ if (IsLiftedToNull) {
+ e.Emit (ec);
+ if (e.Type != typeof (void))
+ ig.Emit (OpCodes.Pop);
+
+ ec.EmitNullableNew (typeof (bool?));
+ return;
+ }
+
+ var se = ec.EmitStored (e);
+ ec.EmitNullableHasValue (se);
+ if (NodeType == ExpressionType.Equal) {
+ ig.Emit (OpCodes.Ldc_I4_0);
+ ig.Emit (OpCodes.Ceq);
+ }
}
void EmitLiftedUserDefinedOperator (EmitContext ec)
diff --git a/mcs/class/System.Core/System.Linq.Expressions/ConditionalExpression.cs b/mcs/class/System.Core/System.Linq.Expressions/ConditionalExpression.cs
index 6d6d5dd60ec..6b1ba6ced51 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/ConditionalExpression.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/ConditionalExpression.cs
@@ -27,7 +27,9 @@
//
using System;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
namespace System.Linq.Expressions {
diff --git a/mcs/class/System.Core/System.Linq.Expressions/ConstantExpression.cs b/mcs/class/System.Core/System.Linq.Expressions/ConstantExpression.cs
index 38a7b3cab66..2ff30c8b81c 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/ConstantExpression.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/ConstantExpression.cs
@@ -33,7 +33,9 @@
using System;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
namespace System.Linq.Expressions {
@@ -49,6 +51,12 @@ namespace System.Linq.Expressions {
{
this.value = value;
}
+
+ internal static bool IsNull (Expression e)
+ {
+ var c = e as ConstantExpression;
+ return c != null && c.value == null;
+ }
#if !FULL_AOT_RUNTIME
internal override void Emit (EmitContext ec)
diff --git a/mcs/class/System.Core/System.Linq.Expressions/ElementInit.cs b/mcs/class/System.Core/System.Linq.Expressions/ElementInit.cs
index 2069927b306..b0013419f66 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/ElementInit.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/ElementInit.cs
@@ -29,7 +29,9 @@
using System;
using System.Collections.ObjectModel;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
namespace System.Linq.Expressions {
diff --git a/mcs/class/System.Core/System.Linq.Expressions/Expression.cs b/mcs/class/System.Core/System.Linq.Expressions/Expression.cs
index 8106c60f47d..4c871739686 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/Expression.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/Expression.cs
@@ -34,7 +34,9 @@ using System.Collections.ObjectModel;
using System.Globalization;
using System.Linq;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
namespace System.Linq.Expressions {
@@ -50,11 +52,11 @@ namespace System.Linq.Expressions {
internal const BindingFlags AllStatic = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy;
internal const BindingFlags All = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance | BindingFlags.FlattenHierarchy;
- public ExpressionType NodeType {
+ public virtual ExpressionType NodeType {
get { return node_type; }
}
- public Type Type {
+ public virtual Type Type {
get { return type; }
}
@@ -270,6 +272,12 @@ namespace System.Linq.Expressions {
if (ltype == rtype && ultype == typeof (bool))
return null;
+
+ if (ltype.IsNullable () && ConstantExpression.IsNull (right) && !ConstantExpression.IsNull (left))
+ return null;
+
+ if (rtype.IsNullable () && ConstantExpression.IsNull (left) && !ConstantExpression.IsNull (right))
+ return null;
}
if (oper_name == "op_LeftShift" || oper_name == "op_RightShift") {
@@ -390,12 +398,16 @@ namespace System.Linq.Expressions {
if (!left.Type.IsNullable () && !right.Type.IsNullable ()) {
is_lifted = false;
liftToNull = false;
- type = typeof (bool);
+ type = typeof(bool);
} else if (left.Type.IsNullable () && right.Type.IsNullable ()) {
is_lifted = true;
- type = liftToNull ? typeof (bool?) : typeof (bool);
- } else
+ type = liftToNull ? typeof(bool?) : typeof(bool);
+ } else if (ConstantExpression.IsNull (left) || ConstantExpression.IsNull (right)) {
+ is_lifted = true;
+ type = typeof (bool);
+ } else {
throw new InvalidOperationException ();
+ }
} else {
var parameters = method.GetParameters ();
diff --git a/mcs/class/System.Core/System.Linq.Expressions/ExpressionVisitor.cs b/mcs/class/System.Core/System.Linq.Expressions/ExpressionVisitor.cs
index f8e81498d15..3a44b594c9a 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/ExpressionVisitor.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/ExpressionVisitor.cs
@@ -31,7 +31,7 @@ using System.Collections.ObjectModel;
namespace System.Linq.Expressions {
-#if MONOTOUCH
+#if FULL_AOT_RUNTIME
public
#endif
abstract class ExpressionVisitor {
diff --git a/mcs/class/System.Core/System.Linq.Expressions/Extensions.cs b/mcs/class/System.Core/System.Linq.Expressions/Extensions.cs
index 0f4eadfd342..3b76fe170e0 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/Extensions.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/Extensions.cs
@@ -29,7 +29,9 @@
using System;
using System.Collections.Generic;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
using System.Runtime.CompilerServices;
namespace System.Linq.Expressions {
diff --git a/mcs/class/System.Core/System.Linq.Expressions/LambdaExpression.cs b/mcs/class/System.Core/System.Linq.Expressions/LambdaExpression.cs
index 92a40c6d4b7..6e873b0c9b2 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/LambdaExpression.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/LambdaExpression.cs
@@ -31,7 +31,10 @@ using System;
using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
+
namespace System.Linq.Expressions {
@@ -82,7 +85,7 @@ namespace System.Linq.Expressions {
public Delegate Compile ()
{
-#if TARGET_JVM || MONOTOUCH
+#if FULL_AOT_RUNTIME
return new System.Linq.jvm.Runner (this).CreateDelegate ();
#else
var context = new CompilationContext ();
@@ -91,7 +94,7 @@ namespace System.Linq.Expressions {
#endif
}
-#if TARGET_JVM || MONOTOUCH
+#if FULL_AOT_RUNTIME
internal Delegate Compile (System.Linq.jvm.ExpressionInterpreter interpreter)
{
return new System.Linq.jvm.Runner (this, interpreter).CreateDelegate ();
diff --git a/mcs/class/System.Core/System.Linq.Expressions/MemberAssignment.cs b/mcs/class/System.Core/System.Linq.Expressions/MemberAssignment.cs
index cf581054568..87329224dc2 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/MemberAssignment.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/MemberAssignment.cs
@@ -28,7 +28,9 @@
using System;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
using System.Text;
namespace System.Linq.Expressions {
diff --git a/mcs/class/System.Core/System.Linq.Expressions/MemberBinding.cs b/mcs/class/System.Core/System.Linq.Expressions/MemberBinding.cs
index bf0c6835c3f..8f6e026eee1 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/MemberBinding.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/MemberBinding.cs
@@ -28,7 +28,9 @@
using System;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
namespace System.Linq.Expressions {
diff --git a/mcs/class/System.Core/System.Linq.Expressions/MemberExpression.cs b/mcs/class/System.Core/System.Linq.Expressions/MemberExpression.cs
index 1a0255f4ea7..b7483d4fdc4 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/MemberExpression.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/MemberExpression.cs
@@ -28,7 +28,9 @@
using System;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
namespace System.Linq.Expressions {
diff --git a/mcs/class/System.Core/System.Linq.Expressions/MemberListBinding.cs b/mcs/class/System.Core/System.Linq.Expressions/MemberListBinding.cs
index 3c320e63e30..51d16028b43 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/MemberListBinding.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/MemberListBinding.cs
@@ -29,7 +29,9 @@
using System;
using System.Collections.ObjectModel;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
namespace System.Linq.Expressions {
diff --git a/mcs/class/System.Core/System.Linq.Expressions/MemberMemberBinding.cs b/mcs/class/System.Core/System.Linq.Expressions/MemberMemberBinding.cs
index ec10de5c526..414acf3aa65 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/MemberMemberBinding.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/MemberMemberBinding.cs
@@ -29,7 +29,9 @@
using System;
using System.Collections.ObjectModel;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
namespace System.Linq.Expressions {
diff --git a/mcs/class/System.Core/System.Linq.Expressions/MethodCallExpression.cs b/mcs/class/System.Core/System.Linq.Expressions/MethodCallExpression.cs
index 7f898689c0a..0e1e7d7d467 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/MethodCallExpression.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/MethodCallExpression.cs
@@ -29,7 +29,9 @@
using System;
using System.Collections.ObjectModel;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
namespace System.Linq.Expressions {
diff --git a/mcs/class/System.Core/System.Linq.Expressions/NewArrayExpression.cs b/mcs/class/System.Core/System.Linq.Expressions/NewArrayExpression.cs
index c30bec70537..68ac8b6d770 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/NewArrayExpression.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/NewArrayExpression.cs
@@ -30,7 +30,9 @@ using System;
using System.Collections.ObjectModel;
using System.Linq;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
namespace System.Linq.Expressions {
diff --git a/mcs/class/System.Core/System.Linq.Expressions/NewExpression.cs b/mcs/class/System.Core/System.Linq.Expressions/NewExpression.cs
index 005d17569ec..48499f3d2e2 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/NewExpression.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/NewExpression.cs
@@ -29,7 +29,9 @@
using System;
using System.Collections.ObjectModel;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
namespace System.Linq.Expressions {
diff --git a/mcs/class/System.Core/System.Linq.Expressions/ParameterExpression.cs b/mcs/class/System.Core/System.Linq.Expressions/ParameterExpression.cs
index 94bd0ea4475..3fce527e11c 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/ParameterExpression.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/ParameterExpression.cs
@@ -28,7 +28,9 @@
//
using System;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
namespace System.Linq.Expressions {
diff --git a/mcs/class/System.Core/System.Linq.Expressions/TypeBinaryExpression.cs b/mcs/class/System.Core/System.Linq.Expressions/TypeBinaryExpression.cs
index 2629c96c4f2..77f91e044d4 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/TypeBinaryExpression.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/TypeBinaryExpression.cs
@@ -27,7 +27,9 @@
//
using System;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
namespace System.Linq.Expressions {
diff --git a/mcs/class/System.Core/System.Linq.Expressions/UnaryExpression.cs b/mcs/class/System.Core/System.Linq.Expressions/UnaryExpression.cs
index 4f6f9cb890d..13a1a5a9b3c 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/UnaryExpression.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/UnaryExpression.cs
@@ -28,7 +28,9 @@
using System;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
namespace System.Linq.Expressions {
diff --git a/mcs/class/System.Core/System.Linq.Parallel/RangeList.cs b/mcs/class/System.Core/System.Linq.Parallel/RangeList.cs
index 5a8985bbe69..dc533d75034 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/RangeList.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/RangeList.cs
@@ -62,10 +62,10 @@ namespace System.Linq.Parallel
public int this[int index] {
get {
- if (start + index <= count)
+ if (index <= count)
return start + index;
- else
- return -1;
+
+ return -1;
}
set {
throw new NotImplementedException();
diff --git a/mcs/class/System.Core/System.Threading/ReaderWriterLockSlim.cs b/mcs/class/System.Core/System.Threading/ReaderWriterLockSlim.cs
index 512f97b27cb..f4c6de46ddb 100644
--- a/mcs/class/System.Core/System.Threading/ReaderWriterLockSlim.cs
+++ b/mcs/class/System.Core/System.Threading/ReaderWriterLockSlim.cs
@@ -56,7 +56,7 @@ namespace System.Threading {
* that are being made. The 3 lowest bits are used as flag to track "destructive" lock entries
* (i.e attempting to take the write lock with or without having acquired an upgradeable lock beforehand).
* All the remaining bits are intepreted as the actual number of reader currently using the lock
- * (which mean the lock is limited to 4294967288 concurrent readers but since it's a high number there
+ * (which mean the lock is limited to 2^29 concurrent readers but since it's a high number there
* is no overflow safe guard to remain simple).
*/
int rwlock;
@@ -98,7 +98,7 @@ namespace System.Threading {
* instance are kept here.
*/
[ThreadStatic]
- static IDictionary<int, ThreadLockState> currentThreadState;
+ static Dictionary<int, ThreadLockState> currentThreadState;
/* Rwls tries to use this array as much as possible to quickly retrieve the thread-local
* informations so that it ends up being only an array lookup. When the number of thread
@@ -446,6 +446,12 @@ namespace System.Threading {
public void Dispose ()
{
+ if (disposed)
+ return;
+
+ if (IsReadLockHeld || IsUpgradeableReadLockHeld || IsWriteLockHeld)
+ throw new SynchronizationLockException ("The lock is being disposed while still being used");
+
disposed = true;
}
@@ -519,18 +525,22 @@ namespace System.Threading {
get {
int tid = Thread.CurrentThread.ManagedThreadId;
- if (tid < fastStateCache.Length)
- return fastStateCache[tid] == null ? (fastStateCache[tid] = new ThreadLockState ()) : fastStateCache[tid];
+ return tid < fastStateCache.Length ?
+ fastStateCache [tid] ?? (fastStateCache[tid] = new ThreadLockState ()) :
+ GetGlobalThreadState (tid);
+ }
+ }
- if (currentThreadState == null)
- currentThreadState = new Dictionary<int, ThreadLockState> ();
+ ThreadLockState GetGlobalThreadState (int tid)
+ {
+ if (currentThreadState == null)
+ Interlocked.CompareExchange (ref currentThreadState, new Dictionary<int, ThreadLockState> (), null);
- ThreadLockState state;
- if (!currentThreadState.TryGetValue (id, out state))
- currentThreadState[id] = state = new ThreadLockState ();
+ ThreadLockState state;
+ if (!currentThreadState.TryGetValue (id, out state))
+ currentThreadState [id] = state = new ThreadLockState ();
- return state;
- }
+ return state;
}
bool CheckState (ThreadLockState state, int millisecondsTimeout, LockState validState)
@@ -554,16 +564,11 @@ namespace System.Threading {
if (ctstate.Has (validState))
return true;
- CheckRecursionAuthorization (ctstate, validState);
-
- return false;
- }
-
- static void CheckRecursionAuthorization (LockState ctstate, LockState desiredState)
- {
// In read mode you can just enter Read recursively
if (ctstate == LockState.Read)
throw new LockRecursionException ();
+
+ return false;
}
static int CheckTimeout (TimeSpan timeout)
diff --git a/mcs/class/System.Core/System/TimeZoneInfo.AdjustmentRule.cs b/mcs/class/System.Core/System/TimeZoneInfo.AdjustmentRule.cs
index d3c16f4fdef..637d0c400df 100644
--- a/mcs/class/System.Core/System/TimeZoneInfo.AdjustmentRule.cs
+++ b/mcs/class/System.Core/System/TimeZoneInfo.AdjustmentRule.cs
@@ -74,6 +74,17 @@ namespace System
return new AdjustmentRule (dateStart, dateEnd, daylightDelta, daylightTransitionStart, daylightTransitionEnd);
}
+ private AdjustmentRule (SerializationInfo info, StreamingContext context)
+ {
+ if (info == null)
+ throw new ArgumentNullException ("info");
+ dateStart = (DateTime) info.GetValue ("DateStart", typeof (DateTime));
+ dateEnd = (DateTime) info.GetValue ("DateEnd", typeof (DateTime));
+ daylightDelta = (TimeSpan) info.GetValue ("DaylightDelta", typeof (TimeSpan));
+ daylightTransitionStart = (TimeZoneInfo.TransitionTime) info.GetValue ("DaylightTransitionStart", typeof (TimeZoneInfo.TransitionTime));
+ daylightTransitionEnd = (TimeZoneInfo.TransitionTime) info.GetValue ("DaylightTransitionEnd", typeof (TimeZoneInfo.TransitionTime));
+ }
+
private AdjustmentRule (
DateTime dateStart,
DateTime dateEnd,
@@ -130,7 +141,13 @@ namespace System
public void GetObjectData (SerializationInfo info, StreamingContext context)
#endif
{
- throw new NotImplementedException ();
+ if (info == null)
+ throw new ArgumentNullException ("info");
+ info.AddValue ("DateStart", DateStart);
+ info.AddValue ("DateEnd", DateEnd);
+ info.AddValue ("DaylightDelta", DaylightDelta);
+ info.AddValue ("DaylightTransitionStart", DaylightTransitionStart);
+ info.AddValue ("DaylightTransitionEnd", DaylightTransitionEnd);
}
#if NET_4_0
void IDeserializationCallback.OnDeserialization (object sender)
@@ -138,7 +155,38 @@ namespace System
public void OnDeserialization (object sender)
#endif
{
- throw new NotImplementedException ();
+ try {
+ TimeZoneInfo.AdjustmentRule.Validate (dateStart, dateEnd, daylightDelta,
+ daylightTransitionStart, daylightTransitionEnd);
+ } catch (ArgumentException ex) {
+ throw new SerializationException ("invalid serialization data", ex);
+ }
+ }
+
+ private static void Validate (
+ DateTime dateStart,
+ DateTime dateEnd,
+ TimeSpan daylightDelta,
+ TransitionTime daylightTransitionStart,
+ TransitionTime daylightTransitionEnd)
+ {
+ if (dateStart.Kind != DateTimeKind.Unspecified || dateEnd.Kind != DateTimeKind.Unspecified)
+ throw new ArgumentException ("the Kind property of dateStart or dateEnd parameter does not equal DateTimeKind.Unspecified");
+
+ if (daylightTransitionStart == daylightTransitionEnd)
+ throw new ArgumentException ("daylightTransitionStart parameter cannot equal daylightTransitionEnd parameter");
+
+ if (dateStart.Ticks % TimeSpan.TicksPerDay != 0 || dateEnd.Ticks % TimeSpan.TicksPerDay != 0)
+ throw new ArgumentException ("dateStart or dateEnd parameter includes a time of day value");
+
+ if (dateEnd < dateStart)
+ throw new ArgumentOutOfRangeException ("dateEnd is earlier than dateStart");
+
+ if (daylightDelta > new TimeSpan (14, 0, 0) || daylightDelta < new TimeSpan (-14, 0, 0))
+ throw new ArgumentOutOfRangeException ("daylightDelta is less than -14 or greater than 14 hours");
+
+ if (daylightDelta.Ticks % TimeSpan.TicksPerSecond != 0)
+ throw new ArgumentOutOfRangeException ("daylightDelta parameter does not represent a whole number of seconds");
}
}
}
diff --git a/mcs/class/System.Core/System/TimeZoneInfo.Android.cs b/mcs/class/System.Core/System/TimeZoneInfo.Android.cs
index 498df578696..a21edd6c93e 100644
--- a/mcs/class/System.Core/System/TimeZoneInfo.Android.cs
+++ b/mcs/class/System.Core/System/TimeZoneInfo.Android.cs
@@ -29,10 +29,231 @@ using System.Text;
namespace System {
+ interface IAndroidTimeZoneDB {
+ IEnumerable<string> GetAvailableIds ();
+ byte[] GetTimeZoneData (string id);
+ }
+
+ [StructLayout (LayoutKind.Sequential, Pack=1)]
+ unsafe struct AndroidTzDataHeader {
+ public fixed byte signature [12];
+ public int indexOffset;
+ public int dataOffset;
+ public int zoneTabOffset;
+ }
+
+ [StructLayout (LayoutKind.Sequential, Pack=1)]
+ unsafe struct AndroidTzDataEntry {
+ public fixed byte id [40];
+ public int byteOffset;
+ public int length;
+ public int rawUtcOffset;
+ }
+
+ /*
+ * Android v4.3 Timezone support infrastructure.
+ *
+ * This is a C# port of libcore.util.ZoneInfoDB:
+ *
+ * https://android.googlesource.com/platform/libcore/+/master/luni/src/main/java/libcore/util/ZoneInfoDB.java
+ *
+ * This is needed in order to read Android v4.3 tzdata files.
+ */
+ sealed class AndroidTzData : IAndroidTimeZoneDB {
+
+ internal static readonly string[] Paths = new string[]{
+ Environment.GetEnvironmentVariable ("ANDROID_DATA") + "/misc/zoneinfo/tzdata",
+ Environment.GetEnvironmentVariable ("ANDROID_ROOT") + "/usr/share/zoneinfo/tzdata",
+ };
+
+ string tzdataPath;
+ Stream data;
+ string version;
+ string zoneTab;
+
+ string[] ids;
+ int[] byteOffsets;
+ int[] lengths;
+
+ public AndroidTzData (params string[] paths)
+ {
+ foreach (var path in paths)
+ if (LoadData (path)) {
+ tzdataPath = path;
+ return;
+ }
+
+ Console.Error.WriteLine ("Couldn't find any tzdata!");
+ tzdataPath = "/";
+ version = "missing";
+ zoneTab = "# Emergency fallback data.\n";
+ ids = new[]{ "GMT" };
+ }
+
+ public string Version {
+ get {return version;}
+ }
+
+ public string ZoneTab {
+ get {return zoneTab;}
+ }
+
+ bool LoadData (string path)
+ {
+ if (!File.Exists (path))
+ return false;
+ try {
+ data = File.OpenRead (path);
+ } catch (IOException) {
+ return false;
+ } catch (UnauthorizedAccessException) {
+ return false;
+ }
+
+ try {
+ ReadHeader ();
+ return true;
+ } catch (Exception e) {
+ Console.Error.WriteLine ("tzdata file \"{0}\" was present but invalid: {1}", path, e);
+ }
+ return false;
+ }
+
+ unsafe void ReadHeader ()
+ {
+ int size = System.Math.Max (Marshal.SizeOf (typeof (AndroidTzDataHeader)), Marshal.SizeOf (typeof (AndroidTzDataEntry)));
+ var buffer = new byte [size];
+ var header = ReadAt<AndroidTzDataHeader>(0, buffer);
+
+ header.indexOffset = NetworkToHostOrder (header.indexOffset);
+ header.dataOffset = NetworkToHostOrder (header.dataOffset);
+ header.zoneTabOffset = NetworkToHostOrder (header.zoneTabOffset);
+
+ sbyte* s = (sbyte*) header.signature;
+ string magic = new string (s, 0, 6, Encoding.ASCII);
+ if (magic != "tzdata" || header.signature [11] != 0) {
+ var b = new StringBuilder ();
+ b.Append ("bad tzdata magic:");
+ for (int i = 0; i < 12; ++i) {
+ b.Append (" ").Append (((byte) s [i]).ToString ("x2"));
+ }
+ throw new InvalidOperationException ("bad tzdata magic: " + b.ToString ());
+ }
+
+ version = new string (s, 6, 5, Encoding.ASCII);
+
+ ReadIndex (header.indexOffset, header.dataOffset, buffer);
+ ReadZoneTab (header.zoneTabOffset, checked ((int) data.Length) - header.zoneTabOffset);
+ }
+
+ unsafe T ReadAt<T> (long position, byte[] buffer)
+ where T : struct
+ {
+ int size = Marshal.SizeOf (typeof (T));
+ if (buffer.Length < size)
+ throw new InvalidOperationException ("Internal error: buffer too small");
+
+ data.Position = position;
+ int r;
+ if ((r = data.Read (buffer, 0, size)) < size)
+ throw new InvalidOperationException (
+ string.Format ("Error reading '{0}': read {1} bytes, expected {2}", tzdataPath, r, size));
+
+ fixed (byte* b = buffer)
+ return (T) Marshal.PtrToStructure ((IntPtr) b, typeof (T));
+ }
+
+ static int NetworkToHostOrder (int value)
+ {
+ if (!BitConverter.IsLittleEndian)
+ return value;
+
+ return
+ (((value >> 24) & 0xFF) |
+ ((value >> 08) & 0xFF00) |
+ ((value << 08) & 0xFF0000) |
+ ((value << 24)));
+ }
+
+ unsafe void ReadIndex (int indexOffset, int dataOffset, byte[] buffer)
+ {
+ int indexSize = dataOffset - indexOffset;
+ int entryCount = indexSize / Marshal.SizeOf (typeof (AndroidTzDataEntry));
+ int entrySize = Marshal.SizeOf (typeof (AndroidTzDataEntry));
+
+ byteOffsets = new int [entryCount];
+ ids = new string [entryCount];
+ lengths = new int [entryCount];
+
+ for (int i = 0; i < entryCount; ++i) {
+ var entry = ReadAt<AndroidTzDataEntry>(indexOffset + (entrySize*i), buffer);
+ var p = (sbyte*) entry.id;
+
+ byteOffsets [i] = NetworkToHostOrder (entry.byteOffset) + dataOffset;
+ ids [i] = new string (p, 0, GetStringLength (p, 40), Encoding.ASCII);
+ lengths [i] = NetworkToHostOrder (entry.length);
+
+ if (lengths [i] < Marshal.SizeOf (typeof (AndroidTzDataHeader)))
+ throw new InvalidOperationException ("Length in index file < sizeof(tzhead)");
+ }
+ }
+
+ static unsafe int GetStringLength (sbyte* s, int maxLength)
+ {
+ int len;
+ for (len = 0; len < maxLength; len++, s++) {
+ if (*s == 0)
+ break;
+ }
+ return len;
+ }
+
+ unsafe void ReadZoneTab (int zoneTabOffset, int zoneTabSize)
+ {
+ byte[] zoneTab = new byte [zoneTabSize];
+
+ data.Position = zoneTabOffset;
+
+ int r;
+ if ((r = data.Read (zoneTab, 0, zoneTab.Length)) < zoneTab.Length)
+ throw new InvalidOperationException (
+ string.Format ("Error reading zonetab: read {0} bytes, expected {1}", r, zoneTabSize));
+
+ this.zoneTab = Encoding.ASCII.GetString (zoneTab, 0, zoneTab.Length);
+ }
+
+ public IEnumerable<string> GetAvailableIds ()
+ {
+ return ids;
+ }
+
+ public byte[] GetTimeZoneData (string id)
+ {
+ int i = Array.BinarySearch (ids, id, StringComparer.Ordinal);
+ if (i < 0)
+ return null;
+
+ int offset = byteOffsets [i];
+ int length = lengths [i];
+ var buffer = new byte [length];
+
+ lock (data) {
+ data.Position = offset;
+ int r;
+ if ((r = data.Read (buffer, 0, buffer.Length)) < buffer.Length)
+ throw new InvalidOperationException (
+ string.Format ("Unable to fully read from file '{0}' at offset {1} length {2}; read {3} bytes expected {4}.",
+ tzdataPath, offset, length, r, buffer.Length));
+ }
+
+ return buffer;
+ }
+ }
+
partial class TimeZoneInfo {
/*
- * Android Timezone support infrastructure.
+ * Android < v4.3 Timezone support infrastructure.
*
* This is a C# port of org.apache.harmony.luni.internal.util.ZoneInfoDB:
*
@@ -48,34 +269,35 @@ namespace System {
* which succinctly describes why we can't just use the LIBC implementation in
* TimeZoneInfo.cs -- the "standard Unixy" directory structure is NOT used.
*/
- static class ZoneInfoDB {
+ sealed class ZoneInfoDB : IAndroidTimeZoneDB {
const int TimeZoneNameLength = 40;
const int TimeZoneIntSize = 4;
- static readonly string ZoneDirectoryName = Environment.GetEnvironmentVariable ("ANDROID_ROOT") + "/usr/share/zoneinfo/";
- static readonly string ZoneFileName = ZoneDirectoryName + "zoneinfo.dat";
- static readonly string IndexFileName = ZoneDirectoryName + "zoneinfo.idx";
- const string DefaultVersion = "2007h";
- static readonly string VersionFileName = ZoneDirectoryName + "zoneinfo.version";
+ internal static readonly string ZoneDirectoryName = Environment.GetEnvironmentVariable ("ANDROID_ROOT") + "/usr/share/zoneinfo/";
- static readonly object _lock = new object ();
+ const string ZoneFileName = "zoneinfo.dat";
+ const string IndexFileName = "zoneinfo.idx";
+ const string DefaultVersion = "2007h";
+ const string VersionFileName = "zoneinfo.version";
- static readonly string version;
- static readonly string[] names;
- static readonly int[] starts;
- static readonly int[] lengths;
- static readonly int[] offsets;
+ readonly string zoneRoot;
+ readonly string version;
+ readonly string[] names;
+ readonly int[] starts;
+ readonly int[] lengths;
+ readonly int[] offsets;
- static ZoneInfoDB ()
+ public ZoneInfoDB (string zoneInfoDB = null)
{
+ zoneRoot = zoneInfoDB ?? ZoneDirectoryName;
try {
- version = ReadVersion ();
+ version = ReadVersion (Path.Combine (zoneRoot, VersionFileName));
} catch {
version = DefaultVersion;
}
try {
- ReadDatabase (out names, out starts, out lengths, out offsets);
+ ReadDatabase (Path.Combine (zoneRoot, IndexFileName), out names, out starts, out lengths, out offsets);
} catch {
names = new string [0];
starts = new int [0];
@@ -84,16 +306,16 @@ namespace System {
}
}
- static string ReadVersion ()
+ static string ReadVersion (string path)
{
- using (var file = new StreamReader (VersionFileName, Encoding.GetEncoding ("iso-8859-1"))) {
+ using (var file = new StreamReader (path, Encoding.GetEncoding ("iso-8859-1"))) {
return file.ReadToEnd ().Trim ();
}
}
- static void ReadDatabase (out string[] names, out int[] starts, out int[] lengths, out int[] offsets)
+ void ReadDatabase (string path, out string[] names, out int[] starts, out int[] lengths, out int[] offsets)
{
- using (var file = File.OpenRead (IndexFileName)) {
+ using (var file = File.OpenRead (path)) {
var nbuf = new byte [TimeZoneNameLength];
int numEntries = (int) (file.Length / (TimeZoneNameLength + 3*TimeZoneIntSize));
@@ -140,21 +362,21 @@ namespace System {
((nbuf [2] & 0xff) << 8) + (nbuf [3] & 0xff);
}
- internal static string Version {
+ internal string Version {
get {return version;}
}
- internal static IEnumerable<string> GetAvailableIds ()
+ public IEnumerable<string> GetAvailableIds ()
{
return GetAvailableIds (0, false);
}
- internal static IEnumerable<string> GetAvailableIds (int rawOffset)
+ IEnumerable<string> GetAvailableIds (int rawOffset)
{
return GetAvailableIds (rawOffset, true);
}
- static IEnumerable<string> GetAvailableIds (int rawOffset, bool checkOffset)
+ IEnumerable<string> GetAvailableIds (int rawOffset, bool checkOffset)
{
for (int i = 0; i < offsets.Length; ++i) {
if (!checkOffset || offsets [i] == rawOffset)
@@ -162,21 +384,21 @@ namespace System {
}
}
- static TimeZoneInfo _GetTimeZone (string name)
+ public byte[] GetTimeZoneData (string id)
{
int start, length;
- using (var stream = GetTimeZoneData (name, out start, out length)) {
+ using (var stream = GetTimeZoneData (id, out start, out length)) {
if (stream == null)
return null;
byte[] buf = new byte [length];
Fill (stream, buf, buf.Length);
- return TimeZoneInfo.ParseTZBuffer (name, buf, length);
+ return buf;
}
}
- static FileStream GetTimeZoneData (string name, out int start, out int length)
+ FileStream GetTimeZoneData (string name, out int start, out int length)
{
- var f = new FileInfo (Path.Combine (ZoneDirectoryName, name));
+ var f = new FileInfo (Path.Combine (zoneRoot, name));
if (f.Exists) {
start = 0;
length = (int) f.Length;
@@ -192,11 +414,48 @@ namespace System {
start = starts [i];
length = lengths [i];
- var stream = File.OpenRead (ZoneFileName);
+ var stream = File.OpenRead (Path.Combine (zoneRoot, ZoneFileName));
stream.Seek (start, SeekOrigin.Begin);
return stream;
}
+ }
+
+ static class AndroidTimeZones {
+
+ static IAndroidTimeZoneDB db;
+
+ static AndroidTimeZones ()
+ {
+ db = GetDefaultTimeZoneDB ();
+ }
+
+ static IAndroidTimeZoneDB GetDefaultTimeZoneDB ()
+ {
+ foreach (var p in AndroidTzData.Paths)
+ if (File.Exists (p))
+ return new AndroidTzData (AndroidTzData.Paths);
+ if (Directory.Exists (ZoneInfoDB.ZoneDirectoryName))
+ return new ZoneInfoDB ();
+ return null;
+ }
+
+ internal static IEnumerable<string> GetAvailableIds ()
+ {
+ return db == null
+ ? new string [0]
+ : db.GetAvailableIds ();
+ }
+
+ static TimeZoneInfo _GetTimeZone (string name)
+ {
+ if (db == null)
+ return null;
+ byte[] buffer = db.GetTimeZoneData (name);
+ if (buffer == null)
+ return null;
+ return TimeZoneInfo.ParseTZBuffer (name, buffer, buffer.Length);
+ }
internal static TimeZoneInfo GetTimeZone (string id)
{
@@ -211,7 +470,7 @@ namespace System {
try {
return _GetTimeZone (id);
- } catch (Exception e) {
+ } catch (Exception) {
return null;
}
}
@@ -265,6 +524,8 @@ namespace System {
return sign * (hour * 60) * 60;
}
+ static readonly object _lock = new object ();
+
static TimeZoneInfo defaultZone;
internal static TimeZoneInfo Default {
get {
@@ -295,7 +556,7 @@ namespace System {
#if SELF_TEST
/*
* Compile:
- * mcs /out:tzi.exe "/d:INSIDE_CORLIB;MONODROID;NET_4_0;LIBC;SELF_TEST" System/TimeZone*.cs ../../build/common/Consts.cs
+ * mcs /out:tzi.exe /unsafe "/d:INSIDE_CORLIB;MONODROID;NET_4_0;LIBC;SELF_TEST" System/TimeZone*.cs ../../build/common/Consts.cs ../Mono.Options/Mono.Options/Options.cs
* Prep:
* mkdir -p usr/share/zoneinfo
* android_root=`adb shell echo '$ANDROID_ROOT' | tr -d "\r"`
@@ -305,17 +566,31 @@ namespace System {
*/
static void Main (string[] args)
{
- Console.WriteLine ("Version: {0}", version);
- for (int i = 0; i < names.Length; ++i) {
- Console.Write ("{0,3}\tname={1,-40} start={2,-10} length={3,-4} offset=0x{4,8}",
- i, names [i], starts [i], lengths [i], offsets [i].ToString ("x8"));
+ Func<IAndroidTimeZoneDB> c = () => GetDefaultTimeZoneDB ();
+ Mono.Options.OptionSet p = null;
+ p = new Mono.Options.OptionSet () {
+ { "T=", "Create AndroidTzData from {PATH}.", v => {
+ c = () => new AndroidTzData (v);
+ } },
+ { "Z=", "Create ZoneInfoDB from {DIR}.", v => {
+ c = () => new ZoneInfoDB (v);
+ } },
+ { "help", "Show this message and exit", v => {
+ p.WriteOptionDescriptions (Console.Out);
+ Environment.Exit (0);
+ } },
+ };
+ p.Parse (args);
+ AndroidTimeZones.db = c ();
+ Console.WriteLine ("DB type: {0}", AndroidTimeZones.db.GetType ().FullName);
+ foreach (var id in GetAvailableIds ()) {
+ Console.Write ("name={0,-40}", id);
try {
- TimeZoneInfo zone = _GetTimeZone (names [i]);
+ TimeZoneInfo zone = _GetTimeZone (id);
if (zone != null)
Console.Write (" {0}", zone);
else {
- Console.Write (" ERROR:null Index? {0}",
- Array.BinarySearch (names, names [i], StringComparer.Ordinal));
+ Console.Write (" ERROR:null");
}
} catch (Exception e) {
Console.WriteLine ();
diff --git a/mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs b/mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs
index a914ed19b3d..d57df150f05 100644
--- a/mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs
+++ b/mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs
@@ -108,6 +108,26 @@ namespace System
return new TransitionTime (timeOfDay, month, week, dayOfWeek);
}
+ private TransitionTime (SerializationInfo info, StreamingContext context)
+ {
+ if (info == null)
+ throw new ArgumentNullException ("info");
+ timeOfDay = (DateTime) info.GetValue ("TimeOfDay", typeof (DateTime));
+ month = (byte) info.GetValue ("Month", typeof (byte));
+ week = (byte) info.GetValue ("Week", typeof (byte));
+ day = (byte) info.GetValue ("Day", typeof (byte));
+ dayOfWeek = (DayOfWeek) info.GetValue ("DayOfWeek", typeof (DayOfWeek));
+ isFixedDateRule = (bool) info.GetValue ("IsFixedDateRule", typeof (bool));
+
+ if (isFixedDateRule)
+ {
+ week = -1;
+ dayOfWeek = (DayOfWeek) (-1);
+ }
+ if (!isFixedDateRule)
+ day = -1;
+ }
+
private TransitionTime (
DateTime timeOfDay,
int month,
@@ -190,8 +210,24 @@ namespace System
public void GetObjectData (SerializationInfo info, StreamingContext context)
#endif
{
- throw new NotImplementedException ();
- }
+ if (info == null)
+ throw new ArgumentNullException ("info");
+ info.AddValue ("TimeOfDay", TimeOfDay);
+ info.AddValue ("Month", System.Convert.ToByte(Month));
+ if (week > -1)
+ info.AddValue ("Week", System.Convert.ToByte(week));
+ else
+ info.AddValue ("Week", (byte) 1);
+ if (day > -1)
+ info.AddValue ("Day", System.Convert.ToByte(day));
+ else
+ info.AddValue ("Day", (byte) 1);
+ if (dayOfWeek != ((System.DayOfWeek) (-1)))
+ info.AddValue ("DayOfWeek", dayOfWeek);
+ else
+ info.AddValue ("DayOfWeek", DayOfWeek.Sunday);
+ info.AddValue ("IsFixedDateRule", IsFixedDateRule);
+ }
public override bool Equals (object obj)
{
@@ -216,7 +252,47 @@ namespace System
public void OnDeserialization (object sender)
#endif
{
- throw new NotImplementedException ();
+ try {
+ TimeZoneInfo.TransitionTime.Validate (timeOfDay, month, week, day, dayOfWeek, isFixedDateRule);
+ } catch (ArgumentException ex) {
+ throw new SerializationException ("invalid serialization data", ex);
+ }
+ }
+
+ private static void Validate (DateTime timeOfDay, int month,int week, int day, DayOfWeek dayOfWeek, bool isFixedDateRule)
+ {
+ if (timeOfDay.Year != 1 || timeOfDay.Month != 1 || timeOfDay.Day != 1)
+ throw new ArgumentException ("timeOfDay parameter has a non-default date component");
+
+ if (timeOfDay.Kind != DateTimeKind.Unspecified)
+ throw new ArgumentException ("timeOfDay parameter Kind's property is not DateTimeKind.Unspecified");
+
+ if (timeOfDay.Ticks % TimeSpan.TicksPerMillisecond != 0)
+ throw new ArgumentException ("timeOfDay parameter does not represent a whole number of milliseconds");
+
+ if (day < 1 || day > 31) {
+ if (!(!isFixedDateRule && day == -1))
+ throw new ArgumentOutOfRangeException ("day parameter is less than 1 or greater than 31");
+ }
+
+ if (week < 1 || week > 5) {
+ if (!(isFixedDateRule && week == -1))
+ throw new ArgumentOutOfRangeException ("week parameter is less than 1 or greater than 5");
+ }
+
+ if (month < 1 || month > 12)
+ throw new ArgumentOutOfRangeException ("month parameter is less than 1 or greater than 12");
+
+ if (dayOfWeek != DayOfWeek.Sunday &&
+ dayOfWeek != DayOfWeek.Monday &&
+ dayOfWeek != DayOfWeek.Tuesday &&
+ dayOfWeek != DayOfWeek.Wednesday &&
+ dayOfWeek != DayOfWeek.Thursday &&
+ dayOfWeek != DayOfWeek.Friday &&
+ dayOfWeek != DayOfWeek.Saturday) {
+ if (!(isFixedDateRule && dayOfWeek == (DayOfWeek) (-1)))
+ throw new ArgumentOutOfRangeException ("dayOfWeek parameter is not a member od DayOfWeek enumeration");
+ }
}
}
}
diff --git a/mcs/class/System.Core/System/TimeZoneInfo.cs b/mcs/class/System.Core/System/TimeZoneInfo.cs
index ee440a4bd51..5663e4b9bb3 100644
--- a/mcs/class/System.Core/System/TimeZoneInfo.cs
+++ b/mcs/class/System.Core/System/TimeZoneInfo.cs
@@ -1,3 +1,4 @@
+
/*
* System.TimeZoneInfo
*
@@ -86,7 +87,7 @@ namespace System
get {
if (local == null) {
#if MONODROID
- local = ZoneInfoDB.Default;
+ local = AndroidTimeZones.Default;
#elif MONOTOUCH
using (Stream stream = GetMonoTouchData (null)) {
local = BuildFromStream ("Local", stream);
@@ -285,10 +286,17 @@ namespace System
if (this == TimeZoneInfo.Utc)
return DateTime.SpecifyKind (dateTime, DateTimeKind.Utc);
-
+
//FIXME: do not rely on DateTime implementation !
- if (this == TimeZoneInfo.Local)
+ if (this == TimeZoneInfo.Local)
+ {
+#if NET_4_0
+ return dateTime.ToLocalTime ();
+#else
return DateTime.SpecifyKind (dateTime.ToLocalTime (), DateTimeKind.Unspecified);
+#endif
+ }
+
AdjustmentRule rule = GetApplicableRule (dateTime);
@@ -394,7 +402,7 @@ namespace System
}
#endif
#if MONODROID
- var timeZoneInfo = ZoneInfoDB.GetTimeZone (id);
+ var timeZoneInfo = AndroidTimeZones.GetTimeZone (id);
if (timeZoneInfo == null)
throw new TimeZoneNotFoundException ();
return timeZoneInfo;
@@ -598,7 +606,15 @@ namespace System
public void GetObjectData (SerializationInfo info, StreamingContext context)
#endif
{
- throw new NotImplementedException ();
+ if (info == null)
+ throw new ArgumentNullException ("info");
+ info.AddValue ("Id", id);
+ info.AddValue ("DisplayName", displayName);
+ info.AddValue ("StandardName", standardDisplayName);
+ info.AddValue ("DaylightName", daylightDisplayName);
+ info.AddValue ("BaseUtcOffset", baseUtcOffset);
+ info.AddValue ("AdjustmentRules", adjustmentRules);
+ info.AddValue ("SupportsDaylightSavingTime", SupportsDaylightSavingTime);
}
//FIXME: change this to a generic Dictionary and allow caching for FindSystemTimeZoneById
@@ -619,8 +635,8 @@ namespace System
}
#endif
#if MONODROID
- foreach (string id in ZoneInfoDB.GetAvailableIds ()) {
- var tz = ZoneInfoDB.GetTimeZone (id);
+ foreach (string id in AndroidTimeZones.GetAvailableIds ()) {
+ var tz = AndroidTimeZones.GetTimeZone (id);
if (tz != null)
systemTimeZones.Add (tz);
}
@@ -786,7 +802,54 @@ namespace System
public void OnDeserialization (object sender)
#endif
{
- throw new NotImplementedException ();
+ try {
+ TimeZoneInfo.Validate (id, baseUtcOffset, adjustmentRules);
+ } catch (ArgumentException ex) {
+ throw new SerializationException ("invalid serialization data", ex);
+ }
+ }
+
+ private static void Validate (string id, TimeSpan baseUtcOffset, AdjustmentRule [] adjustmentRules)
+ {
+ if (id == null)
+ throw new ArgumentNullException ("id");
+
+ if (id == String.Empty)
+ throw new ArgumentException ("id parameter is an empty string");
+
+ if (baseUtcOffset.Ticks % TimeSpan.TicksPerMinute != 0)
+ throw new ArgumentException ("baseUtcOffset parameter does not represent a whole number of minutes");
+
+ if (baseUtcOffset > new TimeSpan (14, 0, 0) || baseUtcOffset < new TimeSpan (-14, 0, 0))
+ throw new ArgumentOutOfRangeException ("baseUtcOffset parameter is greater than 14 hours or less than -14 hours");
+
+#if STRICT
+ if (id.Length > 32)
+ throw new ArgumentException ("id parameter shouldn't be longer than 32 characters");
+#endif
+
+ if (adjustmentRules != null && adjustmentRules.Length != 0) {
+ AdjustmentRule prev = null;
+ foreach (AdjustmentRule current in adjustmentRules) {
+ if (current == null)
+ throw new InvalidTimeZoneException ("one or more elements in adjustmentRules are null");
+
+ if ((baseUtcOffset + current.DaylightDelta < new TimeSpan (-14, 0, 0)) ||
+ (baseUtcOffset + current.DaylightDelta > new TimeSpan (14, 0, 0)))
+ throw new InvalidTimeZoneException ("Sum of baseUtcOffset and DaylightDelta of one or more object in adjustmentRules array is greater than 14 or less than -14 hours;");
+
+ if (prev != null && prev.DateStart > current.DateStart)
+ throw new InvalidTimeZoneException ("adjustment rules specified in adjustmentRules parameter are not in chronological order");
+
+ if (prev != null && prev.DateEnd > current.DateStart)
+ throw new InvalidTimeZoneException ("some adjustment rules in the adjustmentRules parameter overlap");
+
+ if (prev != null && prev.DateEnd == current.DateStart)
+ throw new InvalidTimeZoneException ("a date can have multiple adjustment rules applied to it");
+
+ prev = current;
+ }
+ }
}
public string ToSerializedString ()
@@ -799,6 +862,19 @@ namespace System
return DisplayName;
}
+ private TimeZoneInfo (SerializationInfo info, StreamingContext context)
+ {
+ if (info == null)
+ throw new ArgumentNullException ("info");
+ id = (string) info.GetValue ("Id", typeof (string));
+ displayName = (string) info.GetValue ("DisplayName", typeof (string));
+ standardDisplayName = (string) info.GetValue ("StandardName", typeof (string));
+ daylightDisplayName = (string) info.GetValue ("DaylightName", typeof (string));
+ baseUtcOffset = (TimeSpan) info.GetValue ("BaseUtcOffset", typeof (TimeSpan));
+ adjustmentRules = (TimeZoneInfo.AdjustmentRule []) info.GetValue ("AdjustmentRules", typeof (TimeZoneInfo.AdjustmentRule []));
+ supportsDaylightSavingTime = (bool) info.GetValue ("SupportsDaylightSavingTime", typeof (bool));
+ }
+
private TimeZoneInfo (string id, TimeSpan baseUtcOffset, string displayName, string standardDisplayName, string daylightDisplayName, TimeZoneInfo.AdjustmentRule [] adjustmentRules, bool disableDaylightSavingTime)
{
if (id == null)
diff --git a/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Coalesce.cs b/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Coalesce.cs
index 2ab978d5187..0fe89ea6710 100644
--- a/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Coalesce.cs
+++ b/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Coalesce.cs
@@ -163,6 +163,8 @@ namespace MonoTests.System.Linq.Expressions
}
[Test]
+ // #12987
+ [Category ("MobileNotWorking")]
public void CoalesceNullableSlotIntoInteger ()
{
var s = Expression.Parameter (typeof (Slot?), "s");
diff --git a/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Equal.cs b/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Equal.cs
index 06612bdfa18..749d78e40f8 100644
--- a/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Equal.cs
+++ b/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Equal.cs
@@ -458,5 +458,23 @@ namespace MonoTests.System.Linq.Expressions
Assert.AreEqual (false, eq (Foo.Bar, null));
Assert.AreEqual (true, eq (null, null));
}
+
+ [Test]
+ public void NullableNullEqual ()
+ {
+ var param = Expression.Parameter (typeof (DateTime?), "x");
+
+ var node = Expression.Equal (param, Expression.Constant (null));
+
+ Assert.IsTrue (node.IsLifted);
+ Assert.IsFalse (node.IsLiftedToNull);
+ Assert.AreEqual (typeof (bool), node.Type);
+ Assert.IsNull (node.Method);
+
+ var eq = Expression.Lambda<Func<DateTime?, bool>> (node, new [] { param }).Compile ();
+
+ Assert.AreEqual (true, eq (null));
+ Assert.AreEqual (false, eq (DateTime.Now));
+ }
}
}
diff --git a/mcs/class/System.Core/Test/System.Linq/ParallelEnumerableTests.cs b/mcs/class/System.Core/Test/System.Linq/ParallelEnumerableTests.cs
index 2df6c2d4031..f48deafc490 100644
--- a/mcs/class/System.Core/Test/System.Linq/ParallelEnumerableTests.cs
+++ b/mcs/class/System.Core/Test/System.Linq/ParallelEnumerableTests.cs
@@ -682,7 +682,7 @@ namespace MonoTests.System.Linq
}
[Test]
- public void RangeTestCase ()
+ public void Range ()
{
ParallelTestHelper.Repeat (() => {
IEnumerable<int> sync = Enumerable.Range(1, 1000);
@@ -691,7 +691,18 @@ namespace MonoTests.System.Linq
AreEquivalent (sync, async_res);
});
}
-
+
+ [Test]
+ public void Range_StartOffset ()
+ {
+ ParallelTestHelper.Repeat (() => {
+ IEnumerable<int> sync = Enumerable.Range (30, 10);
+ IEnumerable<int> async_res = ParallelEnumerable.Range (30, 10);
+
+ AreEquivalent (sync, async_res);
+ });
+ }
+
[Test]
public void RepeatTestCase ()
{
diff --git a/mcs/class/System.Core/Test/System.Threading/ReaderWriterLockSlimTest.cs b/mcs/class/System.Core/Test/System.Threading/ReaderWriterLockSlimTest.cs
index 8b04c46b40e..aef9fffbb55 100644
--- a/mcs/class/System.Core/Test/System.Threading/ReaderWriterLockSlimTest.cs
+++ b/mcs/class/System.Core/Test/System.Threading/ReaderWriterLockSlimTest.cs
@@ -82,6 +82,42 @@ namespace MonoTests.System.Threading
}
[Test]
+ public void Dispose_WithReadLock ()
+ {
+ var rwl = new ReaderWriterLockSlim ();
+ rwl.EnterReadLock ();
+ try {
+ rwl.Dispose ();
+ Assert.Fail ("1");
+ } catch (SynchronizationLockException) {
+ }
+ }
+
+ [Test]
+ public void Dispose_WithWriteLock ()
+ {
+ var rwl = new ReaderWriterLockSlim ();
+ rwl.EnterWriteLock ();
+ try {
+ rwl.Dispose ();
+ Assert.Fail ("1");
+ } catch (SynchronizationLockException) {
+ }
+ }
+
+ [Test]
+ public void Dispose_UpgradeableReadLock ()
+ {
+ var rwl = new ReaderWriterLockSlim ();
+ rwl.EnterUpgradeableReadLock ();
+ try {
+ rwl.Dispose ();
+ Assert.Fail ("1");
+ } catch (SynchronizationLockException) {
+ }
+ }
+
+ [Test]
public void TryEnterReadLock_OutOfRange ()
{
var v = new ReaderWriterLockSlim ();
diff --git a/mcs/class/System.Core/Test/System/TimeZoneInfo.AdjustmentRuleTest.cs b/mcs/class/System.Core/Test/System/TimeZoneInfo.AdjustmentRuleTest.cs
index 6fd2412f967..e9b0d6f1a8e 100644
--- a/mcs/class/System.Core/Test/System/TimeZoneInfo.AdjustmentRuleTest.cs
+++ b/mcs/class/System.Core/Test/System/TimeZoneInfo.AdjustmentRuleTest.cs
@@ -1,4 +1,6 @@
using System;
+using System.IO;
+using System.Runtime.Serialization.Formatters.Binary;
using NUnit.Framework;
#if NET_2_0
@@ -89,7 +91,28 @@ namespace MonoTests.System
TimeZoneInfo.TransitionTime daylightTransitionEnd = TimeZoneInfo.TransitionTime.CreateFixedDateRule (new DateTime (1,1,1,2,0,0), 10, 11);
TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (dateStart, dateEnd, new TimeSpan (55), daylightTransitionStart, daylightTransitionEnd);
}
- }
+ }
+
+ [TestFixture]
+ public class NonExceptional
+ {
+ [Test]
+ public void Serialization_Deserialization ()
+ {
+ TimeZoneInfo.TransitionTime start = TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1,1,1,1,0,0), 3, 5, DayOfWeek.Sunday);
+ TimeZoneInfo.TransitionTime end = TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1,1,1,2,0,0), 10, 5, DayOfWeek.Sunday);
+ TimeZoneInfo.AdjustmentRule rule = TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (DateTime.MinValue.Date, DateTime.MaxValue.Date, new TimeSpan (1,0,0), start, end);
+ MemoryStream stream = new MemoryStream ();
+ BinaryFormatter formatter = new BinaryFormatter ();
+ formatter.Serialize (stream, rule);
+ stream.Position = 0;
+ TimeZoneInfo.AdjustmentRule deserialized = (TimeZoneInfo.AdjustmentRule) formatter.Deserialize (stream);
+ stream.Close ();
+ stream.Dispose ();
+
+ Assert.IsTrue (rule.Equals (deserialized));
+ }
+ }
}
}
#endif
diff --git a/mcs/class/System.Core/Test/System/TimeZoneInfo.TransitionTimeTest.cs b/mcs/class/System.Core/Test/System/TimeZoneInfo.TransitionTimeTest.cs
index 8dd8263fd22..38fdac70145 100644
--- a/mcs/class/System.Core/Test/System/TimeZoneInfo.TransitionTimeTest.cs
+++ b/mcs/class/System.Core/Test/System/TimeZoneInfo.TransitionTimeTest.cs
@@ -1,5 +1,7 @@
using System;
+using System.IO;
+using System.Runtime.Serialization.Formatters.Binary;
using NUnit.Framework;
#if NET_2_0
@@ -106,6 +108,34 @@ namespace MonoTests.System
Assert.IsFalse (tt2.Equals (tt1), "1!=2");
Assert.IsFalse (tt1.Equals (tt2), "2!=1");
}
+
+ [Test]
+ public void Serialize_Deserialize_FloatingDateRule ()
+ {
+ TimeZoneInfo.TransitionTime floatingDateRule = TimeZoneInfo.TransitionTime.CreateFloatingDateRule(new DateTime(1, 1, 1, 1, 0, 0), 3, 5, DayOfWeek.Sunday);
+ MemoryStream stream = new MemoryStream ();
+ BinaryFormatter formatter = new BinaryFormatter ();
+ formatter.Serialize (stream, floatingDateRule);
+ stream.Position = 0;
+ TimeZoneInfo.TransitionTime deserialized = (TimeZoneInfo.TransitionTime) formatter.Deserialize (stream);
+ stream.Close ();
+ stream.Dispose ();
+ Assert.AreEqual (floatingDateRule, deserialized);
+ }
+
+ [Test]
+ public void Serialize_Deserialize_FixedDateRule ()
+ {
+ TimeZoneInfo.TransitionTime fixedDateRule = TimeZoneInfo.TransitionTime.CreateFixedDateRule(new DateTime(1, 1, 1, 1, 0, 0), 3, 12);
+ MemoryStream stream = new MemoryStream ();
+ BinaryFormatter formatter = new BinaryFormatter ();
+ formatter.Serialize (stream, fixedDateRule);
+ stream.Position = 0;
+ TimeZoneInfo.TransitionTime deserialized = (TimeZoneInfo.TransitionTime) formatter.Deserialize (stream);
+ stream.Close ();
+ stream.Dispose ();
+ Assert.AreEqual (fixedDateRule, deserialized);
+ }
}
}
}
diff --git a/mcs/class/System.Core/Test/System/TimeZoneInfoTest.cs b/mcs/class/System.Core/Test/System/TimeZoneInfoTest.cs
index 06de33e9ab7..89b4ec11d2a 100644
--- a/mcs/class/System.Core/Test/System/TimeZoneInfoTest.cs
+++ b/mcs/class/System.Core/Test/System/TimeZoneInfoTest.cs
@@ -27,6 +27,8 @@
*/
using System;
+using System.IO;
+using System.Runtime.Serialization.Formatters.Binary;
using System.Collections;
using NUnit.Framework;
@@ -385,6 +387,23 @@ namespace MonoTests.System
}
+
+ [Test]
+ public void ConvertFromToLocal ()
+ {
+ DateTime utc = DateTime.UtcNow;
+ Assert.AreEqual(utc.Kind, DateTimeKind.Utc);
+ DateTime converted = TimeZoneInfo.ConvertTimeFromUtc(utc, TimeZoneInfo.Local);
+ #if NET_4_0
+ Assert.AreEqual(DateTimeKind.Local, converted.Kind);
+ #else
+ Assert.AreEqual(DateTimeKind.Unspecified, converted.Kind);
+ #endif
+ DateTime back = TimeZoneInfo.ConvertTimeToUtc(converted, TimeZoneInfo.Local);
+ Assert.AreEqual(back.Kind, DateTimeKind.Utc);
+ Assert.AreEqual(utc, back);
+ }
+
[Test]
public void ConvertToTimeZone ()
{
@@ -657,6 +676,27 @@ namespace MonoTests.System
Assert.IsTrue (utc.HasSameRules (custom));
}
}
+
+ [TestFixture]
+ public class SerializationTests
+ {
+ [Test]
+ public void Serialization_Deserialization ()
+ {
+ TimeZoneInfo.TransitionTime start = TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1,1,1,1,0,0), 3, 5, DayOfWeek.Sunday);
+ TimeZoneInfo.TransitionTime end = TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1,1,1,2,0,0), 10, 5, DayOfWeek.Sunday);
+ TimeZoneInfo.AdjustmentRule rule = TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (DateTime.MinValue.Date, DateTime.MaxValue.Date, new TimeSpan (1,0,0), start, end);
+ TimeZoneInfo london = TimeZoneInfo.CreateCustomTimeZone ("Europe/London", new TimeSpan (0), "Europe/London", "British Standard Time", "British Summer Time", new TimeZoneInfo.AdjustmentRule [] {rule});
+ MemoryStream stream = new MemoryStream ();
+ BinaryFormatter formatter = new BinaryFormatter ();
+ formatter.Serialize (stream, london);
+ stream.Position = 0;
+ TimeZoneInfo deserialized = (TimeZoneInfo) formatter.Deserialize (stream);
+ stream.Close ();
+ stream.Dispose ();
+ Assert.IsTrue (london.Equals (deserialized));
+ }
+ }
}
}
#endif
diff --git a/mcs/class/System.Core/mobile_static_System.Core.dll.sources b/mcs/class/System.Core/mobile_static_System.Core.dll.sources
new file mode 100644
index 00000000000..55e204afd6c
--- /dev/null
+++ b/mcs/class/System.Core/mobile_static_System.Core.dll.sources
@@ -0,0 +1,7 @@
+#include mobile_System.Core.dll.sources
+#include static_System.Core.dll.sources
+System.Linq.jvm/Conversion.cs
+System.Linq.jvm/ExpressionInterpreter.cs
+System.Linq.jvm/Runner.cs
+System.Linq.jvm/Math.cs
+System/TimeZoneInfo.MonoTouch.cs
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciCalls.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciCalls.cs
index 743a3c72ed8..3e1ce930785 100644
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciCalls.cs
+++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciCalls.cs
@@ -226,6 +226,11 @@ namespace System.Data.OracleClient.Oci
IntPtr usrmempp);
[DllImport ("oci")]
+ internal static extern int OCICacheFree (IntPtr envhp,
+ IntPtr errhp,
+ IntPtr stmthp);
+
+ [DllImport ("oci")]
internal static extern int OCIAttrGet (IntPtr trgthndlp,
[MarshalAs (UnmanagedType.U4)] OciHandleType trghndltyp,
out IntPtr attributep,
@@ -464,7 +469,7 @@ namespace System.Data.OracleClient.Oci
[MarshalAs (UnmanagedType.SysUInt)] int dstlen,
byte [] src,
[MarshalAs (UnmanagedType.SysUInt)] int srclen,
- [MarshalAs (UnmanagedType.SysUInt)] out int rsize);
+ out long rsize);
[DllImport ("oci")]
internal static extern int OCIUnicodeToCharSet (
@@ -473,7 +478,7 @@ namespace System.Data.OracleClient.Oci
[MarshalAs (UnmanagedType.SysUInt)] int dstlen,
[MarshalAs (UnmanagedType.LPWStr)] string src,
[MarshalAs (UnmanagedType.SysUInt)] int srclen,
- [MarshalAs (UnmanagedType.SysUInt)] out int rsize);
+ out long rsize);
}
#endregion
@@ -774,6 +779,16 @@ namespace System.Data.OracleClient.Oci
xtramem_sz, usrmempp);
}
+ internal static int OCICacheFree (IntPtr envhp,
+ IntPtr svchp,
+ IntPtr stmthp)
+ {
+ #if TRACE
+ Trace.WriteLineIf(traceOci, "OCICacheFree", "OCI");
+ #endif
+ return OciNativeCalls.OCICacheFree (envhp, svchp, stmthp);
+ }
+
internal static int OCIAttrGet (IntPtr trgthndlp,
OciHandleType trghndltyp,
out IntPtr attributep,
@@ -1185,24 +1200,37 @@ namespace System.Data.OracleClient.Oci
byte [] src,
out int rsize)
{
+ int rc;
+ long retSize;
+
#if TRACE
Trace.WriteLineIf(traceOci, "OCICharSetToUnicode", "OCI");
#endif
-
- return OciNativeCalls.OCICharSetToUnicode (svchp, dst, dst!=null ? dst.Capacity : 0, src, src.Length, out rsize);
+ rc = OciNativeCalls.OCICharSetToUnicode (svchp, dst,
+ (dst != null ? dst.Capacity : 0),
+ src, src.Length, out retSize);
+ rsize = (int) retSize;
+ return(rc);
}
internal static int OCIUnicodeToCharSet (
IntPtr svchp,
byte [] dst,
- [MarshalAs (UnmanagedType.LPWStr)] string src,
- [MarshalAs (UnmanagedType.SysUInt)] out int rsize)
+ string src,
+ out int rsize)
{
+ int rc;
+ long retSize;
+
#if TRACE
Trace.WriteLineIf(traceOci, "OCIUnicodeToCharSet", "OCI");
#endif
- return OciNativeCalls.OCIUnicodeToCharSet (svchp, dst, dst!=null ? dst.Length : 0, src, src.Length, out rsize);
+ rc = OciNativeCalls.OCIUnicodeToCharSet (svchp, dst,
+ (dst != null ? dst.Length : 0),
+ src, src.Length, out retSize);
+ rsize = (int) retSize;
+ return(rc);
}
[DllImport ("oci")]
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciStatementHandle.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciStatementHandle.cs
index 31afb5cb324..8bbd545fa4b 100644
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciStatementHandle.cs
+++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci/OciStatementHandle.cs
@@ -32,6 +32,7 @@ namespace System.Data.OracleClient.Oci {
bool moreResults;
OciServiceHandle serviceHandle;
ArrayList values;
+ ArrayList parm;
OracleCommand command;
#endregion // Fields
@@ -82,12 +83,11 @@ namespace System.Data.OracleClient.Oci {
if (disposing) {
if (values != null) {
- foreach (OciDefineHandle h in values)
+ foreach (OciDefineHandle h in values)
h.Dispose ();
values = null;
}
}
-
base.Dispose (disposing);
}
}
@@ -110,6 +110,9 @@ namespace System.Data.OracleClient.Oci {
OciParameterDescriptor output = new OciParameterDescriptor (this, handle);
output.ErrorHandle = ErrorHandle;
+ if (parm == null)
+ parm = new ArrayList();
+ parm.Add(handle);
return output;
}
@@ -228,6 +231,8 @@ namespace System.Data.OracleClient.Oci {
switch (status) {
case OciGlue.OCI_NO_DATA:
moreResults = false;
+ foreach (IntPtr h in parm)
+ OciCalls.OCIDescriptorFree(h, OciHandleType.Parameter);
break;
case OciGlue.OCI_DEFAULT:
moreResults = true;
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleCommand.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleCommand.cs
index db39d3d551f..eee81ab0c01 100644
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleCommand.cs
+++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleCommand.cs
@@ -27,6 +27,7 @@ using System.Data.Common;
using System.Data.OracleClient.Oci;
using System.Drawing.Design;
using System.Text;
+using System.Threading;
namespace System.Data.OracleClient
{
@@ -705,7 +706,7 @@ namespace System.Data.OracleClient
private void SafeDisposeHandle (OciStatementHandle h)
{
- if (h != null && h != preparedStatement)
+ if (h != null && h != preparedStatement)
h.Dispose();
}
@@ -757,6 +758,9 @@ namespace System.Data.OracleClient
protected override void Dispose (bool disposing)
{
+ if (preparedStatement != null)
+ OciCalls.OCIHandleFree(preparedStatement,
+ OciHandleType.Statement);
if (disposing)
if (Parameters.Count > 0)
foreach (OracleParameter parm in Parameters)
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleParameter.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleParameter.cs
index df17716097d..6f11d970f0d 100644
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleParameter.cs
+++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleParameter.cs
@@ -821,8 +821,11 @@ namespace System.Data.OracleClient
if (direction == ParameterDirection.Output ||
direction == ParameterDirection.InputOutput ||
direction == ParameterDirection.ReturnValue) {
-
- cursor = IntPtr.Zero;
+ if (cursor != IntPtr.Zero) {
+ OciCalls.OCIHandleFree (cursor,
+ OciHandleType.Statement);
+ cursor = IntPtr.Zero;
+ }
OciCalls.OCIHandleAlloc (connection.Environment,
out cursor,
OciHandleType.Statement,
diff --git a/mcs/class/System.Data.Services.Client/mobile_static_System.Data.Services.Client.dll.sources b/mcs/class/System.Data.Services.Client/mobile_static_System.Data.Services.Client.dll.sources
new file mode 100644
index 00000000000..37dc2990c8d
--- /dev/null
+++ b/mcs/class/System.Data.Services.Client/mobile_static_System.Data.Services.Client.dll.sources
@@ -0,0 +1 @@
+#include net_4_5_System.Data.Services.Client.dll.sources
diff --git a/mcs/class/System.Data.Services/Makefile b/mcs/class/System.Data.Services/Makefile
index fd39977f965..9027c49e7fa 100644
--- a/mcs/class/System.Data.Services/Makefile
+++ b/mcs/class/System.Data.Services/Makefile
@@ -12,6 +12,10 @@ LIB_MCS_FLAGS = \
-r:System.ServiceModel.Web.dll \
-r:System.Data.Services.Client.dll
+ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
+LIB_MCS_FLAGS += -r:System.ServiceModel.Activation.dll
+endif
+
TEST_MCS_FLAGS = -r:System.ServiceModel.dll -r:System.Core.dll
include ../../build/library.make
diff --git a/mcs/class/System.Data/Makefile b/mcs/class/System.Data/Makefile
index b015667e2a1..8255e6456d6 100644
--- a/mcs/class/System.Data/Makefile
+++ b/mcs/class/System.Data/Makefile
@@ -31,7 +31,7 @@ LIB_MCS_FLAGS += \
-r:J2SE.Helpers.dll \
$(OTHER_LIB_MCS_FLAGS)
else
-MOBILE := $(filter monotouch monodroid mobile, $(PROFILE))
+MOBILE := $(filter monotouch monodroid mobile mobile_static, $(PROFILE))
ifdef MOBILE
LIB_MCS_FLAGS += \
-r:Mono.Data.Tds.dll \
diff --git a/mcs/class/System.Data/System.Data.Common/DataContainer.cs b/mcs/class/System.Data/System.Data.Common/DataContainer.cs
index 29e7b11efc1..4beb429284e 100644
--- a/mcs/class/System.Data/System.Data.Common/DataContainer.cs
+++ b/mcs/class/System.Data/System.Data.Common/DataContainer.cs
@@ -23,7 +23,9 @@
using System;
using System.Collections;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
namespace System.Data.Common
{
diff --git a/mcs/class/System.Data/System.Data/DataRowCollection.cs b/mcs/class/System.Data/System.Data/DataRowCollection.cs
index abd8126d092..ece2e96518d 100644
--- a/mcs/class/System.Data/System.Data/DataRowCollection.cs
+++ b/mcs/class/System.Data/System.Data/DataRowCollection.cs
@@ -287,7 +287,7 @@ namespace System.Data
{
if (row == null)
throw new IndexOutOfRangeException ("The given datarow is not in the current DataRowCollection.");
- int index = List.IndexOf (row);
+ int index = this.IndexOf (row);
if (index < 0)
throw new IndexOutOfRangeException ("The given datarow is not in the current DataRowCollection.");
List.RemoveAt (index);
diff --git a/mcs/class/System.Data/mobile_static_System.Data.dll.sources b/mcs/class/System.Data/mobile_static_System.Data.dll.sources
new file mode 100644
index 00000000000..bbc860b8cd7
--- /dev/null
+++ b/mcs/class/System.Data/mobile_static_System.Data.dll.sources
@@ -0,0 +1 @@
+#include mobile_System.Data.dll.sources
diff --git a/mcs/class/System.DirectoryServices.Protocols/Assembly/AssemblyInfo.cs b/mcs/class/System.DirectoryServices.Protocols/Assembly/AssemblyInfo.cs
index dc61855ee01..aba9cdd34a8 100644
--- a/mcs/class/System.DirectoryServices.Protocols/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/Assembly/AssemblyInfo.cs
@@ -14,16 +14,6 @@ using System.Security;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about the System.DirectoryServices.Protocols assembly
-
-using System;
-using System.Reflection;
-using System.Resources;
-using System.Security;
-using System.Diagnostics;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
// General Information about the system assembly
[assembly: AssemblyTitle ("System.DirectoryServices.Protocols.dll")]
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/AsqResponseControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/AsqResponseControl.cs
index 9cb8379f4e0..08e6c490ba8 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/AsqResponseControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/AsqResponseControl.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/AuthType.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/AuthType.cs
index ffcabad86cf..6f6c378c889 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/AuthType.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/AuthType.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/BerConverter.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/BerConverter.cs
index c19bf08fc98..82d708aa901 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/BerConverter.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/BerConverter.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/CompareResponse.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/CompareResponse.cs
index 969259bea63..d2a2347a362 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/CompareResponse.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/CompareResponse.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/CrossDomainMoveControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/CrossDomainMoveControl.cs
index fc888773f81..8788d6d9d47 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/CrossDomainMoveControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/CrossDomainMoveControl.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DeleteResponse.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DeleteResponse.cs
index c6e51592fb2..5de2cd792ab 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DeleteResponse.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DeleteResponse.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DereferenceAlias.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DereferenceAlias.cs
index a77da3b32fa..fc9833f3a46 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DereferenceAlias.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DereferenceAlias.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DereferenceConnectionCallback.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DereferenceConnectionCallback.cs
index d7b45cf4e52..d46c12d85c2 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DereferenceConnectionCallback.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DereferenceConnectionCallback.cs
@@ -24,7 +24,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirSyncRequestControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirSyncRequestControl.cs
index e4801f003f4..7f0169d4b3e 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirSyncRequestControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirSyncRequestControl.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirSyncResponseControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirSyncResponseControl.cs
index 865fa94d4d4..124dc594112 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirSyncResponseControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirSyncResponseControl.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryAttributeModification.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryAttributeModification.cs
index 41a72812441..8f5e474e8d4 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryAttributeModification.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryAttributeModification.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryAttributeOperation.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryAttributeOperation.cs
index 773cb01fbd2..59e18de9952 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryAttributeOperation.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryAttributeOperation.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryControl.cs
index 28aa65777a4..d32d47e4620 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryControl.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryIdentifier.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryIdentifier.cs
index 544ec501ba9..8fd14bcbe7f 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryIdentifier.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryIdentifier.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryNotificationControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryNotificationControl.cs
index 766e81a2009..4bd0b1ffac4 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryNotificationControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryNotificationControl.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryOperation.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryOperation.cs
index 3cfee1ede89..bb5b9471bb7 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryOperation.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryOperation.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryResponse.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryResponse.cs
index afc11c69c80..6bfd1ce2d68 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryResponse.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectoryResponse.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectorySynchronizationOptions.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectorySynchronizationOptions.cs
index 9ac0a67be67..8c516cbff1f 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectorySynchronizationOptions.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DirectorySynchronizationOptions.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DomainScopeControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DomainScopeControl.cs
index f3a8a468bdf..2a1e7de2a54 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DomainScopeControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DomainScopeControl.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlDirectoryIdentifier.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlDirectoryIdentifier.cs
index f2f7753c966..2b677f0c750 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlDirectoryIdentifier.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlDirectoryIdentifier.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlDocumentProcessing.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlDocumentProcessing.cs
index 106fd0b8704..87b624d8d42 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlDocumentProcessing.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlDocumentProcessing.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlErrorProcessing.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlErrorProcessing.cs
index 0576f605998..4a3975e6409 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlErrorProcessing.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlErrorProcessing.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlErrorResponse.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlErrorResponse.cs
index f87089a607c..c5dd4ed90b8 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlErrorResponse.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlErrorResponse.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlResponseOrder.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlResponseOrder.cs
index 4e3f45b7a6a..58adb77d5ca 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlResponseOrder.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/DsmlResponseOrder.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ErrorResponseCategory.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ErrorResponseCategory.cs
index 0cf5a0410ef..6026b4cdda5 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ErrorResponseCategory.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ErrorResponseCategory.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ExtendedDNControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ExtendedDNControl.cs
index d38b11a5cc2..b2b7ee589a4 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ExtendedDNControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ExtendedDNControl.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ExtendedDNFlag.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ExtendedDNFlag.cs
index 52fd1ad2349..065063a9c12 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ExtendedDNFlag.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ExtendedDNFlag.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ExtendedResponse.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ExtendedResponse.cs
index 11e05d931cd..d56db53e7c3 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ExtendedResponse.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ExtendedResponse.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/LazyCommitControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/LazyCommitControl.cs
index af0281c46f3..6316e33a2e3 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/LazyCommitControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/LazyCommitControl.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/LdapDirectoryIdentifier.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/LdapDirectoryIdentifier.cs
index 38538c9ca4f..0f3ae9a62d6 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/LdapDirectoryIdentifier.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/LdapDirectoryIdentifier.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/LocatorFlags.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/LocatorFlags.cs
index d1f8d39adbd..ca16b555b7c 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/LocatorFlags.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/LocatorFlags.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ModifyDNResponse.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ModifyDNResponse.cs
index 1c818bab49f..c9fa8a061db 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ModifyDNResponse.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ModifyDNResponse.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ModifyResponse.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ModifyResponse.cs
index 07fd6c931d3..b4838259541 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ModifyResponse.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ModifyResponse.cs
@@ -29,7 +29,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PageResultRequestControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PageResultRequestControl.cs
index 9eb836d3a01..0dbd3d921e5 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PageResultRequestControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PageResultRequestControl.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PageResultResponseControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PageResultResponseControl.cs
index 232248a5fdf..6e56b0e17e5 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PageResultResponseControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PageResultResponseControl.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PartialResultProcessing.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PartialResultProcessing.cs
index 4e1d706452a..1ccf6137fd3 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PartialResultProcessing.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PartialResultProcessing.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PermissiveModifyControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PermissiveModifyControl.cs
index 2e6eda5616c..4e600a81a6c 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PermissiveModifyControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/PermissiveModifyControl.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ReferralCallback.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ReferralCallback.cs
index 86ab582f6de..7a0eee8e148 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ReferralCallback.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ReferralCallback.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ReferralChasingOptions.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ReferralChasingOptions.cs
index d2fd25ea3c3..f2eeda2a95e 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ReferralChasingOptions.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ReferralChasingOptions.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ResultCode.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ResultCode.cs
index b9b371d79ec..20e0d63a2a9 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ResultCode.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ResultCode.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchOption.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchOption.cs
index d3c31b9aeee..b7e41bb5162 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchOption.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchOption.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchResultEntry.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchResultEntry.cs
index 50fdc7b850b..48ca33fc35f 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchResultEntry.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchResultEntry.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchResultReference.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchResultReference.cs
index 87c419fbc3b..afba119e855 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchResultReference.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchResultReference.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchScope.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchScope.cs
index 6acf9a5bbec..1cd53c3ebf6 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchScope.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SearchScope.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SecurityDescriptorFlagControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SecurityDescriptorFlagControl.cs
index e6f12ee6463..13cd17dd19e 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SecurityDescriptorFlagControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SecurityDescriptorFlagControl.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SecurityMasks.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SecurityMasks.cs
index 34aa5b59871..101326c88de 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SecurityMasks.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SecurityMasks.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SecurityProtocol.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SecurityProtocol.cs
index 46a94d29eda..07670a64c30 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SecurityProtocol.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SecurityProtocol.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ShowDeletedControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ShowDeletedControl.cs
index 7ec3c707d98..5ebb08f7e78 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ShowDeletedControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/ShowDeletedControl.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SortKey.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SortKey.cs
index ce56a068a9d..a30ac1ce872 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SortKey.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SortKey.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SortRequestControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SortRequestControl.cs
index 66471e0eb86..f020637d1ce 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SortRequestControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SortRequestControl.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
@@ -37,8 +36,8 @@ namespace System.DirectoryServices.Protocols
public SortRequestControl (params SortKey [] sortKeys)
: base (null, null, false, false)
{
- throw new NotImplementedException ();
SortKeys = sortKeys;
+ throw new NotImplementedException ();
}
[MonoTODO]
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SortResponseControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SortResponseControl.cs
index 85b0db27c2b..15f7b9aa39d 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SortResponseControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/SortResponseControl.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/TreeDeleteControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/TreeDeleteControl.cs
index 94b73f2a9b8..6974be2e3b6 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/TreeDeleteControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/TreeDeleteControl.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/VerifyNameControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/VerifyNameControl.cs
index 2337ea6cb79..33b22cb4236 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/VerifyNameControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/VerifyNameControl.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
diff --git a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/VlvResponseControl.cs b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/VlvResponseControl.cs
index dfa5533dffb..69ac1dab5d0 100644
--- a/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/VlvResponseControl.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols/VlvResponseControl.cs
@@ -27,7 +27,6 @@
//
using System;
-using System.Linq;
namespace System.DirectoryServices.Protocols
{
@@ -36,12 +35,12 @@ namespace System.DirectoryServices.Protocols
internal VlvResponseControl (int contentCount, byte [] contextId, ResultCode result, int targetPosition)
: base (null, null, false, true)
{
- throw new NotImplementedException ("ctor-chain");
-
ContentCount = contentCount;
ContextId = contextId;
Result = result;
TargetPosition = targetPosition;
+
+ throw new NotImplementedException ("ctor-chain");
}
[MonoTODO]
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryOperationException.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryOperationException.cs
new file mode 100644
index 00000000000..915b1ce8437
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryOperationException.cs
@@ -0,0 +1,73 @@
+/******************************************************************************
+* The MIT License
+*
+* 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.Runtime.Serialization;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [Serializable]
+ public class ActiveDirectoryOperationException : Exception, ISerializable
+ {
+ public int ErrorCode {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectoryOperationException (string message, Exception inner, int errorCode) : base(message, inner)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ActiveDirectoryOperationException (string message, int errorCode) : base(message)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ActiveDirectoryOperationException (string message, Exception inner) : base(message, inner)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ActiveDirectoryOperationException (string message) : base(message)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ActiveDirectoryOperationException () : base("DSUnknownFailure")
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected ActiveDirectoryOperationException (SerializationInfo info, StreamingContext context) : base(info, context)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
+ public override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryPartition.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryPartition.cs
new file mode 100644
index 00000000000..4b75854adcf
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryPartition.cs
@@ -0,0 +1,56 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public abstract class ActiveDirectoryPartition : IDisposable
+ {
+ public string Name {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ protected ActiveDirectoryPartition ()
+ {
+ }
+
+ public void Dispose ()
+ {
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+
+ }
+
+ public override string ToString ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+ public abstract DirectoryEntry GetDirectoryEntry ();
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryReplicationMetadata.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryReplicationMetadata.cs
new file mode 100644
index 00000000000..9444827f4f2
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryReplicationMetadata.cs
@@ -0,0 +1,58 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ActiveDirectoryReplicationMetadata : DictionaryBase
+ {
+ public AttributeMetadata this [string name] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ReadOnlyStringCollection AttributeNames {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public AttributeMetadataCollection Values {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (string attributeName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (AttributeMetadata[] array, int index)
+ {
+ throw new NotImplementedException ();
+ }
+
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryRole.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryRole.cs
new file mode 100644
index 00000000000..7ab5c60c641
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryRole.cs
@@ -0,0 +1,34 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum ActiveDirectoryRole
+ {
+ SchemaRole,
+ NamingRole,
+ PdcRole,
+ RidRole,
+ InfrastructureRole
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryRoleCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryRoleCollection.cs
new file mode 100644
index 00000000000..37e35b34dda
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryRoleCollection.cs
@@ -0,0 +1,50 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ActiveDirectoryRoleCollection : ReadOnlyCollectionBase
+ {
+ public ActiveDirectoryRole this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (ActiveDirectoryRole role)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ActiveDirectoryRole role)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ActiveDirectoryRole[] roles, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchedule.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchedule.cs
new file mode 100644
index 00000000000..22a38e90d54
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchedule.cs
@@ -0,0 +1,69 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ActiveDirectorySchedule
+ {
+ public bool[,,] RawSchedule {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySchedule ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ActiveDirectorySchedule (ActiveDirectorySchedule schedule) : this()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetSchedule (DayOfWeek day, HourOfDay fromHour, MinuteOfHour fromMinute, HourOfDay toHour, MinuteOfHour toMinute)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetSchedule (DayOfWeek[] days, HourOfDay fromHour, MinuteOfHour fromMinute, HourOfDay toHour, MinuteOfHour toMinute)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetDailySchedule (HourOfDay fromHour, MinuteOfHour fromMinute, HourOfDay toHour, MinuteOfHour toMinute)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void ResetSchedule ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchema.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchema.cs
new file mode 100644
index 00000000000..a2fdc837c26
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchema.cs
@@ -0,0 +1,112 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+ public class ActiveDirectorySchema : ActiveDirectoryPartition
+ {
+ public DirectoryServer SchemaRoleOwner {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ protected override void Dispose (bool disposing)
+ {
+
+ }
+
+ public static ActiveDirectorySchema GetSchema (DirectoryContext context)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RefreshSchema ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ActiveDirectorySchemaClass FindClass (string ldapDisplayName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ActiveDirectorySchemaClass FindDefunctClass (string commonName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ReadOnlyActiveDirectorySchemaClassCollection FindAllClasses ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ReadOnlyActiveDirectorySchemaClassCollection FindAllClasses (SchemaClassType type)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ReadOnlyActiveDirectorySchemaClassCollection FindAllDefunctClasses ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ActiveDirectorySchemaProperty FindProperty (string ldapDisplayName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ActiveDirectorySchemaProperty FindDefunctProperty (string commonName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ReadOnlyActiveDirectorySchemaPropertyCollection FindAllProperties ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ReadOnlyActiveDirectorySchemaPropertyCollection FindAllProperties (PropertyTypes type)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ReadOnlyActiveDirectorySchemaPropertyCollection FindAllDefunctProperties ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public override DirectoryEntry GetDirectoryEntry ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static ActiveDirectorySchema GetCurrentSchema ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaClass.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaClass.cs
new file mode 100644
index 00000000000..6af613f71a5
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaClass.cs
@@ -0,0 +1,179 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+ public class ActiveDirectorySchemaClass : IDisposable
+ {
+ public string Name {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string CommonName {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string Oid {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string Description {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool IsDefunct {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySchemaClassCollection PossibleSuperiors {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ReadOnlyActiveDirectorySchemaClassCollection PossibleInferiors {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySchemaPropertyCollection MandatoryProperties {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySchemaPropertyCollection OptionalProperties {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySchemaClassCollection AuxiliaryClasses {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySchemaClass SubClassOf {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public SchemaClassType Type {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public Guid SchemaGuid {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySecurity DefaultObjectSecurityDescriptor {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySchemaClass (DirectoryContext context, string ldapDisplayName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Dispose ()
+ {
+
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+
+ }
+
+ public static ActiveDirectorySchemaClass FindByName (DirectoryContext context, string ldapDisplayName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ReadOnlyActiveDirectorySchemaPropertyCollection GetAllProperties ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Save ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override string ToString ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DirectoryEntry GetDirectoryEntry ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaClassCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaClassCollection.cs
new file mode 100644
index 00000000000..fb30942a3d2
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaClassCollection.cs
@@ -0,0 +1,108 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ActiveDirectorySchemaClassCollection : CollectionBase
+ {
+ public ActiveDirectorySchemaClass this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int Add (ActiveDirectorySchemaClass schemaClass)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddRange (ActiveDirectorySchemaClass[] schemaClasses)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddRange (ActiveDirectorySchemaClassCollection schemaClasses)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddRange (ReadOnlyActiveDirectorySchemaClassCollection schemaClasses)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Remove (ActiveDirectorySchemaClass schemaClass)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Insert (int index, ActiveDirectorySchemaClass schemaClass)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool Contains (ActiveDirectorySchemaClass schemaClass)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ActiveDirectorySchemaClass[] schemaClasses, int index)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ActiveDirectorySchemaClass schemaClass)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnClearComplete ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnInsertComplete (int index, object value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnRemoveComplete (int index, object value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnSetComplete (int index, object oldValue, object newValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnValidate (object value)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaProperty.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaProperty.cs
new file mode 100644
index 00000000000..8819ec51081
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaProperty.cs
@@ -0,0 +1,220 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+ public class ActiveDirectorySchemaProperty : IDisposable
+ {
+ public string Name {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string CommonName {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string Oid {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySyntax Syntax {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string Description {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool IsSingleValued {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool IsIndexed {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool IsIndexedOverContainer {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool IsInAnr {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool IsOnTombstonedObject {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool IsTupleIndexed {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool IsInGlobalCatalog {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int RangeLower {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int RangeUpper {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool IsDefunct {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySchemaProperty Link {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int? LinkId {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public Guid SchemaGuid {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySchemaProperty (DirectoryContext context, string ldapDisplayName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Dispose ()
+ {
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+
+ }
+
+ public static ActiveDirectorySchemaProperty FindByName (DirectoryContext context, string ldapDisplayName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Save ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override string ToString ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DirectoryEntry GetDirectoryEntry ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaPropertyCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaPropertyCollection.cs
new file mode 100644
index 00000000000..b8721b46896
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaPropertyCollection.cs
@@ -0,0 +1,108 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ActiveDirectorySchemaPropertyCollection : CollectionBase
+ {
+ public ActiveDirectorySchemaProperty this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int Add (ActiveDirectorySchemaProperty schemaProperty)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddRange (ActiveDirectorySchemaProperty[] properties)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddRange (ActiveDirectorySchemaPropertyCollection properties)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddRange (ReadOnlyActiveDirectorySchemaPropertyCollection properties)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Remove (ActiveDirectorySchemaProperty schemaProperty)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Insert (int index, ActiveDirectorySchemaProperty schemaProperty)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool Contains (ActiveDirectorySchemaProperty schemaProperty)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ActiveDirectorySchemaProperty[] properties, int index)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ActiveDirectorySchemaProperty schemaProperty)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnClearComplete ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnInsertComplete (int index, object value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnRemoveComplete (int index, object value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnSetComplete (int index, object oldValue, object newValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnValidate (object value)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySecurity.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySecurity.cs
new file mode 100644
index 00000000000..d9211442a09
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySecurity.cs
@@ -0,0 +1,147 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+using System.Security.AccessControl;
+using System.Security.Principal;
+
+namespace System.DirectoryServices
+{
+ public class ActiveDirectorySecurity : DirectoryObjectSecurity
+ {
+ public override Type AccessRightType {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override Type AccessRuleType {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override Type AuditRuleType {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySecurity ()
+ {
+ }
+
+ public void AddAccessRule (ActiveDirectoryAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAccessRule (ActiveDirectoryAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void ResetAccessRule (ActiveDirectoryAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAccess (IdentityReference identity, AccessControlType type)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAccessRule (ActiveDirectoryAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAccessRuleSpecific (ActiveDirectoryAccessRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override bool ModifyAccessRule (AccessControlModification modification, AccessRule rule, out bool modified)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override void PurgeAccessRules (IdentityReference identity)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddAuditRule (ActiveDirectoryAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetAuditRule (ActiveDirectoryAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAudit (IdentityReference identity)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool RemoveAuditRule (ActiveDirectoryAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RemoveAuditRuleSpecific (ActiveDirectoryAuditRule rule)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override bool ModifyAuditRule (AccessControlModification modification, AuditRule rule, out bool modified)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override void PurgeAuditRules (IdentityReference identity)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public sealed override AccessRule AccessRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public sealed override AccessRule AccessRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type, Guid objectGuid, Guid inheritedObjectGuid)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public sealed override AuditRule AuditRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public sealed override AuditRule AuditRuleFactory (IdentityReference identityReference, int accessMask, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags, Guid objectGuid, Guid inheritedObjectGuid)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryServerDownException.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryServerDownException.cs
new file mode 100644
index 00000000000..93fc26e0900
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryServerDownException.cs
@@ -0,0 +1,80 @@
+/******************************************************************************
+* The MIT License
+*
+* 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.Runtime.Serialization;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [Serializable]
+ public class ActiveDirectoryServerDownException : Exception, ISerializable
+ {
+ public int ErrorCode {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string Name {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override string Message {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectoryServerDownException (string message, Exception inner, int errorCode, string name) : base(message, inner)
+ {
+ }
+
+ public ActiveDirectoryServerDownException (string message, int errorCode, string name) : base(message)
+ {
+
+ }
+
+ public ActiveDirectoryServerDownException (string message, Exception inner) : base(message, inner)
+ {
+ }
+
+ public ActiveDirectoryServerDownException (string message) : base(message)
+ {
+ }
+
+ public ActiveDirectoryServerDownException ()
+ {
+ }
+
+ protected ActiveDirectoryServerDownException (SerializationInfo info, StreamingContext context) : base(info, context)
+ {
+ }
+
+ [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
+ public override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySite.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySite.cs
new file mode 100644
index 00000000000..1c03b05f128
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySite.cs
@@ -0,0 +1,166 @@
+/******************************************************************************
+* The MIT License
+*
+* 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.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+ public class ActiveDirectorySite : IDisposable
+ {
+ public string Name {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DomainCollection Domains {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySubnetCollection Subnets {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ReadOnlyDirectoryServerCollection Servers {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ReadOnlySiteCollection AdjacentSites {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ReadOnlySiteLinkCollection SiteLinks {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DirectoryServer InterSiteTopologyGenerator {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySiteOptions Options {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string Location {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ReadOnlyDirectoryServerCollection BridgeheadServers {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DirectoryServerCollection PreferredSmtpBridgeheadServers {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DirectoryServerCollection PreferredRpcBridgeheadServers {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySchedule IntraSiteReplicationSchedule {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public static ActiveDirectorySite FindByName (DirectoryContext context, string siteName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ActiveDirectorySite (DirectoryContext context, string siteName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static ActiveDirectorySite GetComputerSite ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Save ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Delete ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override string ToString ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DirectoryEntry GetDirectoryEntry ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Dispose ()
+ {
+
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteCollection.cs
new file mode 100644
index 00000000000..4df5579934a
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteCollection.cs
@@ -0,0 +1,103 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ActiveDirectorySiteCollection : CollectionBase
+ {
+ public ActiveDirectorySite this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int Add (ActiveDirectorySite site)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddRange (ActiveDirectorySite[] sites)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddRange (ActiveDirectorySiteCollection sites)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool Contains (ActiveDirectorySite site)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ActiveDirectorySite[] array, int index)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ActiveDirectorySite site)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Insert (int index, ActiveDirectorySite site)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Remove (ActiveDirectorySite site)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnClearComplete ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnInsertComplete (int index, object value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnRemoveComplete (int index, object value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnSetComplete (int index, object oldValue, object newValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnValidate (object value)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteLink.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteLink.cs
new file mode 100644
index 00000000000..0a230d57c92
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteLink.cs
@@ -0,0 +1,153 @@
+/******************************************************************************
+* The MIT License
+*
+* 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.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+ public class ActiveDirectorySiteLink : IDisposable
+ {
+ public string Name {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectoryTransportType TransportType {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySiteCollection Sites {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int Cost {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public TimeSpan ReplicationInterval {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool ReciprocalReplicationEnabled {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool NotificationEnabled {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool DataCompressionEnabled {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySchedule InterSiteReplicationSchedule {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySiteLink (DirectoryContext context, string siteLinkName) : this(context, siteLinkName, ActiveDirectoryTransportType.Rpc, null)
+ {
+ }
+
+ public ActiveDirectorySiteLink (DirectoryContext context, string siteLinkName, ActiveDirectoryTransportType transport) : this(context, siteLinkName, transport, null)
+ {
+ }
+
+ public ActiveDirectorySiteLink (DirectoryContext context, string siteLinkName, ActiveDirectoryTransportType transport, ActiveDirectorySchedule schedule)
+ {
+ }
+
+ public static ActiveDirectorySiteLink FindByName (DirectoryContext context, string siteLinkName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static ActiveDirectorySiteLink FindByName (DirectoryContext context, string siteLinkName, ActiveDirectoryTransportType transport)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Save ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Delete ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override string ToString ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DirectoryEntry GetDirectoryEntry ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Dispose ()
+ {
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteLinkBridge.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteLinkBridge.cs
new file mode 100644
index 00000000000..54679ebdde2
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteLinkBridge.cs
@@ -0,0 +1,97 @@
+/******************************************************************************
+* The MIT License
+*
+* 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.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+ public class ActiveDirectorySiteLinkBridge : IDisposable
+ {
+ public string Name {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySiteLinkCollection SiteLinks {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectoryTransportType TransportType {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySiteLinkBridge (DirectoryContext context, string bridgeName) : this(context, bridgeName, ActiveDirectoryTransportType.Rpc)
+ {
+ }
+
+ public ActiveDirectorySiteLinkBridge (DirectoryContext context, string bridgeName, ActiveDirectoryTransportType transport)
+ {
+
+ }
+
+ public static ActiveDirectorySiteLinkBridge FindByName (DirectoryContext context, string bridgeName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static ActiveDirectorySiteLinkBridge FindByName (DirectoryContext context, string bridgeName, ActiveDirectoryTransportType transport)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Save ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Delete ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override string ToString ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DirectoryEntry GetDirectoryEntry ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Dispose ()
+ {
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteLinkCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteLinkCollection.cs
new file mode 100644
index 00000000000..2079076b04c
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteLinkCollection.cs
@@ -0,0 +1,103 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ActiveDirectorySiteLinkCollection : CollectionBase
+ {
+ public ActiveDirectorySiteLink this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int Add (ActiveDirectorySiteLink link)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddRange (ActiveDirectorySiteLink[] links)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddRange (ActiveDirectorySiteLinkCollection links)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool Contains (ActiveDirectorySiteLink link)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ActiveDirectorySiteLink[] array, int index)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ActiveDirectorySiteLink link)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Insert (int index, ActiveDirectorySiteLink link)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Remove (ActiveDirectorySiteLink link)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnClearComplete ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnInsertComplete (int index, object value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnRemoveComplete (int index, object value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnSetComplete (int index, object oldValue, object newValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnValidate (object value)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteOptions.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteOptions.cs
new file mode 100644
index 00000000000..4fe9da5d35f
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteOptions.cs
@@ -0,0 +1,43 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [Flags]
+ public enum ActiveDirectorySiteOptions
+ {
+ None = 0,
+ AutoTopologyDisabled = 1,
+ TopologyCleanupDisabled = 2,
+ AutoMinimumHopDisabled = 4,
+ StaleServerDetectDisabled = 8,
+ AutoInterSiteTopologyDisabled = 16,
+ GroupMembershipCachingEnabled = 32,
+ ForceKccWindows2003Behavior = 64,
+ UseWindows2000IstgElection = 128,
+ RandomBridgeHeaderServerSelectionDisabled = 256,
+ UseHashingForReplicationSchedule = 512,
+ RedundantServerTopologyEnabled = 1024
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySubnet.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySubnet.cs
new file mode 100644
index 00000000000..674aeb5d2a6
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySubnet.cs
@@ -0,0 +1,98 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+ public class ActiveDirectorySubnet : IDisposable
+ {
+ public string Name {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySite Site {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string Location {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public static ActiveDirectorySubnet FindByName (DirectoryContext context, string subnetName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ActiveDirectorySubnet (DirectoryContext context, string subnetName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ActiveDirectorySubnet (DirectoryContext context, string subnetName, string siteName) : this(context, subnetName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Save ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Delete ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override string ToString ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DirectoryEntry GetDirectoryEntry ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Dispose ()
+ {
+
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySubnetCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySubnetCollection.cs
new file mode 100644
index 00000000000..70ed6790a20
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySubnetCollection.cs
@@ -0,0 +1,108 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ActiveDirectorySubnetCollection : CollectionBase
+ {
+ public ActiveDirectorySubnet this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int Add (ActiveDirectorySubnet subnet)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddRange (ActiveDirectorySubnet[] subnets)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddRange (ActiveDirectorySubnetCollection subnets)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool Contains (ActiveDirectorySubnet subnet)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ActiveDirectorySubnet[] array, int index)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ActiveDirectorySubnet subnet)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Insert (int index, ActiveDirectorySubnet subnet)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Remove (ActiveDirectorySubnet subnet)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnClear ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnClearComplete ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnInsertComplete (int index, object value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnRemoveComplete (int index, object value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnSetComplete (int index, object oldValue, object newValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnValidate (object value)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySyntax.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySyntax.cs
new file mode 100644
index 00000000000..da09d5134ba
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectorySyntax.cs
@@ -0,0 +1,53 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum ActiveDirectorySyntax
+ {
+ CaseExactString,
+ CaseIgnoreString,
+ NumericString,
+ DirectoryString,
+ OctetString,
+ SecurityDescriptor,
+ Int,
+ Int64,
+ Bool,
+ Oid,
+ GeneralizedTime,
+ UtcTime,
+ DN,
+ DNWithBinary,
+ DNWithString,
+ Enumeration,
+ IA5String,
+ PrintableString,
+ Sid,
+ AccessPointDN,
+ ORName,
+ PresentationAddress,
+ ReplicaLink
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryTransportType.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryTransportType.cs
new file mode 100644
index 00000000000..a87d38441c8
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ActiveDirectoryTransportType.cs
@@ -0,0 +1,31 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum ActiveDirectoryTransportType
+ {
+ Rpc,
+ Smtp
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ApplicationPartition.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ApplicationPartition.cs
new file mode 100644
index 00000000000..c8910b94525
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ApplicationPartition.cs
@@ -0,0 +1,126 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+ public class ApplicationPartition : ActiveDirectoryPartition
+ {
+ public DirectoryServerCollection DirectoryServers {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string SecurityReferenceDomain {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ApplicationPartition (DirectoryContext context, string distinguishedName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ApplicationPartition (DirectoryContext context, string distinguishedName, string objectClass)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void Dispose (bool disposing)
+ {
+
+ }
+
+ public static ApplicationPartition GetApplicationPartition (DirectoryContext context)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static ApplicationPartition FindByName (DirectoryContext context, string distinguishedName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DirectoryServer FindDirectoryServer ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DirectoryServer FindDirectoryServer (string siteName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DirectoryServer FindDirectoryServer (bool forceRediscovery)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DirectoryServer FindDirectoryServer (string siteName, bool forceRediscovery)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ReadOnlyDirectoryServerCollection FindAllDirectoryServers ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ReadOnlyDirectoryServerCollection FindAllDirectoryServers (string siteName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ReadOnlyDirectoryServerCollection FindAllDiscoverableDirectoryServers ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ReadOnlyDirectoryServerCollection FindAllDiscoverableDirectoryServers (string siteName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Delete ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Save ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public override DirectoryEntry GetDirectoryEntry ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ApplicationPartitionCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ApplicationPartitionCollection.cs
new file mode 100644
index 00000000000..78cae101e49
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ApplicationPartitionCollection.cs
@@ -0,0 +1,50 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ApplicationPartitionCollection : ReadOnlyCollectionBase
+ {
+ public ApplicationPartition this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (ApplicationPartition applicationPartition)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ApplicationPartition applicationPartition)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ApplicationPartition[] applicationPartitions, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/AttributeMetadata.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/AttributeMetadata.cs
new file mode 100644
index 00000000000..c71b0e4e6fd
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/AttributeMetadata.cs
@@ -0,0 +1,73 @@
+/******************************************************************************
+* The MIT License
+*
+* 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.Runtime.InteropServices;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class AttributeMetadata
+ {
+ public string Name {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int Version {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DateTime LastOriginatingChangeTime {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public Guid LastOriginatingInvocationId {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public long OriginatingChangeUsn {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public long LocalChangeUsn {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string OriginatingServer {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/AttributeMetadataCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/AttributeMetadataCollection.cs
new file mode 100644
index 00000000000..d08fd3c95e4
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/AttributeMetadataCollection.cs
@@ -0,0 +1,50 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class AttributeMetadataCollection : ReadOnlyCollectionBase
+ {
+ public AttributeMetadata this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (AttributeMetadata metadata)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (AttributeMetadata metadata)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (AttributeMetadata[] metadata, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryContext.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryContext.cs
new file mode 100644
index 00000000000..b9129c08840
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryContext.cs
@@ -0,0 +1,74 @@
+/******************************************************************************
+* The MIT License
+*
+* 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.Net;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [EnvironmentPermission(SecurityAction.Assert, Unrestricted = true)]
+ public class DirectoryContext
+ {
+ public string Name {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string UserName {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DirectoryContextType ContextType {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ [DirectoryServicesPermission(SecurityAction.Demand, Unrestricted = true)]
+ public DirectoryContext (DirectoryContextType contextType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.Demand, Unrestricted = true)]
+ public DirectoryContext (DirectoryContextType contextType, string name)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.Demand, Unrestricted = true)]
+ public DirectoryContext (DirectoryContextType contextType, string username, string password)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.Demand, Unrestricted = true)]
+ public DirectoryContext (DirectoryContextType contextType, string name, string username, string password)
+ {
+ throw new NotImplementedException ();
+ }
+
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryContextType.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryContextType.cs
new file mode 100644
index 00000000000..dc25ab9ec66
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryContextType.cs
@@ -0,0 +1,34 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum DirectoryContextType
+ {
+ Domain,
+ Forest,
+ DirectoryServer,
+ ConfigurationSet,
+ ApplicationPartition
+ }
+} \ No newline at end of file
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryEntryConfiguration.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryEntryConfiguration.cs
new file mode 100644
index 00000000000..074e672d06c
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryEntryConfiguration.cs
@@ -0,0 +1,90 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices
+{
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+ public class DirectoryEntryConfiguration
+ {
+ public ReferralChasingOption Referral {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public SecurityMasks SecurityMasks {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int PageSize {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int PasswordPort {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public PasswordEncodingMethod PasswordEncoding {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string GetCurrentServerName ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool IsMutuallyAuthenticated ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetUserNameQueryQuota (string accountName)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryServer.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryServer.cs
new file mode 100644
index 00000000000..c32a7cde8bc
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryServer.cs
@@ -0,0 +1,131 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+ public abstract class DirectoryServer : IDisposable
+ {
+ public string Name {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ReadOnlyStringCollection Partitions {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public abstract string IPAddress {
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ get;
+ }
+
+ public abstract string SiteName {
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ get;
+ }
+
+ public abstract SyncUpdateCallback SyncFromAllServersCallback {
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ get;
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ set;
+ }
+
+ public abstract ReplicationConnectionCollection InboundConnections {
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ get;
+ }
+
+ public abstract ReplicationConnectionCollection OutboundConnections {
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ get;
+ }
+
+ internal DirectoryContext Context {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public void Dispose ()
+ {
+
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+
+ }
+
+ public override string ToString ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void MoveToAnotherSite (string siteName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DirectoryEntry GetDirectoryEntry ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public abstract void CheckReplicationConsistency ();
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public abstract ReplicationCursorCollection GetReplicationCursors (string partition);
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public abstract ReplicationOperationInformation GetReplicationOperationInformation ();
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public abstract ReplicationNeighborCollection GetReplicationNeighbors (string partition);
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public abstract ReplicationNeighborCollection GetAllReplicationNeighbors ();
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public abstract ReplicationFailureCollection GetReplicationConnectionFailures ();
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public abstract ActiveDirectoryReplicationMetadata GetReplicationMetadata (string objectPath);
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public abstract void SyncReplicaFromServer (string partition, string sourceServer);
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public abstract void TriggerSyncReplicaFromNeighbors (string partition);
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public abstract void SyncReplicaFromAllServers (string partition, SyncFromAllServersOptions options);
+ }
+
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryServerCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryServerCollection.cs
new file mode 100644
index 00000000000..d5b2fa850a1
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DirectoryServerCollection.cs
@@ -0,0 +1,103 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class DirectoryServerCollection : CollectionBase
+ {
+ public DirectoryServer this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int Add (DirectoryServer server)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void AddRange (DirectoryServer[] servers)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool Contains (DirectoryServer server)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (DirectoryServer[] array, int index)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (DirectoryServer server)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Insert (int index, DirectoryServer server)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Remove (DirectoryServer server)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnClear ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnClearComplete ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnInsertComplete (int index, object value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnRemoveComplete (int index, object value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnSetComplete (int index, object oldValue, object newValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void OnValidate (object value)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/Domain.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/Domain.cs
new file mode 100644
index 00000000000..c35a8f9f91b
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/Domain.cs
@@ -0,0 +1,224 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+ public class Domain : ActiveDirectoryPartition
+ {
+ public Forest Forest {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DomainControllerCollection DomainControllers {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DomainCollection Children {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DomainMode DomainMode {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public Domain Parent {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DomainController PdcRoleOwner {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DomainController RidRoleOwner {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DomainController InfrastructureRoleOwner {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public static Domain GetDomain (DirectoryContext context)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static Domain GetComputerDomain ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RaiseDomainFunctionality (DomainMode domainMode)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DomainController FindDomainController ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DomainController FindDomainController (string siteName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DomainController FindDomainController (LocatorOptions flag)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DomainController FindDomainController (string siteName, LocatorOptions flag)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DomainControllerCollection FindAllDomainControllers ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DomainControllerCollection FindAllDomainControllers (string siteName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DomainControllerCollection FindAllDiscoverableDomainControllers ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DomainControllerCollection FindAllDiscoverableDomainControllers (string siteName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public override DirectoryEntry GetDirectoryEntry ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public TrustRelationshipInformationCollection GetAllTrustRelationships ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public TrustRelationshipInformation GetTrustRelationship (string targetDomainName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool GetSelectiveAuthenticationStatus (string targetDomainName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetSelectiveAuthenticationStatus (string targetDomainName, bool enable)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool GetSidFilteringStatus (string targetDomainName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetSidFilteringStatus (string targetDomainName, bool enable)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void DeleteLocalSideOfTrustRelationship (string targetDomainName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void DeleteTrustRelationship (Domain targetDomain)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void VerifyOutboundTrustRelationship (string targetDomainName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void VerifyTrustRelationship (Domain targetDomain, TrustDirection direction)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CreateLocalSideOfTrustRelationship (string targetDomainName, TrustDirection direction, string trustPassword)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CreateTrustRelationship (Domain targetDomain, TrustDirection direction)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void UpdateLocalSideOfTrustRelationship (string targetDomainName, string newTrustPassword)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void UpdateLocalSideOfTrustRelationship (string targetDomainName, TrustDirection newTrustDirection, string newTrustPassword)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void UpdateTrustRelationship (Domain targetDomain, TrustDirection newTrustDirection)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RepairTrustRelationship (Domain targetDomain)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static Domain GetCurrentDomain ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainCollection.cs
new file mode 100644
index 00000000000..d6108c9bf29
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainCollection.cs
@@ -0,0 +1,50 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class DomainCollection : ReadOnlyCollectionBase
+ {
+ public Domain this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (Domain domain)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (Domain domain)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (Domain[] domains, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainCollisionOptions.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainCollisionOptions.cs
new file mode 100644
index 00000000000..ccb43513b57
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainCollisionOptions.cs
@@ -0,0 +1,34 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [Flags]
+ public enum DomainCollisionOptions
+ {
+ None = 0,
+ SidDisabledByAdmin = 1,
+ SidDisabledByConflict = 2,
+ NetBiosNameDisabledByAdmin = 4,
+ NetBiosNameDisabledByConflict = 8
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainController.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainController.cs
new file mode 100644
index 00000000000..5279b34fb45
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainController.cs
@@ -0,0 +1,240 @@
+/******************************************************************************
+* The MIT License
+*
+* 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.Net;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+ public class DomainController : DirectoryServer
+ {
+ public Forest Forest {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DateTime CurrentTime {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public long HighestCommittedUsn {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string OSVersion {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectoryRoleCollection Roles {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public Domain Domain {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override string IPAddress {
+ [DnsPermission(SecurityAction.Assert, Unrestricted = true), DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override string SiteName {
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override SyncUpdateCallback SyncFromAllServersCallback {
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ get {
+ throw new NotImplementedException ();
+ }
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override ReplicationConnectionCollection InboundConnections {
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public override ReplicationConnectionCollection OutboundConnections {
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ protected DomainController ()
+ {
+ }
+
+ protected override void Dispose (bool disposing)
+ {
+ base.Dispose ();
+
+ }
+
+ public static DomainController GetDomainController (DirectoryContext context)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static DomainController FindOne (DirectoryContext context)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static DomainController FindOne (DirectoryContext context, string siteName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static DomainController FindOne (DirectoryContext context, LocatorOptions flag)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static DomainController FindOne (DirectoryContext context, string siteName, LocatorOptions flag)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static DomainControllerCollection FindAll (DirectoryContext context)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static DomainControllerCollection FindAll (DirectoryContext context, string siteName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public virtual GlobalCatalog EnableGlobalCatalog ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public virtual bool IsGlobalCatalog ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void TransferRoleOwnership (ActiveDirectoryRole role)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SeizeRoleOwnership (ActiveDirectoryRole role)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public virtual DirectorySearcher GetDirectorySearcher ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public override void CheckReplicationConsistency ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public override ReplicationCursorCollection GetReplicationCursors (string partition)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public override ReplicationOperationInformation GetReplicationOperationInformation ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public override ReplicationNeighborCollection GetReplicationNeighbors (string partition)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public override ReplicationNeighborCollection GetAllReplicationNeighbors ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public override ReplicationFailureCollection GetReplicationConnectionFailures ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public override ActiveDirectoryReplicationMetadata GetReplicationMetadata (string objectPath)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public override void SyncReplicaFromServer (string partition, string sourceServer)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public override void TriggerSyncReplicaFromNeighbors (string partition)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public override void SyncReplicaFromAllServers (string partition, SyncFromAllServersOptions options)
+ {
+ throw new NotImplementedException ();
+ }
+
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainControllerCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainControllerCollection.cs
new file mode 100644
index 00000000000..309854b1f6f
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainControllerCollection.cs
@@ -0,0 +1,50 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class DomainControllerCollection : ReadOnlyCollectionBase
+ {
+ public DomainController this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (DomainController domainController)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (DomainController domainController)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (DomainController[] domainControllers, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainMode.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainMode.cs
new file mode 100644
index 00000000000..33203862fd3
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/DomainMode.cs
@@ -0,0 +1,35 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum DomainMode
+ {
+ Windows2000MixedDomain,
+ Windows2000NativeDomain,
+ Windows2003InterimDomain,
+ Windows2003Domain,
+ Windows2008Domain,
+ Windows2008R2Domain
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/Forest.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/Forest.cs
new file mode 100644
index 00000000000..d8ff1f9fbf7
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/Forest.cs
@@ -0,0 +1,240 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+ public class Forest : IDisposable
+ {
+ public string Name {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ReadOnlySiteCollection Sites {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DomainCollection Domains {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public GlobalCatalogCollection GlobalCatalogs {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ApplicationPartitionCollection ApplicationPartitions {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ForestMode ForestMode {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public Domain RootDomain {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySchema Schema {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DomainController SchemaRoleOwner {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DomainController NamingRoleOwner {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public void Dispose ()
+ {
+ this.Dispose (true);
+ }
+
+ protected void Dispose (bool disposing)
+ {
+
+ }
+
+ public static Forest GetForest (DirectoryContext context)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RaiseForestFunctionality (ForestMode forestMode)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override string ToString ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public GlobalCatalog FindGlobalCatalog ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public GlobalCatalog FindGlobalCatalog (string siteName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public GlobalCatalog FindGlobalCatalog (LocatorOptions flag)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public GlobalCatalog FindGlobalCatalog (string siteName, LocatorOptions flag)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public GlobalCatalogCollection FindAllGlobalCatalogs ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public GlobalCatalogCollection FindAllGlobalCatalogs (string siteName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public GlobalCatalogCollection FindAllDiscoverableGlobalCatalogs ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public GlobalCatalogCollection FindAllDiscoverableGlobalCatalogs (string siteName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public TrustRelationshipInformationCollection GetAllTrustRelationships ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ForestTrustRelationshipInformation GetTrustRelationship (string targetForestName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool GetSelectiveAuthenticationStatus (string targetForestName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetSelectiveAuthenticationStatus (string targetForestName, bool enable)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool GetSidFilteringStatus (string targetForestName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void SetSidFilteringStatus (string targetForestName, bool enable)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void DeleteLocalSideOfTrustRelationship (string targetForestName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void DeleteTrustRelationship (Forest targetForest)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void VerifyOutboundTrustRelationship (string targetForestName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void VerifyTrustRelationship (Forest targetForest, TrustDirection direction)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CreateLocalSideOfTrustRelationship (string targetForestName, TrustDirection direction, string trustPassword)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CreateTrustRelationship (Forest targetForest, TrustDirection direction)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void UpdateLocalSideOfTrustRelationship (string targetForestName, string newTrustPassword)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void UpdateLocalSideOfTrustRelationship (string targetForestName, TrustDirection newTrustDirection, string newTrustPassword)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void UpdateTrustRelationship (Forest targetForest, TrustDirection newTrustDirection)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void RepairTrustRelationship (Forest targetForest)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static Forest GetCurrentForest ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestMode.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestMode.cs
new file mode 100644
index 00000000000..1e1ebebb74d
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestMode.cs
@@ -0,0 +1,34 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum ForestMode
+ {
+ Windows2000Forest,
+ Windows2003InterimForest,
+ Windows2003Forest,
+ Windows2008Forest,
+ Windows2008R2Forest
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustCollisionException.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustCollisionException.cs
new file mode 100644
index 00000000000..fb074595a6b
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustCollisionException.cs
@@ -0,0 +1,64 @@
+/******************************************************************************
+* The MIT License
+*
+* 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.Runtime.Serialization;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [Serializable]
+ public class ForestTrustCollisionException : ActiveDirectoryOperationException, ISerializable
+ {
+ public ForestTrustRelationshipCollisionCollection Collisions {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ForestTrustCollisionException (string message, Exception inner, ForestTrustRelationshipCollisionCollection collisions) : base(message, inner)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ForestTrustCollisionException (string message, Exception inner) : base(message, inner)
+ {
+ }
+
+ public ForestTrustCollisionException (string message) : base(message)
+ {
+ }
+
+ public ForestTrustCollisionException () : base("ForestTrustCollision")
+ {
+ }
+
+ protected ForestTrustCollisionException (SerializationInfo info, StreamingContext context) : base(info, context)
+ {
+ }
+
+ [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
+ public override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustCollisionType.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustCollisionType.cs
new file mode 100644
index 00000000000..b31f9a089d3
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustCollisionType.cs
@@ -0,0 +1,31 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum ForestTrustCollisionType
+ {
+ TopLevelName,
+ Domain,
+ Other
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustDomainInfoCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustDomainInfoCollection.cs
new file mode 100644
index 00000000000..27613231b85
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustDomainInfoCollection.cs
@@ -0,0 +1,51 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ForestTrustDomainInfoCollection : ReadOnlyCollectionBase
+ {
+ public ForestTrustDomainInformation this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (ForestTrustDomainInformation information)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ForestTrustDomainInformation information)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ForestTrustDomainInformation[] array, int index)
+ {
+ throw new NotImplementedException ();
+ }
+
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustDomainInformation.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustDomainInformation.cs
new file mode 100644
index 00000000000..a5cd4b788ff
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustDomainInformation.cs
@@ -0,0 +1,55 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ForestTrustDomainInformation
+ {
+ public string DnsName {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string NetBiosName {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string DomainSid {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ForestTrustDomainStatus Status {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustDomainStatus.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustDomainStatus.cs
new file mode 100644
index 00000000000..0e0ddad0b21
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustDomainStatus.cs
@@ -0,0 +1,35 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum ForestTrustDomainStatus
+ {
+ Enabled,
+ SidAdminDisabled,
+ SidConflictDisabled,
+ NetBiosNameAdminDisabled = 4,
+ NetBiosNameConflictDisabled = 8
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustRelationshipCollision.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustRelationshipCollision.cs
new file mode 100644
index 00000000000..0f811919be7
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustRelationshipCollision.cs
@@ -0,0 +1,51 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ForestTrustRelationshipCollision
+ {
+ public ForestTrustCollisionType CollisionType {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public TopLevelNameCollisionOptions TopLevelNameCollisionOption {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DomainCollisionOptions DomainCollisionOption {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string CollisionRecord {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustRelationshipCollisionCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustRelationshipCollisionCollection.cs
new file mode 100644
index 00000000000..95279c342a7
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustRelationshipCollisionCollection.cs
@@ -0,0 +1,50 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ForestTrustRelationshipCollisionCollection : ReadOnlyCollectionBase
+ {
+ public ForestTrustRelationshipCollision this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (ForestTrustRelationshipCollision collision)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ForestTrustRelationshipCollision collision)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ForestTrustRelationshipCollision[] array, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustRelationshipInformation.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustRelationshipInformation.cs
new file mode 100644
index 00000000000..e6c72b932af
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ForestTrustRelationshipInformation.cs
@@ -0,0 +1,54 @@
+/******************************************************************************
+* The MIT License
+*
+* 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.Specialized;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+ public class ForestTrustRelationshipInformation : TrustRelationshipInformation
+ {
+ public TopLevelNameCollection TopLevelNames {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public StringCollection ExcludedTopLevelNames {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ForestTrustDomainInfoCollection TrustedDomainInformation {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public void Save ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/GlobalCatalog.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/GlobalCatalog.cs
new file mode 100644
index 00000000000..c3d816b658a
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/GlobalCatalog.cs
@@ -0,0 +1,95 @@
+/******************************************************************************
+* The MIT License
+*
+* 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.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+ public class GlobalCatalog : DomainController
+ {
+ public static GlobalCatalog GetGlobalCatalog (DirectoryContext context)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public new static GlobalCatalog FindOne (DirectoryContext context)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public new static GlobalCatalog FindOne (DirectoryContext context, string siteName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public new static GlobalCatalog FindOne (DirectoryContext context, LocatorOptions flag)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public new static GlobalCatalog FindOne (DirectoryContext context, string siteName, LocatorOptions flag)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public new static GlobalCatalogCollection FindAll (DirectoryContext context)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public new static GlobalCatalogCollection FindAll (DirectoryContext context, string siteName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public override GlobalCatalog EnableGlobalCatalog ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DomainController DisableGlobalCatalog ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public override bool IsGlobalCatalog ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ReadOnlyActiveDirectorySchemaPropertyCollection FindAllProperties ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true), DirectoryServicesPermission(SecurityAction.InheritanceDemand, Unrestricted = true)]
+ public override DirectorySearcher GetDirectorySearcher ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/GlobalCatalogCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/GlobalCatalogCollection.cs
new file mode 100644
index 00000000000..9725e7e2302
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/GlobalCatalogCollection.cs
@@ -0,0 +1,51 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class GlobalCatalogCollection : ReadOnlyCollectionBase
+ {
+ public GlobalCatalog this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (GlobalCatalog globalCatalog)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (GlobalCatalog globalCatalog)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (GlobalCatalog[] globalCatalogs, int index)
+ {
+ throw new NotImplementedException ();
+ }
+
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/HourOfDay.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/HourOfDay.cs
new file mode 100644
index 00000000000..1e1825a1a99
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/HourOfDay.cs
@@ -0,0 +1,53 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum HourOfDay
+ {
+ Zero, // midnight
+ One,
+ Two,
+ Three,
+ Four,
+ Five,
+ Six,
+ Seven,
+ Eight,
+ Nine,
+ Ten,
+ Eleven,
+ Twelve,
+ Thirteen,
+ Fourteen,
+ Fifteen,
+ Sixteen,
+ Seventeen,
+ Eighteen,
+ Nineteen,
+ Twenty,
+ TwentyOne,
+ TwentyTwo,
+ TwentyThree
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/LocatorOptions.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/LocatorOptions.cs
new file mode 100644
index 00000000000..e4e31dd2066
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/LocatorOptions.cs
@@ -0,0 +1,35 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [Flags]
+ public enum LocatorOptions : long
+ {
+ ForceRediscovery = 1L,
+ KdcRequired = 1024L,
+ TimeServerRequired = 2048L,
+ WriteableRequired = 4096L,
+ AvoidSelf = 16384L
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/MinuteOfHour.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/MinuteOfHour.cs
new file mode 100644
index 00000000000..67c38063bdc
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/MinuteOfHour.cs
@@ -0,0 +1,33 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum MinuteOfHour
+ {
+ Zero,
+ Fifteen = 15,
+ Thirty = 30,
+ FortyFive = 45
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/NotificationStatus.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/NotificationStatus.cs
new file mode 100644
index 00000000000..6bf2c2ec3ba
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/NotificationStatus.cs
@@ -0,0 +1,32 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum NotificationStatus
+ {
+ NoNotification,
+ IntraSiteOnly,
+ NotificationAlways
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/PropertyTypes.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/PropertyTypes.cs
new file mode 100644
index 00000000000..179075c4abf
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/PropertyTypes.cs
@@ -0,0 +1,33 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [Flags]
+ public enum PropertyTypes
+ {
+ Indexed = 2,
+ InGlobalCatalog = 4
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlyActiveDirectorySchemaClassCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlyActiveDirectorySchemaClassCollection.cs
new file mode 100644
index 00000000000..5690994a917
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlyActiveDirectorySchemaClassCollection.cs
@@ -0,0 +1,50 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ReadOnlyActiveDirectorySchemaClassCollection : ReadOnlyCollectionBase
+ {
+ public ActiveDirectorySchemaClass this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (ActiveDirectorySchemaClass schemaClass)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ActiveDirectorySchemaClass schemaClass)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ActiveDirectorySchemaClass[] classes, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlyActiveDirectorySchemaPropertyCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlyActiveDirectorySchemaPropertyCollection.cs
new file mode 100644
index 00000000000..e7ecf7e4137
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlyActiveDirectorySchemaPropertyCollection.cs
@@ -0,0 +1,50 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ReadOnlyActiveDirectorySchemaPropertyCollection : ReadOnlyCollectionBase
+ {
+ public ActiveDirectorySchemaProperty this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (ActiveDirectorySchemaProperty schemaProperty)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ActiveDirectorySchemaProperty schemaProperty)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ActiveDirectorySchemaProperty[] properties, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlyDirectoryServerCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlyDirectoryServerCollection.cs
new file mode 100644
index 00000000000..a30a4a9b1a6
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlyDirectoryServerCollection.cs
@@ -0,0 +1,50 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ReadOnlyDirectoryServerCollection : ReadOnlyCollectionBase
+ {
+ public DirectoryServer this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (DirectoryServer directoryServer)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (DirectoryServer directoryServer)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (DirectoryServer[] directoryServers, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlySiteCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlySiteCollection.cs
new file mode 100644
index 00000000000..52e8e9b0224
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlySiteCollection.cs
@@ -0,0 +1,50 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ReadOnlySiteCollection : ReadOnlyCollectionBase
+ {
+ public ActiveDirectorySite this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (ActiveDirectorySite site)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ActiveDirectorySite site)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ActiveDirectorySite[] sites, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlySiteLinkBridgeCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlySiteLinkBridgeCollection.cs
new file mode 100644
index 00000000000..c73f6040ae7
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlySiteLinkBridgeCollection.cs
@@ -0,0 +1,50 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ReadOnlySiteLinkBridgeCollection : ReadOnlyCollectionBase
+ {
+ public ActiveDirectorySiteLinkBridge this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (ActiveDirectorySiteLinkBridge bridge)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ActiveDirectorySiteLinkBridge bridge)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ActiveDirectorySiteLinkBridge[] bridges, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlySiteLinkCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlySiteLinkCollection.cs
new file mode 100644
index 00000000000..cef4f6736b5
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlySiteLinkCollection.cs
@@ -0,0 +1,50 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ReadOnlySiteLinkCollection : ReadOnlyCollectionBase
+ {
+ public ActiveDirectorySiteLink this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (ActiveDirectorySiteLink link)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ActiveDirectorySiteLink link)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ActiveDirectorySiteLink[] links, int index)
+ {
+ base.InnerList.CopyTo (links, index);
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlyStringCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlyStringCollection.cs
new file mode 100644
index 00000000000..9edd14e096d
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReadOnlyStringCollection.cs
@@ -0,0 +1,48 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ReadOnlyStringCollection : ReadOnlyCollectionBase
+ {
+ public string this [int index] {
+ get { throw new NotImplementedException (); }
+ }
+
+ public bool Contains (string value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (string value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (string[] values, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationConnection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationConnection.cs
new file mode 100644
index 00000000000..19763309612
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationConnection.cs
@@ -0,0 +1,181 @@
+/******************************************************************************
+* The MIT License
+*
+* 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.ComponentModel;
+using System.Runtime.InteropServices;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [DirectoryServicesPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+ public class ReplicationConnection : IDisposable
+ {
+ public string Name {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string SourceServer {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string DestinationServer {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Enabled {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectoryTransportType TransportType {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool GeneratedByKcc {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool ReciprocalReplicationEnabled {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public NotificationStatus ChangeNotificationStatus {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool DataCompressionEnabled {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool ReplicationScheduleOwnedByUser {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ReplicationSpan ReplicationSpan {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySchedule ReplicationSchedule {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public static ReplicationConnection FindByName (DirectoryContext context, string name)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ReplicationConnection (DirectoryContext context, string name, DirectoryServer sourceServer) : this(context, name, sourceServer, null, ActiveDirectoryTransportType.Rpc)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ReplicationConnection (DirectoryContext context, string name, DirectoryServer sourceServer, ActiveDirectorySchedule schedule) : this(context, name, sourceServer, schedule, ActiveDirectoryTransportType.Rpc)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ReplicationConnection (DirectoryContext context, string name, DirectoryServer sourceServer, ActiveDirectoryTransportType transport) : this(context, name, sourceServer, null, transport)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public ReplicationConnection (DirectoryContext context, string name, DirectoryServer sourceServer, ActiveDirectorySchedule schedule, ActiveDirectoryTransportType transport)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Dispose ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Delete ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void Save ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public override string ToString ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DirectoryEntry GetDirectoryEntry ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationConnectionCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationConnectionCollection.cs
new file mode 100644
index 00000000000..b46a2b4461c
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationConnectionCollection.cs
@@ -0,0 +1,51 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ReplicationConnectionCollection : ReadOnlyCollectionBase
+ {
+ public ReplicationConnection this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (ReplicationConnection connection)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ReplicationConnection connection)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ReplicationConnection[] connections, int index)
+ {
+ throw new NotImplementedException ();
+ }
+
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationCursor.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationCursor.cs
new file mode 100644
index 00000000000..7a50391acfa
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationCursor.cs
@@ -0,0 +1,60 @@
+/******************************************************************************
+* The MIT License
+*
+* 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.Runtime.InteropServices;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ReplicationCursor
+ {
+ public string PartitionName {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public Guid SourceInvocationId {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public long UpToDatenessUsn {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string SourceServer {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DateTime LastSuccessfulSyncTime {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ }
+} \ No newline at end of file
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationCursorCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationCursorCollection.cs
new file mode 100644
index 00000000000..d14e35b38c2
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationCursorCollection.cs
@@ -0,0 +1,48 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ReplicationCursorCollection : ReadOnlyCollectionBase
+ {
+ public ReplicationCursor this [int index] {
+ get { throw new NotImplementedException (); }
+ }
+
+ public bool Contains (ReplicationCursor cursor)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ReplicationCursor cursor)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ReplicationCursor[] values, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationFailure.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationFailure.cs
new file mode 100644
index 00000000000..39291b76047
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationFailure.cs
@@ -0,0 +1,59 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ReplicationFailure
+ {
+ public string SourceServer {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DateTime FirstFailureTime {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int ConsecutiveFailureCount {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int LastErrorCode {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string LastErrorMessage {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationFailureCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationFailureCollection.cs
new file mode 100644
index 00000000000..4b55b860dc1
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationFailureCollection.cs
@@ -0,0 +1,53 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ReplicationFailureCollection : ReadOnlyCollectionBase
+ {
+ public ReplicationFailure this[int index]
+ {
+ get
+ {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains(ReplicationFailure failure)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf(ReplicationFailure failure)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo(ReplicationFailure[] failures, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationNeighbor.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationNeighbor.cs
new file mode 100644
index 00000000000..a134caa5b3e
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationNeighbor.cs
@@ -0,0 +1,122 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ReplicationNeighbor
+ {
+ [Flags]
+ public enum ReplicationNeighborOptions : long
+ {
+ Writeable = 16L,
+ SyncOnStartup = 32L,
+ ScheduledSync = 64L,
+ UseInterSiteTransport = 128L,
+ TwoWaySync = 512L,
+ ReturnObjectParent = 2048L,
+ FullSyncInProgress = 65536L,
+ FullSyncNextPacket = 131072L,
+ NeverSynced = 2097152L,
+ Preempted = 16777216L,
+ IgnoreChangeNotifications = 67108864L,
+ DisableScheduledSync = 134217728L,
+ CompressChanges = 268435456L,
+ NoChangeNotifications = 536870912L,
+ PartialAttributeSet = 1073741824L
+ }
+
+ public string PartitionName {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string SourceServer {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectoryTransportType TransportType {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ReplicationNeighbor.ReplicationNeighborOptions ReplicationNeighborOption {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public Guid SourceInvocationId {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public long UsnLastObjectChangeSynced {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public long UsnAttributeFilter {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DateTime LastSuccessfulSync {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DateTime LastAttemptedSync {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int LastSyncResult {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string LastSyncMessage {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int ConsecutiveFailureCount {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationNeighborCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationNeighborCollection.cs
new file mode 100644
index 00000000000..aac4f9a4b00
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationNeighborCollection.cs
@@ -0,0 +1,50 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ReplicationNeighborCollection : ReadOnlyCollectionBase
+ {
+ public ReplicationNeighbor this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (ReplicationNeighbor neighbor)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ReplicationNeighbor neighbor)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ReplicationNeighbor[] neighbors, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationOperation.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationOperation.cs
new file mode 100644
index 00000000000..b5af6739703
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationOperation.cs
@@ -0,0 +1,65 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ReplicationOperation
+ {
+ public DateTime TimeEnqueued {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int OperationNumber {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int Priority {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ReplicationOperationType OperationType {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string PartitionName {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string SourceServer {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationOperationCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationOperationCollection.cs
new file mode 100644
index 00000000000..a8a1326b8fa
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationOperationCollection.cs
@@ -0,0 +1,56 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ReplicationOperationCollection : ReadOnlyCollectionBase
+ {
+ public ReplicationOperation this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (ReplicationOperation operation)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (ReplicationOperation operation)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (ReplicationOperation[] operations, int index)
+ {
+ throw new NotImplementedException ();
+ }
+
+ private int Add (ReplicationOperation operation)
+ {
+ throw new NotImplementedException ();
+ }
+
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationOperationInformation.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationOperationInformation.cs
new file mode 100644
index 00000000000..50325a0efdd
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationOperationInformation.cs
@@ -0,0 +1,46 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class ReplicationOperationInformation
+ {
+ public DateTime OperationStartTime {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ReplicationOperation CurrentOperation {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ReplicationOperationCollection PendingOperations {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationOperationType.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationOperationType.cs
new file mode 100644
index 00000000000..52c3790f0b1
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationOperationType.cs
@@ -0,0 +1,34 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum ReplicationOperationType
+ {
+ Sync,
+ Add,
+ Delete,
+ Modify,
+ UpdateReference
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationSecurityLevel.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationSecurityLevel.cs
new file mode 100644
index 00000000000..17b6a72d571
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationSecurityLevel.cs
@@ -0,0 +1,31 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum ReplicationSecurityLevel
+ {
+ MutualAuthentication = 2,
+ Negotiate = 1,
+ NegotiatePassThrough = 0
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationSpan.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationSpan.cs
new file mode 100644
index 00000000000..fb596729885
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/ReplicationSpan.cs
@@ -0,0 +1,31 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum ReplicationSpan
+ {
+ IntraSite,
+ InterSite
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SchemaClassType.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SchemaClassType.cs
new file mode 100644
index 00000000000..05837900e39
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SchemaClassType.cs
@@ -0,0 +1,33 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum SchemaClassType
+ {
+ Type88,
+ Structural,
+ Abstract,
+ Auxiliary
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SecurityMasks.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SecurityMasks.cs
new file mode 100644
index 00000000000..fb66892fc24
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SecurityMasks.cs
@@ -0,0 +1,34 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+namespace System.DirectoryServices
+{
+ [Flags]
+ public enum SecurityMasks
+ {
+ None = 0,
+ Owner = 1,
+ Group = 2,
+ Dacl = 4,
+ Sacl = 8
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersErrorCategory.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersErrorCategory.cs
new file mode 100644
index 00000000000..cc1c7623aa1
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersErrorCategory.cs
@@ -0,0 +1,32 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum SyncFromAllServersErrorCategory
+ {
+ ErrorContactingServer,
+ ErrorReplicating,
+ ServerUnreachable
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersErrorInformation.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersErrorInformation.cs
new file mode 100644
index 00000000000..4d9700254bd
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersErrorInformation.cs
@@ -0,0 +1,59 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class SyncFromAllServersErrorInformation
+ {
+ public SyncFromAllServersErrorCategory ErrorCategory {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public int ErrorCode {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string ErrorMessage {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string TargetServer {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string SourceServer {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersEvent.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersEvent.cs
new file mode 100644
index 00000000000..0369dcb67ea
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersEvent.cs
@@ -0,0 +1,33 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum SyncFromAllServersEvent
+ {
+ Error,
+ SyncStarted,
+ SyncCompleted,
+ Finished
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersOperationException.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersOperationException.cs
new file mode 100644
index 00000000000..16d2544cc1f
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersOperationException.cs
@@ -0,0 +1,68 @@
+/******************************************************************************
+* The MIT License
+*
+* 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.Runtime.Serialization;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [Serializable]
+ public class SyncFromAllServersOperationException : ActiveDirectoryOperationException, ISerializable
+ {
+ public SyncFromAllServersErrorInformation[] ErrorInformation {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public SyncFromAllServersOperationException (string message, Exception inner, SyncFromAllServersErrorInformation[] errors) : base(message, inner)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public SyncFromAllServersOperationException (string message, Exception inner) : base(message, inner)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public SyncFromAllServersOperationException (string message) : base(message)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public SyncFromAllServersOperationException () : base("DSSyncAllFailure")
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected SyncFromAllServersOperationException (SerializationInfo info, StreamingContext context) : base(info, context)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
+ public override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersOptions.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersOptions.cs
new file mode 100644
index 00000000000..e00ef1a1010
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncFromAllServersOptions.cs
@@ -0,0 +1,37 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [Flags]
+ public enum SyncFromAllServersOptions
+ {
+ None = 0,
+ AbortIfServerUnavailable = 1,
+ SyncAdjacentServerOnly = 2,
+ CheckServerAlivenessOnly = 8,
+ SkipInitialCheck = 16,
+ PushChangeOutward = 32,
+ CrossSite = 64
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncUpdateCallback.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncUpdateCallback.cs
new file mode 100644
index 00000000000..a9546fe04b2
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/SyncUpdateCallback.cs
@@ -0,0 +1,28 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public delegate bool SyncUpdateCallback(SyncFromAllServersEvent eventType, string targetServer, string sourceServer, SyncFromAllServersOperationException exception);
+} \ No newline at end of file
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TopLevelName.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TopLevelName.cs
new file mode 100644
index 00000000000..f3e966358f1
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TopLevelName.cs
@@ -0,0 +1,43 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class TopLevelName
+ {
+ public string Name {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public TopLevelNameStatus Status {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TopLevelNameCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TopLevelNameCollection.cs
new file mode 100644
index 00000000000..709212a598e
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TopLevelNameCollection.cs
@@ -0,0 +1,50 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class TopLevelNameCollection : ReadOnlyCollectionBase
+ {
+ public TopLevelName this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (TopLevelName name)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (TopLevelName name)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (TopLevelName[] names, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TopLevelNameCollisionOptions.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TopLevelNameCollisionOptions.cs
new file mode 100644
index 00000000000..8f74903dfeb
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TopLevelNameCollisionOptions.cs
@@ -0,0 +1,34 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ [Flags]
+ public enum TopLevelNameCollisionOptions
+ {
+ None = 0,
+ NewlyCreated = 1,
+ DisabledByAdmin = 2,
+ DisabledByConflict = 4
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TopLevelNameStatus.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TopLevelNameStatus.cs
new file mode 100644
index 00000000000..36cf61d265e
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TopLevelNameStatus.cs
@@ -0,0 +1,34 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum TopLevelNameStatus
+ {
+ Enabled,
+ NewlyCreated,
+ AdminDisabled,
+ ConflictDisabled = 4
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TrustDirection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TrustDirection.cs
new file mode 100644
index 00000000000..ca678643f2e
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TrustDirection.cs
@@ -0,0 +1,33 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum TrustDirection
+ {
+ Inbound = 1,
+ Outbound,
+ Bidirectional
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TrustRelationshipInformation.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TrustRelationshipInformation.cs
new file mode 100644
index 00000000000..4dfcbb2943b
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TrustRelationshipInformation.cs
@@ -0,0 +1,52 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class TrustRelationshipInformation
+ {
+ public string SourceName {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string TargetName {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public TrustType TrustType {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public TrustDirection TrustDirection {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TrustRelationshipInformationCollection.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TrustRelationshipInformationCollection.cs
new file mode 100644
index 00000000000..39dfff9b4a6
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TrustRelationshipInformationCollection.cs
@@ -0,0 +1,50 @@
+/******************************************************************************
+* The MIT License
+*
+* 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;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public class TrustRelationshipInformationCollection : ReadOnlyCollectionBase
+ {
+ public TrustRelationshipInformation this [int index] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public bool Contains (TrustRelationshipInformation information)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public int IndexOf (TrustRelationshipInformation information)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void CopyTo (TrustRelationshipInformation[] array, int index)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TrustType.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TrustType.cs
new file mode 100644
index 00000000000..659733a2c37
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.ActiveDirectory/TrustType.cs
@@ -0,0 +1,37 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+
+using System;
+
+namespace System.DirectoryServices.ActiveDirectory
+{
+ public enum TrustType
+ {
+ TreeRoot,
+ ParentChild,
+ CrossLink,
+ External,
+ Forest,
+ Kerberos,
+ Unknown
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.dll.sources b/mcs/class/System.DirectoryServices/System.DirectoryServices.dll.sources
index 6dfe68caae1..0c18dadf88d 100644
--- a/mcs/class/System.DirectoryServices/System.DirectoryServices.dll.sources
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices.dll.sources
@@ -1,17 +1,33 @@
Assembly/AssemblyInfo.cs
../../build/common/Consts.cs.in
../../build/common/Locale.cs
+System.DirectoryServices/ActiveDirectoryAccessRule.cs
+System.DirectoryServices/ActiveDirectoryAuditRule.cs
+System.DirectoryServices/ActiveDirectoryRights.cs
+System.DirectoryServices/ActiveDirectorySecurityInheritance.cs
System.DirectoryServices/AuthenticationTypes.cs
System.DirectoryServices/DirectoryEntries.cs
System.DirectoryServices/DirectoryEntry.cs
System.DirectoryServices/DirectorySearcher.cs
+System.DirectoryServices/DirectoryServicesCOMException.cs
System.DirectoryServices/DirectoryServicesPermission.cs
System.DirectoryServices/DirectoryServicesPermissionAccess.cs
System.DirectoryServices/DirectoryServicesPermissionAttribute.cs
System.DirectoryServices/DirectoryServicesPermissionEntry.cs
System.DirectoryServices/DirectoryServicesPermissionEntryCollection.cs
+System.DirectoryServices/DirectorySynchronization.cs
+System.DirectoryServices/DirectorySynchronizationOptions.cs
+System.DirectoryServices/DirectoryVirtualListView.cs
+System.DirectoryServices/DirectoryVirtualListViewContext.cs
System.DirectoryServices/DSDescriptionAttribute.cs
+System.DirectoryServices/ExtendedDN.cs
+System.DirectoryServices/ExtendedRightAccessRule.cs
+System.DirectoryServices/ListChildrenAccessRule.cs
+System.DirectoryServices/PasswordEncodingMethod.cs
+System.DirectoryServices/PropertyAccess.cs
+System.DirectoryServices/PropertyAccessRule.cs
System.DirectoryServices/PropertyCollection.cs
+System.DirectoryServices/PropertySetAccessRule.cs
System.DirectoryServices/PropertyValueCollection.cs
System.DirectoryServices/ReferralChasingOption.cs
System.DirectoryServices/ResultPropertyCollection.cs
@@ -24,3 +40,95 @@ System.DirectoryServices/SortDirection.cs
System.DirectoryServices/SortOption.cs
../../build/common/MonoTODOAttribute.cs
System.DirectoryServices.Design/DirectoryEntryConverter.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectoryOperationException.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectoryPartition.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectoryReplicationMetadata.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectoryRole.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectoryRoleCollection.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectorySchedule.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectorySchema.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaClass.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaClassCollection.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaProperty.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectorySchemaPropertyCollection.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectorySecurity.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectoryServerDownException.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectorySite.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteCollection.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteLink.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteLinkBridge.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteLinkCollection.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectorySiteOptions.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectorySubnet.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectorySubnetCollection.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectorySyntax.cs
+System.DirectoryServices.ActiveDirectory/ActiveDirectoryTransportType.cs
+System.DirectoryServices.ActiveDirectory/ApplicationPartition.cs
+System.DirectoryServices.ActiveDirectory/ApplicationPartitionCollection.cs
+System.DirectoryServices.ActiveDirectory/AttributeMetadata.cs
+System.DirectoryServices.ActiveDirectory/AttributeMetadataCollection.cs
+System.DirectoryServices.ActiveDirectory/DirectoryContext.cs
+System.DirectoryServices.ActiveDirectory/DirectoryContextType.cs
+System.DirectoryServices.ActiveDirectory/DirectoryEntryConfiguration.cs
+System.DirectoryServices.ActiveDirectory/DirectoryServer.cs
+System.DirectoryServices.ActiveDirectory/DirectoryServerCollection.cs
+System.DirectoryServices.ActiveDirectory/Domain.cs
+System.DirectoryServices.ActiveDirectory/DomainCollection.cs
+System.DirectoryServices.ActiveDirectory/DomainController.cs
+System.DirectoryServices.ActiveDirectory/DomainControllerCollection.cs
+System.DirectoryServices.ActiveDirectory/DomainMode.cs
+System.DirectoryServices.ActiveDirectory/DomainCollisionOptions.cs
+System.DirectoryServices.ActiveDirectory/Forest.cs
+System.DirectoryServices.ActiveDirectory/ForestMode.cs
+System.DirectoryServices.ActiveDirectory/ForestTrustCollisionException.cs
+System.DirectoryServices.ActiveDirectory/ForestTrustCollisionType.cs
+System.DirectoryServices.ActiveDirectory/ForestTrustDomainInformation.cs
+System.DirectoryServices.ActiveDirectory/ForestTrustDomainInfoCollection.cs
+System.DirectoryServices.ActiveDirectory/ForestTrustDomainStatus.cs
+System.DirectoryServices.ActiveDirectory/ForestTrustRelationshipCollision.cs
+System.DirectoryServices.ActiveDirectory/ForestTrustRelationshipCollisionCollection.cs
+System.DirectoryServices.ActiveDirectory/ForestTrustRelationshipInformation.cs
+System.DirectoryServices.ActiveDirectory/GlobalCatalog.cs
+System.DirectoryServices.ActiveDirectory/GlobalCatalogCollection.cs
+System.DirectoryServices.ActiveDirectory/HourOfDay.cs
+System.DirectoryServices.ActiveDirectory/LocatorOptions.cs
+System.DirectoryServices.ActiveDirectory/MinuteOfHour.cs
+System.DirectoryServices.ActiveDirectory/NotificationStatus.cs
+System.DirectoryServices.ActiveDirectory/PropertyTypes.cs
+System.DirectoryServices.ActiveDirectory/ReadOnlyActiveDirectorySchemaClassCollection.cs
+System.DirectoryServices.ActiveDirectory/ReadOnlyActiveDirectorySchemaPropertyCollection.cs
+System.DirectoryServices.ActiveDirectory/ReadOnlyDirectoryServerCollection.cs
+System.DirectoryServices.ActiveDirectory/ReadOnlySiteCollection.cs
+System.DirectoryServices.ActiveDirectory/ReadOnlySiteLinkBridgeCollection.cs
+System.DirectoryServices.ActiveDirectory/ReadOnlySiteLinkCollection.cs
+System.DirectoryServices.ActiveDirectory/ReadOnlyStringCollection.cs
+System.DirectoryServices.ActiveDirectory/ReplicationConnection.cs
+System.DirectoryServices.ActiveDirectory/ReplicationConnectionCollection.cs
+System.DirectoryServices.ActiveDirectory/ReplicationCursor.cs
+System.DirectoryServices.ActiveDirectory/ReplicationCursorCollection.cs
+System.DirectoryServices.ActiveDirectory/ReplicationFailure.cs
+System.DirectoryServices.ActiveDirectory/ReplicationFailureCollection.cs
+System.DirectoryServices.ActiveDirectory/ReplicationNeighbor.cs
+System.DirectoryServices.ActiveDirectory/ReplicationNeighborCollection.cs
+System.DirectoryServices.ActiveDirectory/ReplicationOperation.cs
+System.DirectoryServices.ActiveDirectory/ReplicationOperationCollection.cs
+System.DirectoryServices.ActiveDirectory/ReplicationOperationInformation.cs
+System.DirectoryServices.ActiveDirectory/ReplicationOperationType.cs
+System.DirectoryServices.ActiveDirectory/ReplicationSecurityLevel.cs
+System.DirectoryServices.ActiveDirectory/ReplicationSpan.cs
+System.DirectoryServices.ActiveDirectory/SchemaClassType.cs
+System.DirectoryServices.ActiveDirectory/SecurityMasks.cs
+System.DirectoryServices.ActiveDirectory/SyncFromAllServersErrorCategory.cs
+System.DirectoryServices.ActiveDirectory/SyncFromAllServersErrorInformation.cs
+System.DirectoryServices.ActiveDirectory/SyncFromAllServersEvent.cs
+System.DirectoryServices.ActiveDirectory/SyncFromAllServersOperationException.cs
+System.DirectoryServices.ActiveDirectory/SyncFromAllServersOptions.cs
+System.DirectoryServices.ActiveDirectory/SyncUpdateCallback.cs
+System.DirectoryServices.ActiveDirectory/TopLevelNameCollisionOptions.cs
+System.DirectoryServices.ActiveDirectory/TopLevelName.cs
+System.DirectoryServices.ActiveDirectory/TopLevelNameCollection.cs
+System.DirectoryServices.ActiveDirectory/TopLevelNameStatus.cs
+System.DirectoryServices.ActiveDirectory/TrustDirection.cs
+System.DirectoryServices.ActiveDirectory/TrustRelationshipInformation.cs
+System.DirectoryServices.ActiveDirectory/TrustRelationshipInformationCollection.cs
+System.DirectoryServices.ActiveDirectory/TrustType.cs
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices/ActiveDirectoryAccessRule.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices/ActiveDirectoryAccessRule.cs
new file mode 100644
index 00000000000..9c854734743
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices/ActiveDirectoryAccessRule.cs
@@ -0,0 +1,75 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+
+using System;
+using System.Security.AccessControl;
+using System.Security.Principal;
+
+namespace System.DirectoryServices
+{
+ public class ActiveDirectoryAccessRule : ObjectAccessRule
+ {
+ public ActiveDirectoryRights ActiveDirectoryRights
+ {
+ get
+ {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySecurityInheritance InheritanceType
+ {
+ get
+ {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type) : this(identity, (int)adRights, type, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, Guid objectType) : this(identity, (int)adRights, type, objectType, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, ActiveDirectorySecurityInheritance inheritanceType) : this(identity, (int)adRights, type, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, Guid objectType, ActiveDirectorySecurityInheritance inheritanceType) : this(identity, (int)adRights, type, objectType, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType) : this(identity, (int)adRights, type, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
+ {
+ }
+
+ public ActiveDirectoryAccessRule(IdentityReference identity, ActiveDirectoryRights adRights, AccessControlType type, Guid objectType, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType) : this(identity, (int)adRights, type, objectType, false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
+ {
+ }
+
+ internal ActiveDirectoryAccessRule(IdentityReference identity, int accessMask, AccessControlType type, Guid objectType, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, Guid inheritedObjectType) : base(identity, accessMask, isInherited, inheritanceFlags, propagationFlags, objectType, inheritedObjectType, type)
+ {
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices/ActiveDirectoryAuditRule.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices/ActiveDirectoryAuditRule.cs
new file mode 100644
index 00000000000..879ed08fe77
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices/ActiveDirectoryAuditRule.cs
@@ -0,0 +1,75 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+
+using System;
+using System.Security.AccessControl;
+using System.Security.Principal;
+
+namespace System.DirectoryServices
+{
+ public class ActiveDirectoryAuditRule : ObjectAuditRule
+ {
+ public ActiveDirectoryRights ActiveDirectoryRights
+ {
+ get
+ {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectorySecurityInheritance InheritanceType
+ {
+ get
+ {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags) : this(identity, (int)adRights, auditFlags, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags, Guid objectType) : this(identity, (int)adRights, auditFlags, objectType, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags, ActiveDirectorySecurityInheritance inheritanceType) : this(identity, (int)adRights, auditFlags, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags, Guid objectType, ActiveDirectorySecurityInheritance inheritanceType) : this(identity, (int)adRights, auditFlags, objectType, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType) : this(identity, (int)adRights, auditFlags, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
+ {
+ }
+
+ public ActiveDirectoryAuditRule(IdentityReference identity, ActiveDirectoryRights adRights, AuditFlags auditFlags, Guid objectType, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType) : this(identity, (int)adRights, auditFlags, objectType, false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
+ {
+ }
+
+ internal ActiveDirectoryAuditRule(IdentityReference identity, int accessMask, AuditFlags auditFlags, Guid objectGuid, bool isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, Guid inheritedObjectType) : base(identity, accessMask, isInherited, inheritanceFlags, propagationFlags, objectGuid, inheritedObjectType, auditFlags)
+ {
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices/ActiveDirectoryRights.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices/ActiveDirectoryRights.cs
new file mode 100644
index 00000000000..d8c994e4d0f
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices/ActiveDirectoryRights.cs
@@ -0,0 +1,50 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+
+using System;
+
+namespace System.DirectoryServices
+{
+ [Flags]
+ public enum ActiveDirectoryRights
+ {
+ Delete = 65536,
+ ReadControl = 131072,
+ WriteDacl = 262144,
+ WriteOwner = 524288,
+ Synchronize = 1048576,
+ AccessSystemSecurity = 16777216,
+ GenericRead = 131220,
+ GenericWrite = 131112,
+ GenericExecute = 131076,
+ GenericAll = 983551,
+ CreateChild = 1,
+ DeleteChild = 2,
+ ListChildren = 4,
+ Self = 8,
+ ReadProperty = 16,
+ WriteProperty = 32,
+ DeleteTree = 64,
+ ListObject = 128,
+ ExtendedRight = 256
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices/ActiveDirectorySecurityInheritance.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices/ActiveDirectorySecurityInheritance.cs
new file mode 100644
index 00000000000..68538713c95
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices/ActiveDirectorySecurityInheritance.cs
@@ -0,0 +1,35 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+
+using System;
+
+namespace System.DirectoryServices
+{
+ public enum ActiveDirectorySecurityInheritance
+ {
+ None,
+ All,
+ Descendents,
+ SelfAndChildren,
+ Children
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices/DirectoryServicesCOMException.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices/DirectoryServicesCOMException.cs
new file mode 100644
index 00000000000..c1634493c0d
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices/DirectoryServicesCOMException.cs
@@ -0,0 +1,66 @@
+/******************************************************************************
+* The MIT License
+*
+* 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.Runtime.InteropServices;
+using System.Runtime.Serialization;
+using System.Security.Permissions;
+
+namespace System.DirectoryServices
+{
+ [Serializable]
+ public class DirectoryServicesCOMException : COMException, ISerializable
+ {
+ public int ExtendedError {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string ExtendedErrorMessage {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DirectoryServicesCOMException ()
+ {
+ }
+
+ public DirectoryServicesCOMException (string message) : base(message)
+ {
+ }
+
+ public DirectoryServicesCOMException (string message, Exception inner) : base(message, inner)
+ {
+ }
+
+ protected DirectoryServicesCOMException (SerializationInfo info, StreamingContext context) : base(info, context)
+ {
+ }
+
+ [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
+ public override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices/DirectorySynchronization.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices/DirectorySynchronization.cs
new file mode 100644
index 00000000000..2602807d0f6
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices/DirectorySynchronization.cs
@@ -0,0 +1,78 @@
+/******************************************************************************
+* The MIT License
+*
+* 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.ComponentModel;
+
+namespace System.DirectoryServices
+{
+ public class DirectorySynchronization
+ {
+ [DefaultValue(DirectorySynchronizationOptions.None), DSDescription("DSDirectorySynchronizationFlag")]
+ public DirectorySynchronizationOptions Option {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DirectorySynchronization ()
+ {
+ }
+
+ public DirectorySynchronization (DirectorySynchronizationOptions option)
+ {
+ }
+
+ public DirectorySynchronization (DirectorySynchronization sync)
+ {
+ }
+
+ public DirectorySynchronization (byte[] cookie)
+ {
+ }
+
+ public DirectorySynchronization (DirectorySynchronizationOptions option, byte[] cookie)
+ {
+ }
+
+ public byte[] GetDirectorySynchronizationCookie ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public void ResetDirectorySynchronizationCookie ()
+ {
+ }
+
+ public void ResetDirectorySynchronizationCookie (byte[] cookie)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public DirectorySynchronization Copy ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices/DirectorySynchronizationOptions.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices/DirectorySynchronizationOptions.cs
new file mode 100644
index 00000000000..a696064d4c6
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices/DirectorySynchronizationOptions.cs
@@ -0,0 +1,34 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+namespace System.DirectoryServices
+{
+ [Flags]
+ public enum DirectorySynchronizationOptions : long
+ {
+ None = 0L,
+ ObjectSecurity = 1L,
+ ParentsFirst = 2048L,
+ PublicDataOnly = 8192L,
+ IncrementalValues = 2147483648L
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices/DirectoryVirtualListView.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices/DirectoryVirtualListView.cs
new file mode 100644
index 00000000000..92aa0769a6c
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices/DirectoryVirtualListView.cs
@@ -0,0 +1,126 @@
+/******************************************************************************
+* The MIT License
+*
+* 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.ComponentModel;
+
+namespace System.DirectoryServices
+{
+ public class DirectoryVirtualListView
+ {
+ [DefaultValue(0), DSDescription("DSBeforeCount")]
+ public int BeforeCount {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ [DefaultValue(0), DSDescription("DSAfterCount")]
+ public int AfterCount {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ [DefaultValue(0), DSDescription("DSOffset")]
+ public int Offset {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ [DefaultValue(0), DSDescription("DSTargetPercentage")]
+ public int TargetPercentage {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ [DefaultValue("")]
+ [TypeConverter ("System.Diagnostics.Design.StringValueConverter, " + Consts.AssemblySystem_Design)]
+ [DSDescription("DSTarget")]
+ public string Target {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ [DefaultValue(0), DSDescription("DSApproximateTotal")]
+ public int ApproximateTotal {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ [DefaultValue(null), DSDescription("DSDirectoryVirtualListViewContext")]
+ public DirectoryVirtualListViewContext DirectoryVirtualListViewContext {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public DirectoryVirtualListView ()
+ {
+ }
+
+ public DirectoryVirtualListView (int afterCount)
+ {
+
+ }
+
+ public DirectoryVirtualListView (int beforeCount, int afterCount, int offset)
+ {
+ }
+
+ public DirectoryVirtualListView (int beforeCount, int afterCount, string target)
+ {
+ }
+
+ public DirectoryVirtualListView (int beforeCount, int afterCount, int offset, DirectoryVirtualListViewContext context)
+ {
+ }
+
+ public DirectoryVirtualListView (int beforeCount, int afterCount, string target, DirectoryVirtualListViewContext context)
+ {
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices/DirectoryVirtualListViewContext.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices/DirectoryVirtualListViewContext.cs
new file mode 100644
index 00000000000..809fe2f510f
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices/DirectoryVirtualListViewContext.cs
@@ -0,0 +1,36 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+namespace System.DirectoryServices
+{
+ public class DirectoryVirtualListViewContext
+ {
+ public DirectoryVirtualListViewContext ()
+ {
+ }
+
+ public DirectoryVirtualListViewContext Copy ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices/ExtendedDN.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices/ExtendedDN.cs
new file mode 100644
index 00000000000..fb1a93e159c
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices/ExtendedDN.cs
@@ -0,0 +1,31 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+namespace System.DirectoryServices
+{
+ public enum ExtendedDN
+ {
+ None = -1,
+ HexString,
+ Standard
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices/ExtendedRightAccessRule.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices/ExtendedRightAccessRule.cs
new file mode 100644
index 00000000000..742d15f18ab
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices/ExtendedRightAccessRule.cs
@@ -0,0 +1,54 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+using System.Security.AccessControl;
+using System.Security.Principal;
+
+namespace System.DirectoryServices
+{
+ public sealed class ExtendedRightAccessRule : ActiveDirectoryAccessRule
+ {
+ public ExtendedRightAccessRule (IdentityReference identity, AccessControlType type) : base(identity, 256, type, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public ExtendedRightAccessRule (IdentityReference identity, AccessControlType type, Guid extendedRightType) : base(identity, 256, type, extendedRightType, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public ExtendedRightAccessRule (IdentityReference identity, AccessControlType type, ActiveDirectorySecurityInheritance inheritanceType) : base(identity, 256, type, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public ExtendedRightAccessRule (IdentityReference identity, AccessControlType type, Guid extendedRightType, ActiveDirectorySecurityInheritance inheritanceType) : base(identity, 256, type, extendedRightType, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public ExtendedRightAccessRule (IdentityReference identity, AccessControlType type, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType) : base(identity, 256, type, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
+ {
+ }
+
+ public ExtendedRightAccessRule (IdentityReference identity, AccessControlType type, Guid extendedRightType, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType) : base(identity, 256, type, extendedRightType, false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
+ {
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices/ListChildrenAccessRule.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices/ListChildrenAccessRule.cs
new file mode 100644
index 00000000000..03ef8763c21
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices/ListChildrenAccessRule.cs
@@ -0,0 +1,42 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+using System.Security.AccessControl;
+using System.Security.Principal;
+
+namespace System.DirectoryServices
+{
+ public sealed class ListChildrenAccessRule : ActiveDirectoryAccessRule
+ {
+ public ListChildrenAccessRule (IdentityReference identity, AccessControlType type) : base(identity, 4, type, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public ListChildrenAccessRule (IdentityReference identity, AccessControlType type, ActiveDirectorySecurityInheritance inheritanceType) : base(identity, 4, type, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public ListChildrenAccessRule (IdentityReference identity, AccessControlType type, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType) : base(identity, 4, type, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
+ {
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices/PasswordEncodingMethod.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices/PasswordEncodingMethod.cs
new file mode 100644
index 00000000000..4c5224e565f
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices/PasswordEncodingMethod.cs
@@ -0,0 +1,30 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+namespace System.DirectoryServices
+{
+ public enum PasswordEncodingMethod
+ {
+ PasswordEncodingSsl,
+ PasswordEncodingClear
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices/PropertyAccess.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices/PropertyAccess.cs
new file mode 100644
index 00000000000..54fc88c5236
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices/PropertyAccess.cs
@@ -0,0 +1,30 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+namespace System.DirectoryServices
+{
+ public enum PropertyAccess
+ {
+ Read,
+ Write
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices/PropertyAccessRule.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices/PropertyAccessRule.cs
new file mode 100644
index 00000000000..c890cc49adf
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices/PropertyAccessRule.cs
@@ -0,0 +1,54 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+using System.Security.AccessControl;
+using System.Security.Principal;
+
+namespace System.DirectoryServices
+{
+ public sealed class PropertyAccessRule : ActiveDirectoryAccessRule
+ {
+ public PropertyAccessRule (IdentityReference identity, AccessControlType type, PropertyAccess access) : base(identity, (int)AccessControlType.Allow, type, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public PropertyAccessRule (IdentityReference identity, AccessControlType type, PropertyAccess access, Guid propertyType) : base(identity, (int)AccessControlType.Allow, type, propertyType, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public PropertyAccessRule (IdentityReference identity, AccessControlType type, PropertyAccess access, ActiveDirectorySecurityInheritance inheritanceType) : base(identity, (int)AccessControlType.Allow, type, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public PropertyAccessRule (IdentityReference identity, AccessControlType type, PropertyAccess access, Guid propertyType, ActiveDirectorySecurityInheritance inheritanceType) : base(identity, (int)AccessControlType.Allow, type, propertyType, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public PropertyAccessRule (IdentityReference identity, AccessControlType type, PropertyAccess access, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType) : base(identity, (int)AccessControlType.Allow, type, Guid.Empty, false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
+ {
+ }
+
+ public PropertyAccessRule (IdentityReference identity, AccessControlType type, PropertyAccess access, Guid propertyType, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType) : base(identity, (int)AccessControlType.Allow, type, propertyType, false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
+ {
+ }
+ }
+}
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices/PropertySetAccessRule.cs b/mcs/class/System.DirectoryServices/System.DirectoryServices/PropertySetAccessRule.cs
new file mode 100644
index 00000000000..ab5455b34fb
--- /dev/null
+++ b/mcs/class/System.DirectoryServices/System.DirectoryServices/PropertySetAccessRule.cs
@@ -0,0 +1,42 @@
+/******************************************************************************
+* The MIT License
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the Software), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+* SOFTWARE.
+*******************************************************************************/
+using System;
+using System.Security.AccessControl;
+using System.Security.Principal;
+
+namespace System.DirectoryServices
+{
+ public sealed class PropertySetAccessRule : ActiveDirectoryAccessRule
+ {
+ public PropertySetAccessRule (IdentityReference identity, AccessControlType type, PropertyAccess access, Guid propertySetType) : base(identity, (int)AccessControlType.Allow, type, propertySetType, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public PropertySetAccessRule (IdentityReference identity, AccessControlType type, PropertyAccess access, Guid propertySetType, ActiveDirectorySecurityInheritance inheritanceType) : base(identity, (int)AccessControlType.Allow, type, propertySetType, false, InheritanceFlags.None, PropagationFlags.None, Guid.Empty)
+ {
+ }
+
+ public PropertySetAccessRule (IdentityReference identity, AccessControlType type, PropertyAccess access, Guid propertySetType, ActiveDirectorySecurityInheritance inheritanceType, Guid inheritedObjectType) : base(identity, (int)AccessControlType.Allow, type, propertySetType, false, InheritanceFlags.None, PropagationFlags.None, inheritedObjectType)
+ {
+ }
+ }
+}
diff --git a/mcs/class/System.Drawing/System.Drawing/Font.cs b/mcs/class/System.Drawing/System.Drawing/Font.cs
index 6b16e44addc..02f601566de 100644
--- a/mcs/class/System.Drawing/System.Drawing/Font.cs
+++ b/mcs/class/System.Drawing/System.Drawing/Font.cs
@@ -176,7 +176,7 @@ namespace System.Drawing
}
}
- internal void setProperties (FontFamily family, float emSize, FontStyle style, GraphicsUnit unit, byte charSet, bool isVertical)
+ void setProperties (FontFamily family, float emSize, FontStyle style, GraphicsUnit unit, byte charSet, bool isVertical)
{
_name = family.Name;
_fontFamily = family;
@@ -548,10 +548,24 @@ namespace System.Drawing
return false;
}
+ private int _hashCode;
+
public override int GetHashCode ()
{
- return _name.GetHashCode () ^ FontFamily.GetHashCode () ^ _size.GetHashCode () ^ _style.GetHashCode () ^
- _gdiCharSet ^ _gdiVerticalFont.GetHashCode ();
+ if (_hashCode == 0) {
+ _hashCode = 17;
+ unchecked {
+ _hashCode = _hashCode * 23 + _name.GetHashCode();
+ _hashCode = _hashCode * 23 + FontFamily.GetHashCode();
+ _hashCode = _hashCode * 23 + _size.GetHashCode();
+ _hashCode = _hashCode * 23 + _unit.GetHashCode();
+ _hashCode = _hashCode * 23 + _style.GetHashCode();
+ _hashCode = _hashCode * 23 + _gdiCharSet;
+ _hashCode = _hashCode * 23 + _gdiVerticalFont.GetHashCode();
+ }
+ }
+
+ return _hashCode;
}
[MonoTODO ("The hdc parameter has no direct equivalent in libgdiplus.")]
diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs
index 7a849550dd4..6bdec491069 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs
@@ -631,5 +631,35 @@ namespace MonoTests.System.Drawing{
Assert.IsFalse (f1.GetHashCode () == f2.GetHashCode (), "1) Fonts with different sizes should have different HashCodes");
Assert.IsFalse (f1.GetHashCode () == f3.GetHashCode (), "2) Fonts with different styles should have different HashCodes");
}
+
+ [Test]
+ public void GetHashCode_UnitDiffers_HashesNotEqual()
+ {
+ Font f1 = new Font("DejaVu Sans", 8.25F, GraphicsUnit.Point);
+ Font f2 = new Font("DejaVu Sans", 8.25F, GraphicsUnit.Pixel);
+
+ Assert.IsFalse(f1.GetHashCode() == f2.GetHashCode(),
+ "Hashcodes should differ if _unit member differs");
+ }
+
+ [Test]
+ public void GetHashCode_NameDiffers_HashesNotEqual()
+ {
+ Font f1 = new Font("DejaVu Sans", 8.25F, GraphicsUnit.Point);
+ Font f2 = new Font("Liberation Sans", 8.25F, GraphicsUnit.Point);
+
+ Assert.IsFalse(f1.GetHashCode() == f2.GetHashCode(),
+ "Hashcodes should differ if _name member differs");
+ }
+
+ [Test]
+ public void GetHashCode_StyleEqualsGdiCharSet_HashesNotEqual()
+ {
+ Font f1 = new Font("DejaVu Sans", 8.25F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
+ Font f2 = new Font("DejaVu Sans", 8.25F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(1)));
+
+ Assert.IsFalse(f1.GetHashCode() == f2.GetHashCode(),
+ "Hashcodes should differ if _style member differs");
+ }
}
}
diff --git a/mcs/class/System.Interactive.Async/Assembly/AssemblyInfo.cs b/mcs/class/System.Interactive.Async/Assembly/AssemblyInfo.cs
new file mode 100644
index 00000000000..9db583dd8ca
--- /dev/null
+++ b/mcs/class/System.Interactive.Async/Assembly/AssemblyInfo.cs
@@ -0,0 +1,2 @@
+[assembly:System.Reflection.AssemblyVersion ("2.1.30214.0")]
+[assembly:System.Reflection.AssemblyFileVersion ("2.1.30214.0")]
diff --git a/mcs/class/System.Interactive.Async/Makefile b/mcs/class/System.Interactive.Async/Makefile
new file mode 100644
index 00000000000..4305b344dec
--- /dev/null
+++ b/mcs/class/System.Interactive.Async/Makefile
@@ -0,0 +1,37 @@
+thisdir = class/System.Interactive.Async
+SUBDIRS =
+include ../../build/rules.make
+
+LIBRARY = System.Interactive.Async.dll
+LIB_MCS_FLAGS = \
+ @more_build_args \
+ -r:System.dll \
+ -r:System.Core.dll
+
+ifeq (2.1, $(FRAMEWORK_VERSION))
+LIB_MCS_FLAGS += -d:NO_TASK_DELAY -d:HAS_AWAIT
+endif
+
+NET_4_5 := $(filter 4.5, $(FRAMEWORK_VERSION))
+ifdef NET_4_5
+LIB_MCS_FLAGS += -d:HAS_EDI -d:PREFERASYNC -d:PREFER_ASYNC -d:HAS_AWAIT
+endif
+
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
+
+EXTRA_DISTFILES = more_build_args
+
+VALID_PROFILE := $(filter monotouch monodroid net_4_0 net_4_5, $(PROFILE))
+ifndef VALID_PROFILE
+LIBRARY_NAME = dummy-System.System.Interactive.Async.dll
+NO_SIGN_ASSEMBLY = yes
+endif
+
+INSTALL_PROFILE := $(filter net_4_5, $(PROFILE))
+ifndef INSTALL_PROFILE
+NO_INSTALL = yes
+endif
+
+NO_TEST = yes
+
+include ../../build/library.make
diff --git a/mcs/class/System.Interactive.Async/System.Interactive.Async.dll.sources b/mcs/class/System.Interactive.Async/System.Interactive.Async.dll.sources
new file mode 100644
index 00000000000..cf0926eca46
--- /dev/null
+++ b/mcs/class/System.Interactive.Async/System.Interactive.Async.dll.sources
@@ -0,0 +1,17 @@
+Assembly/AssemblyInfo.cs
+../../../external/rx/Ix/NET/System.Interactive.Async/AsyncEnumerable.Conversions.cs
+../../../external/rx/Ix/NET/System.Interactive.Async/AsyncEnumerable.Creation.cs
+../../../external/rx/Ix/NET/System.Interactive.Async/AsyncEnumerable.Exceptions.cs
+../../../external/rx/Ix/NET/System.Interactive.Async/AsyncEnumerable.Generated.cs
+../../../external/rx/Ix/NET/System.Interactive.Async/AsyncEnumerable.Single.cs
+../../../external/rx/Ix/NET/System.Interactive.Async/AsyncEnumerable.Multiple.cs
+../../../external/rx/Ix/NET/System.Interactive.Async/AsyncEnumerable.Aggregates.cs
+../../../external/rx/Ix/NET/System.Interactive.Async/AsyncEnumerator.cs
+../../../external/rx/Ix/NET/System.Interactive.Async/Disposables.cs
+../../../external/rx/Ix/NET/System.Interactive.Async/EnumerableGrouping.cs
+../../../external/rx/Ix/NET/System.Interactive.Async/IAsyncEnumerable.cs
+../../../external/rx/Ix/NET/System.Interactive.Async/IAsyncEnumerator.cs
+../../../external/rx/Ix/NET/System.Interactive.Async/IAsyncGrouping.cs
+../../../external/rx/Ix/NET/System.Interactive.Async/IOrderedAsyncEnumerable.cs
+../../../external/rx/Ix/NET/System.Interactive.Async/Properties/AssemblyInfo.cs
+../../../external/rx/Ix/NET/System.Interactive.Async/TaskExt.cs
diff --git a/mcs/class/System.Interactive.Async/more_build_args b/mcs/class/System.Interactive.Async/more_build_args
new file mode 100644
index 00000000000..a53ee7b7f9c
--- /dev/null
+++ b/mcs/class/System.Interactive.Async/more_build_args
@@ -0,0 +1,3 @@
+-d:SIGNED
+-delaysign
+-keyfile:../reactive.pub
diff --git a/mcs/class/System.Interactive.Providers/Assembly/AssemblyInfo.cs b/mcs/class/System.Interactive.Providers/Assembly/AssemblyInfo.cs
new file mode 100644
index 00000000000..9db583dd8ca
--- /dev/null
+++ b/mcs/class/System.Interactive.Providers/Assembly/AssemblyInfo.cs
@@ -0,0 +1,2 @@
+[assembly:System.Reflection.AssemblyVersion ("2.1.30214.0")]
+[assembly:System.Reflection.AssemblyFileVersion ("2.1.30214.0")]
diff --git a/mcs/class/System.Interactive.Providers/Makefile b/mcs/class/System.Interactive.Providers/Makefile
new file mode 100644
index 00000000000..68291088719
--- /dev/null
+++ b/mcs/class/System.Interactive.Providers/Makefile
@@ -0,0 +1,38 @@
+thisdir = class/System.Interactive.Providers
+SUBDIRS =
+include ../../build/rules.make
+
+LIBRARY = System.Interactive.Providers.dll
+LIB_MCS_FLAGS = \
+ @more_build_args \
+ -r:System.dll \
+ -r:System.Core.dll \
+ -r:System.Interactive.dll
+
+ifeq (2.1, $(FRAMEWORK_VERSION))
+LIB_MCS_FLAGS += -d:NO_TASK_DELAY -d:HAS_AWAIT
+endif
+
+NET_4_5 := $(filter 4.5, $(FRAMEWORK_VERSION))
+ifdef NET_4_5
+LIB_MCS_FLAGS += -d:HAS_EDI -d:PREFERASYNC -d:PREFER_ASYNC -d:HAS_AWAIT
+endif
+
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
+
+EXTRA_DISTFILES = more_build_args
+
+VALID_PROFILE := $(filter monotouch monodroid net_4_0 net_4_5, $(PROFILE))
+ifndef VALID_PROFILE
+LIBRARY_NAME = dummy-System.System.Interactive.Providers.dll
+NO_SIGN_ASSEMBLY = yes
+endif
+
+INSTALL_PROFILE := $(filter net_4_5, $(PROFILE))
+ifndef INSTALL_PROFILE
+NO_INSTALL = yes
+endif
+
+NO_TEST = yes
+
+include ../../build/library.make
diff --git a/mcs/class/System.Interactive.Providers/System.Interactive.Providers.dll.sources b/mcs/class/System.Interactive.Providers/System.Interactive.Providers.dll.sources
new file mode 100644
index 00000000000..7052a97f2b1
--- /dev/null
+++ b/mcs/class/System.Interactive.Providers/System.Interactive.Providers.dll.sources
@@ -0,0 +1,3 @@
+Assembly/AssemblyInfo.cs
+../../../external/rx/Ix/NET/System.Interactive.Providers/Properties/AssemblyInfo.cs
+../../../external/rx/Ix/NET/System.Interactive.Providers/QueryableEx.cs
diff --git a/mcs/class/System.Interactive.Providers/more_build_args b/mcs/class/System.Interactive.Providers/more_build_args
new file mode 100644
index 00000000000..a53ee7b7f9c
--- /dev/null
+++ b/mcs/class/System.Interactive.Providers/more_build_args
@@ -0,0 +1,3 @@
+-d:SIGNED
+-delaysign
+-keyfile:../reactive.pub
diff --git a/mcs/class/System.Interactive/Assembly/AssemblyInfo.cs b/mcs/class/System.Interactive/Assembly/AssemblyInfo.cs
new file mode 100644
index 00000000000..9db583dd8ca
--- /dev/null
+++ b/mcs/class/System.Interactive/Assembly/AssemblyInfo.cs
@@ -0,0 +1,2 @@
+[assembly:System.Reflection.AssemblyVersion ("2.1.30214.0")]
+[assembly:System.Reflection.AssemblyFileVersion ("2.1.30214.0")]
diff --git a/mcs/class/System.Interactive/Makefile b/mcs/class/System.Interactive/Makefile
new file mode 100644
index 00000000000..2d6248e7bad
--- /dev/null
+++ b/mcs/class/System.Interactive/Makefile
@@ -0,0 +1,37 @@
+thisdir = class/System.Interactive
+SUBDIRS =
+include ../../build/rules.make
+
+LIBRARY = System.Interactive.dll
+LIB_MCS_FLAGS = \
+ @more_build_args \
+ -r:System.dll \
+ -r:System.Core.dll
+
+ifeq (2.1, $(FRAMEWORK_VERSION))
+LIB_MCS_FLAGS += -d:NO_TASK_DELAY -d:HAS_AWAIT
+endif
+
+NET_4_5 := $(filter 4.5, $(FRAMEWORK_VERSION))
+ifdef NET_4_5
+LIB_MCS_FLAGS += -d:HAS_EDI -d:PREFERASYNC -d:PREFER_ASYNC -d:HAS_AWAIT
+endif
+
+TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
+
+EXTRA_DISTFILES = more_build_args
+
+VALID_PROFILE := $(filter monotouch monodroid net_4_0 net_4_5, $(PROFILE))
+ifndef VALID_PROFILE
+LIBRARY_NAME = dummy-System.System.Interactive.dll
+NO_SIGN_ASSEMBLY = yes
+endif
+
+INSTALL_PROFILE := $(filter net_4_5, $(PROFILE))
+ifndef INSTALL_PROFILE
+NO_INSTALL = yes
+endif
+
+NO_TEST = yes
+
+include ../../build/library.make
diff --git a/mcs/class/System.Interactive/System.Interactive.dll.sources b/mcs/class/System.Interactive/System.Interactive.dll.sources
new file mode 100644
index 00000000000..6500671acf3
--- /dev/null
+++ b/mcs/class/System.Interactive/System.Interactive.dll.sources
@@ -0,0 +1,9 @@
+Assembly/AssemblyInfo.cs
+../../../external/rx/Ix/NET/System.Interactive/EnumerableEx.Imperative.cs
+../../../external/rx/Ix/NET/System.Interactive/EnumerableEx.Multiple.cs
+../../../external/rx/Ix/NET/System.Interactive/EnumerableEx.Single.cs
+../../../external/rx/Ix/NET/System.Interactive/EnumerableEx.Exceptions.cs
+../../../external/rx/Ix/NET/System.Interactive/EnumerableEx.Creation.cs
+../../../external/rx/Ix/NET/System.Interactive/EnumerableEx.Buffering.cs
+../../../external/rx/Ix/NET/System.Interactive/EnumerableEx.Aggregates.cs
+../../../external/rx/Ix/NET/System.Interactive/Properties/AssemblyInfo.cs
diff --git a/mcs/class/System.Interactive/more_build_args b/mcs/class/System.Interactive/more_build_args
new file mode 100644
index 00000000000..a53ee7b7f9c
--- /dev/null
+++ b/mcs/class/System.Interactive/more_build_args
@@ -0,0 +1,3 @@
+-d:SIGNED
+-delaysign
+-keyfile:../reactive.pub
diff --git a/mcs/class/System.Json/Makefile b/mcs/class/System.Json/Makefile
index 906b0bf48f1..8ef352d0aff 100644
--- a/mcs/class/System.Json/Makefile
+++ b/mcs/class/System.Json/Makefile
@@ -6,8 +6,7 @@ LIBRARY = System.Json.dll
LIB_MCS_FLAGS = \
/r:System.dll \
/r:System.Xml.dll \
- /r:System.Core.dll \
- /r:System.ServiceModel.Web.dll
+ /r:System.Core.dll
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
diff --git a/mcs/class/System.Management/System.Management/ManagementQuery.cs b/mcs/class/System.Management/System.Management/ManagementQuery.cs
index 30787704c7e..5e181368cd4 100644
--- a/mcs/class/System.Management/System.Management/ManagementQuery.cs
+++ b/mcs/class/System.Management/System.Management/ManagementQuery.cs
@@ -36,29 +36,43 @@ namespace System.Management
//[TypeConverter ("")]
public abstract class ManagementQuery : ICloneable
{
+ string sQueryLanguage;
+ string sQueryString;
+
internal ManagementQuery ()
{
}
+ internal ManagementQuery (string query)
+ {
+ QueryString = query;
+ }
+
+ internal ManagementQuery (string language, string query)
+ {
+ QueryLanguage = language;
+ QueryString = query;
+ }
+
static ManagementQuery ()
{
}
public virtual string QueryLanguage {
get {
- throw new NotImplementedException ();
+ return sQueryLanguage;
}
set {
- throw new NotImplementedException ();
+ sQueryLanguage = value;
}
}
public virtual string QueryString {
get {
- throw new NotImplementedException ();
+ return sQueryString;
}
set {
- throw new NotImplementedException ();
+ sQueryString = value;
}
}
diff --git a/mcs/class/System.Management/System.Management/ObjectQuery.cs b/mcs/class/System.Management/System.Management/ObjectQuery.cs
index 1dd280223e1..da052f4dfab 100644
--- a/mcs/class/System.Management/System.Management/ObjectQuery.cs
+++ b/mcs/class/System.Management/System.Management/ObjectQuery.cs
@@ -29,27 +29,23 @@
namespace System.Management
{
- [MonoTODO ("System.Management is not implemented")]
public class ObjectQuery : ManagementQuery
{
public ObjectQuery ()
{
- throw new NotImplementedException ();
}
- public ObjectQuery (string query)
+ public ObjectQuery (string query) : base(query)
{
- throw new NotImplementedException ();
}
- public ObjectQuery (string language, string query)
+ public ObjectQuery (string language, string query) : base(language, query)
{
- throw new NotImplementedException ();
}
public override object Clone ()
{
- throw new NotImplementedException ();
+ return new ObjectQuery(this.QueryLanguage, this.QueryString);
}
}
}
diff --git a/mcs/class/System.Net.Http/Makefile b/mcs/class/System.Net.Http/Makefile
index 715fa63120b..ce2e097fee8 100644
--- a/mcs/class/System.Net.Http/Makefile
+++ b/mcs/class/System.Net.Http/Makefile
@@ -4,7 +4,7 @@ include ../../build/rules.make
LIBRARY = System.Net.Http.dll
-LIB_MCS_FLAGS = -r:System.Core.dll -r:System.dll
+LIB_MCS_FLAGS = -r:System.Core.dll -r:System.dll $(EXTRA_LIB_MCS_FLAGS)
TEST_MCS_FLAGS = -r:System.dll -r:System.Core.dll
diff --git a/mcs/class/System.Net.Http/System.Net.Http.Headers/ContentDispositionHeaderValue.cs b/mcs/class/System.Net.Http/System.Net.Http.Headers/ContentDispositionHeaderValue.cs
index 98225b98189..a4d1ae275b4 100644
--- a/mcs/class/System.Net.Http/System.Net.Http.Headers/ContentDispositionHeaderValue.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http.Headers/ContentDispositionHeaderValue.cs
@@ -394,7 +394,7 @@ namespace System.Net.Http.Headers
switch (t.Kind) {
case Token.Type.SeparatorSemicolon:
- if (!NameValueHeaderValue.ParseParameters (lexer, out parameters))
+ if (!NameValueHeaderValue.TryParseParameters (lexer, out parameters))
return false;
break;
case Token.Type.End:
diff --git a/mcs/class/System.Net.Http/System.Net.Http.Headers/HeaderInfo.cs b/mcs/class/System.Net.Http/System.Net.Http.Headers/HeaderInfo.cs
index abbd7464f2f..3772180e52b 100644
--- a/mcs/class/System.Net.Http/System.Net.Http.Headers/HeaderInfo.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http.Headers/HeaderInfo.cs
@@ -50,7 +50,12 @@ namespace System.Net.Http.Headers
Debug.Assert (AllowsMany);
var c = (HttpHeaderValueCollection<U>) collection;
- c.Add ((U) value);
+
+ var list = value as List<U>;
+ if (list != null)
+ c.AddRange (list);
+ else
+ c.Add ((U) value);
}
protected override object CreateCollection (HttpHeaders headers, HeaderInfo headerInfo)
@@ -106,6 +111,13 @@ namespace System.Net.Http.Headers
};
}
+ public static HeaderInfo CreateMultiList<T> (string name, TryParseDelegate<List<T>> parser, HttpHeaderKind headerKind) where T : class
+ {
+ return new HeaderTypeInfo<List<T>, T> (name, parser, headerKind) {
+ AllowsMany = true,
+ };
+ }
+
public object CreateCollection (HttpHeaders headers)
{
return CreateCollection (headers, this);
diff --git a/mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaderValueCollection.cs b/mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaderValueCollection.cs
index e929c599a77..fb024ed81b8 100644
--- a/mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaderValueCollection.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaderValueCollection.cs
@@ -61,6 +61,11 @@ namespace System.Net.Http.Headers
list.Add (item);
}
+ internal void AddRange (List<T> values)
+ {
+ list.AddRange (values);
+ }
+
public void Clear ()
{
list.Clear ();
diff --git a/mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaders.cs b/mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaders.cs
index 55ef3c7fa8b..1dc3affa328 100644
--- a/mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaders.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaders.cs
@@ -117,7 +117,7 @@ namespace System.Net.Http.Headers
HeaderInfo.CreateSingle<DateTimeOffset> ("Last-Modified", Parser.DateTime.TryParse, HttpHeaderKind.Content),
HeaderInfo.CreateSingle<Uri> ("Location", Parser.Uri.TryParse, HttpHeaderKind.Response),
HeaderInfo.CreateSingle<int> ("Max-Forwards", Parser.Int.TryParse, HttpHeaderKind.Request),
- HeaderInfo.CreateMulti<NameValueHeaderValue> ("Pragma", NameValueHeaderValue.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
+ HeaderInfo.CreateMultiList<NameValueHeaderValue> ("Pragma", NameValueHeaderValue.TryParsePragma, HttpHeaderKind.Request | HttpHeaderKind.Response),
HeaderInfo.CreateMulti<AuthenticationHeaderValue> ("Proxy-Authenticate", AuthenticationHeaderValue.TryParse, HttpHeaderKind.Response),
HeaderInfo.CreateSingle<AuthenticationHeaderValue> ("Proxy-Authorization", AuthenticationHeaderValue.TryParse, HttpHeaderKind.Request),
HeaderInfo.CreateSingle<RangeHeaderValue> ("Range", RangeHeaderValue.TryParse, HttpHeaderKind.Request),
@@ -128,7 +128,7 @@ namespace System.Net.Http.Headers
HeaderInfo.CreateMulti<string> ("Trailer", Parser.Token.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
HeaderInfo.CreateMulti<TransferCodingHeaderValue> ("Transfer-Encoding", TransferCodingHeaderValue.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
HeaderInfo.CreateMulti<ProductHeaderValue> ("Upgrade", ProductHeaderValue.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
- HeaderInfo.CreateMulti<ProductInfoHeaderValue> ("User-Agent", ProductInfoHeaderValue.TryParse, HttpHeaderKind.Request),
+ HeaderInfo.CreateMultiList<ProductInfoHeaderValue> ("User-Agent", ProductInfoHeaderValue.TryParse, HttpHeaderKind.Request),
HeaderInfo.CreateMulti<string> ("Vary", Parser.Token.TryParse, HttpHeaderKind.Response),
HeaderInfo.CreateMulti<ViaHeaderValue> ("Via", ViaHeaderValue.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
HeaderInfo.CreateMulti<WarningHeaderValue> ("Warning", WarningHeaderValue.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
diff --git a/mcs/class/System.Net.Http/System.Net.Http.Headers/Lexer.cs b/mcs/class/System.Net.Http/System.Net.Http.Headers/Lexer.cs
index 51950a7a0ab..0f98be658d1 100644
--- a/mcs/class/System.Net.Http/System.Net.Http.Headers/Lexer.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http.Headers/Lexer.cs
@@ -201,17 +201,26 @@ namespace System.Net.Http.Headers
public bool ScanCommentOptional (out string value)
{
- var t = Scan ();
- if (t != Token.Type.OpenParens) {
+ Token t;
+ if (ScanCommentOptional (out value, out t))
+ return true;
+
+ return t == Token.Type.End;
+ }
+
+ public bool ScanCommentOptional (out string value, out Token readToken)
+ {
+ readToken = Scan ();
+ if (readToken != Token.Type.OpenParens) {
value = null;
- return t == Token.Type.End;
+ return false;
}
while (pos < s.Length) {
var ch = s[pos];
if (ch == ')') {
++pos;
- var start = t.StartPosition;
+ var start = readToken.StartPosition;
value = s.Substring (start, pos - start);
return true;
}
diff --git a/mcs/class/System.Net.Http/System.Net.Http.Headers/MediaTypeHeaderValue.cs b/mcs/class/System.Net.Http/System.Net.Http.Headers/MediaTypeHeaderValue.cs
index 042fa7cd2dc..5379a6099f1 100644
--- a/mcs/class/System.Net.Http/System.Net.Http.Headers/MediaTypeHeaderValue.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http.Headers/MediaTypeHeaderValue.cs
@@ -150,7 +150,7 @@ namespace System.Net.Http.Headers
switch (token.Value.Kind) {
case Token.Type.SeparatorSemicolon:
- if (!NameValueHeaderValue.ParseParameters (lexer, out parameters))
+ if (!NameValueHeaderValue.TryParseParameters (lexer, out parameters))
return false;
break;
case Token.Type.End:
@@ -181,7 +181,7 @@ namespace System.Net.Http.Headers
switch (token.Value.Kind) {
case Token.Type.SeparatorSemicolon:
- if (!NameValueHeaderValue.ParseParameters (lexer, out parameters))
+ if (!NameValueHeaderValue.TryParseParameters (lexer, out parameters))
return false;
break;
case Token.Type.End:
diff --git a/mcs/class/System.Net.Http/System.Net.Http.Headers/NameValueHeaderValue.cs b/mcs/class/System.Net.Http/System.Net.Http.Headers/NameValueHeaderValue.cs
index 03bcab48c9d..906ab3aa657 100644
--- a/mcs/class/System.Net.Http/System.Net.Http.Headers/NameValueHeaderValue.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http.Headers/NameValueHeaderValue.cs
@@ -121,8 +121,18 @@ namespace System.Net.Http.Headers
throw new FormatException (input);
}
- internal static bool ParseParameters (Lexer lexer, out List<NameValueHeaderValue> result)
+ internal static bool TryParseParameters (Lexer lexer, out List<NameValueHeaderValue> result)
{
+ return TryParseCollection (lexer, out result, Token.Type.SeparatorSemicolon);
+ }
+
+ internal static bool TryParsePragma (string input, out List<NameValueHeaderValue> result)
+ {
+ return TryParseCollection (new Lexer (input), out result, Token.Type.SeparatorComma);
+ }
+
+ static bool TryParseCollection (Lexer lexer, out List<NameValueHeaderValue> result, Token.Type separator)
+ {
var list = new List<NameValueHeaderValue> ();
result = null;
@@ -146,7 +156,7 @@ namespace System.Net.Http.Headers
t = lexer.Scan ();
}
- if (t == Token.Type.SeparatorSemicolon || t == Token.Type.End) {
+ if (t == separator|| t == Token.Type.End) {
list.Add (new NameValueHeaderValue () {
Name = lexer.GetStringValue (attr),
value = value
@@ -155,7 +165,7 @@ namespace System.Net.Http.Headers
return false;
}
- } while (t == Token.Type.SeparatorSemicolon);
+ } while (t == separator);
result = list;
return true;
diff --git a/mcs/class/System.Net.Http/System.Net.Http.Headers/NameValueWithParametersHeaderValue.cs b/mcs/class/System.Net.Http/System.Net.Http.Headers/NameValueWithParametersHeaderValue.cs
index e9c1e1e1e0c..81d7bb089c1 100644
--- a/mcs/class/System.Net.Http/System.Net.Http.Headers/NameValueWithParametersHeaderValue.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http.Headers/NameValueWithParametersHeaderValue.cs
@@ -103,7 +103,7 @@ namespace System.Net.Http.Headers
public static bool TryParse (string input, out NameValueWithParametersHeaderValue parsedValue)
{
List<NameValueHeaderValue> values;
- if (!ParseParameters (new Lexer (input), out values)) {
+ if (!TryParseParameters (new Lexer (input), out values)) {
parsedValue = null;
return false;
}
diff --git a/mcs/class/System.Net.Http/System.Net.Http.Headers/ProductHeaderValue.cs b/mcs/class/System.Net.Http/System.Net.Http.Headers/ProductHeaderValue.cs
index d95ec3ab412..306c9f228c8 100644
--- a/mcs/class/System.Net.Http/System.Net.Http.Headers/ProductHeaderValue.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http.Headers/ProductHeaderValue.cs
@@ -45,12 +45,12 @@ namespace System.Net.Http.Headers
Version = version;
}
- private ProductHeaderValue ()
+ internal ProductHeaderValue ()
{
}
- public string Name { get; private set; }
- public string Version { get; private set; }
+ public string Name { get; internal set; }
+ public string Version { get; internal set; }
object ICloneable.Clone ()
{
diff --git a/mcs/class/System.Net.Http/System.Net.Http.Headers/ProductInfoHeaderValue.cs b/mcs/class/System.Net.Http/System.Net.Http.Headers/ProductInfoHeaderValue.cs
index 0c4d12802a9..daf47ac31e8 100644
--- a/mcs/class/System.Net.Http/System.Net.Http.Headers/ProductInfoHeaderValue.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http.Headers/ProductInfoHeaderValue.cs
@@ -26,6 +26,8 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Collections.Generic;
+
namespace System.Net.Http.Headers
{
public class ProductInfoHeaderValue : ICloneable
@@ -93,9 +95,44 @@ namespace System.Net.Http.Headers
parsedValue = null;
var lexer = new Lexer (input);
+ if (!TryParseElement (lexer, out parsedValue) || parsedValue == null)
+ return false;
+
+ if (lexer.Scan () != Token.Type.End) {
+ parsedValue = null;
+ return false;
+ }
+
+ return true;
+ }
+
+ internal static bool TryParse (string input, out List<ProductInfoHeaderValue> result)
+ {
+ var list = new List<ProductInfoHeaderValue> ();
+ var lexer = new Lexer (input);
+ result = null;
+
+ while (true) {
+ ProductInfoHeaderValue element;
+ if (!TryParseElement (lexer, out element))
+ return false;
+
+ if (element == null) {
+ result = list;
+ return true;
+ }
+
+ list.Add (element);
+ }
+ }
+
+ static bool TryParseElement (Lexer lexer, out ProductInfoHeaderValue parsedValue)
+ {
string comment;
+ parsedValue = null;
+ Token t;
- if (lexer.ScanCommentOptional (out comment)) {
+ if (lexer.ScanCommentOptional (out comment, out t)) {
if (comment == null)
return false;
@@ -104,11 +141,25 @@ namespace System.Net.Http.Headers
return true;
}
- ProductHeaderValue res;
- if (!ProductHeaderValue.TryParse (input, out res))
+ if (t == Token.Type.End)
+ return true;
+
+ if (t != Token.Type.Token)
return false;
- parsedValue = new ProductInfoHeaderValue (res);
+ var value = new ProductHeaderValue ();
+ value.Name = lexer.GetStringValue (t);
+
+ t = lexer.Scan ();
+ if (t == Token.Type.SeparatorSlash) {
+ t = lexer.Scan ();
+ if (t != Token.Type.Token)
+ return false;
+
+ value.Version = lexer.GetStringValue (t);
+ }
+
+ parsedValue = new ProductInfoHeaderValue (value);
return true;
}
diff --git a/mcs/class/System.Net.Http/System.Net.Http.Headers/TransferCodingHeaderValue.cs b/mcs/class/System.Net.Http/System.Net.Http.Headers/TransferCodingHeaderValue.cs
index ef2cd182545..8f0db592831 100644
--- a/mcs/class/System.Net.Http/System.Net.Http.Headers/TransferCodingHeaderValue.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http.Headers/TransferCodingHeaderValue.cs
@@ -125,7 +125,7 @@ namespace System.Net.Http.Headers
// Parameters parsing
if (t == Token.Type.SeparatorSemicolon) {
- if (!NameValueHeaderValue.ParseParameters (lexer, out result.parameters))
+ if (!NameValueHeaderValue.TryParseParameters (lexer, out result.parameters))
return false;
} else if (t != Token.Type.End) {
return false;
diff --git a/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs b/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs
index 720fc6812a6..354dba96bf7 100644
--- a/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs
@@ -247,7 +247,8 @@ namespace System.Net.Http
wr.PreAuthenticate = preAuthenticate;
if (useCookies) {
- wr.CookieContainer = cookieContainer;
+ // It cannot be null or allowAutoRedirect won't work
+ wr.CookieContainer = CookieContainer;
}
if (useDefaultCredentials) {
@@ -271,12 +272,12 @@ namespace System.Net.Http
return wr;
}
- HttpResponseMessage CreateResponseMessage (HttpWebResponse wr, HttpRequestMessage requestMessage)
+ HttpResponseMessage CreateResponseMessage (HttpWebResponse wr, HttpRequestMessage requestMessage, CancellationToken cancellationToken)
{
var response = new HttpResponseMessage (wr.StatusCode);
response.RequestMessage = requestMessage;
response.ReasonPhrase = wr.StatusDescription;
- response.Content = new StreamContent (wr.GetResponseStream ());
+ response.Content = new StreamContent (wr.GetResponseStream (), cancellationToken);
var headers = wr.Headers;
for (int i = 0; i < headers.Count; ++i) {
@@ -312,9 +313,23 @@ namespace System.Net.Http
await request.Content.CopyToAsync (stream).ConfigureAwait (false);
}
- // FIXME: GetResponseAsync does not accept cancellationToken
- var wresponse = (HttpWebResponse) await wrequest.GetResponseAsync ().ConfigureAwait (false);
- return CreateResponseMessage (wresponse, request);
+ HttpWebResponse wresponse = null;
+ using (cancellationToken.Register (l => ((HttpWebRequest) l).Abort (), wrequest)) {
+ try {
+ wresponse = (HttpWebResponse) await wrequest.GetResponseAsync ().ConfigureAwait (false);
+ } catch (WebException we) {
+ if (we.Status != WebExceptionStatus.RequestCanceled)
+ throw;
+ }
+
+ if (cancellationToken.IsCancellationRequested) {
+ var cancelled = new TaskCompletionSource<HttpResponseMessage> ();
+ cancelled.SetCanceled ();
+ return await cancelled.Task;
+ }
+ }
+
+ return CreateResponseMessage (wresponse, request, cancellationToken);
}
}
}
diff --git a/mcs/class/System.Net.Http/System.Net.Http/HttpContent.cs b/mcs/class/System.Net.Http/System.Net.Http/HttpContent.cs
index 40cbde3a6ab..021f2e9b0d9 100644
--- a/mcs/class/System.Net.Http/System.Net.Http/HttpContent.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http/HttpContent.cs
@@ -119,7 +119,7 @@ namespace System.Net.Http
public Task LoadIntoBufferAsync ()
{
- return LoadIntoBufferAsync (65536);
+ return LoadIntoBufferAsync (int.MaxValue);
}
public async Task LoadIntoBufferAsync (long maxBufferSize)
diff --git a/mcs/class/System.Net.Http/System.Net.Http/StreamContent.cs b/mcs/class/System.Net.Http/System.Net.Http/StreamContent.cs
index 9dabf983b67..a249aad6f5b 100644
--- a/mcs/class/System.Net.Http/System.Net.Http/StreamContent.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http/StreamContent.cs
@@ -27,6 +27,7 @@
//
using System.IO;
+using System.Threading;
using System.Threading.Tasks;
namespace System.Net.Http
@@ -35,6 +36,7 @@ namespace System.Net.Http
{
readonly Stream content;
readonly int bufferSize;
+ readonly CancellationToken cancellationToken;
public StreamContent (Stream content)
: this (content, 16 * 1024)
@@ -53,6 +55,18 @@ namespace System.Net.Http
this.bufferSize = bufferSize;
}
+ //
+ // Workarounds for poor .NET API
+ // Instead of having SerializeToStreamAsync with CancellationToken as public API. Only LoadIntoBufferAsync
+ // called internally from the send worker can be cancelled and user cannot see/do it
+ //
+ internal StreamContent (Stream content, CancellationToken cancellationToken)
+ : this (content)
+ {
+ // We don't own the token so don't worry about disposing it
+ this.cancellationToken = cancellationToken;
+ }
+
protected override Task<Stream> CreateContentReadStreamAsync ()
{
return Task.FromResult (content);
@@ -69,7 +83,7 @@ namespace System.Net.Http
protected internal override Task SerializeToStreamAsync (Stream stream, TransportContext context)
{
- return content.CopyToAsync (stream, bufferSize);
+ return content.CopyToAsync (stream, bufferSize, cancellationToken);
}
protected internal override bool TryComputeLength (out long length)
diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpRequestMessageTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpRequestMessageTest.cs
index 21692ed3b0d..b852fdc05fd 100644
--- a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpRequestMessageTest.cs
+++ b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpRequestMessageTest.cs
@@ -219,6 +219,12 @@ namespace MonoTests.System.Net.Http
} catch (FormatException) {
}
+ try {
+ headers.Add ("pragma", "nocache,RequestID=1,g=");
+ Assert.Fail ("pragma");
+ } catch (FormatException) {
+ }
+
headers.Add ("accept", "audio/y");
headers.Add ("accept-charset", "achs");
headers.Add ("accept-encoding", "aenc");
@@ -226,7 +232,6 @@ namespace MonoTests.System.Net.Http
headers.Add ("expect", "exp");
headers.Add ("if-match", "\"v\"");
headers.Add ("if-none-match", "\"v2\"");
- headers.Add ("pragma", "p");
headers.Add ("TE", "0.8");
headers.Add ("trailer", "value2");
headers.Add ("transfer-encoding", "ttt");
@@ -234,6 +239,7 @@ namespace MonoTests.System.Net.Http
headers.Add ("user-agent", "uaua");
headers.Add ("via", "prot v");
headers.Add ("warning", "4 ww \"t\"");
+ headers.Add ("pragma", "nocache,R=1,g");
Assert.IsTrue (headers.Accept.SequenceEqual (
new[] {
@@ -296,7 +302,6 @@ namespace MonoTests.System.Net.Http
Assert.IsTrue (headers.IfNoneMatch.SequenceEqual (new EntityTagHeaderValue[] { new EntityTagHeaderValue ("\"tag2\"", true), new EntityTagHeaderValue ("\"v2\"", false) }));
Assert.AreEqual (new DateTimeOffset (DateTime.Today), headers.IfRange.Date);
Assert.AreEqual (headers.MaxForwards, 0x15b3);
- Assert.IsTrue (headers.Pragma.SequenceEqual (new NameValueHeaderValue[] { new NameValueHeaderValue ("name", "value"), new NameValueHeaderValue ("p", null) }));
Assert.AreEqual ("p", headers.ProxyAuthorization.Parameter);
Assert.AreEqual ("s", headers.ProxyAuthorization.Scheme);
Assert.AreEqual (5, headers.Range.Ranges.First ().From);
@@ -345,6 +350,37 @@ namespace MonoTests.System.Net.Http
}
));
+ Assert.IsTrue (headers.Pragma.SequenceEqual (
+ new[] {
+ new NameValueHeaderValue ("name", "value"),
+ new NameValueHeaderValue ("nocache", null),
+ new NameValueHeaderValue ("R", "1"),
+ new NameValueHeaderValue ("g", null)
+ }
+ ));
+ }
+
+ [Test]
+ public void Headers_Complex ()
+ {
+ HttpRequestMessage message = new HttpRequestMessage ();
+ HttpRequestHeaders headers = message.Headers;
+
+ headers.Add ("user-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36");
+
+
+ Assert.AreEqual (6, headers.UserAgent.Count);
+
+ Assert.IsTrue (headers.UserAgent.SequenceEqual (
+ new[] {
+ new ProductInfoHeaderValue ("Mozilla", "5.0"),
+ new ProductInfoHeaderValue ("(Macintosh; Intel Mac OS X 10_8_4)"),
+ new ProductInfoHeaderValue ("AppleWebKit", "537.36"),
+ new ProductInfoHeaderValue ("(KHTML, like Gecko)"),
+ new ProductInfoHeaderValue ("Chrome", "29.0.1547.62"),
+ new ProductInfoHeaderValue ("Safari", "537.36")
+ }
+ ));
}
[Test]
diff --git a/mcs/class/System.Net.Http/monotouch_System.Net.Http.dll.sources b/mcs/class/System.Net.Http/monotouch_System.Net.Http.dll.sources
new file mode 100644
index 00000000000..ccca104fd9d
--- /dev/null
+++ b/mcs/class/System.Net.Http/monotouch_System.Net.Http.dll.sources
@@ -0,0 +1,53 @@
+../../build/common/Consts.cs
+Assembly/AssemblyInfo.cs
+System.Net.Http/ByteArrayContent.cs
+System.Net.Http/ClientCertificateOption.cs
+System.Net.Http/DelegatingHandler.cs
+System.Net.Http/FormUrlEncodedContent.cs
+System.Net.Http/HttpClient.cs
+System.Net.Http/HttpClientHandler.cs
+System.Net.Http/HttpCompletionOption.cs
+System.Net.Http/HttpContent.cs
+System.Net.Http/HttpMessageHandler.cs
+System.Net.Http/HttpMessageInvoker.cs
+System.Net.Http/HttpMethod.cs
+System.Net.Http/HttpRequestException.cs
+System.Net.Http/HttpRequestMessage.cs
+System.Net.Http/HttpResponseMessage.cs
+System.Net.Http/MessageProcessingHandler.cs
+System.Net.Http/MultipartContent.cs
+System.Net.Http/MultipartFormDataContent.cs
+System.Net.Http/StreamContent.cs
+System.Net.Http/StringContent.cs
+System.Net.Http.Headers/AuthenticationHeaderValue.cs
+System.Net.Http.Headers/CacheControlHeaderValue.cs
+System.Net.Http.Headers/CollectionExtensions.cs
+System.Net.Http.Headers/ContentDispositionHeaderValue.cs
+System.Net.Http.Headers/ContentRangeHeaderValue.cs
+System.Net.Http.Headers/EntityTagHeaderValue.cs
+System.Net.Http.Headers/HashCodeCalculator.cs
+System.Net.Http.Headers/HeaderInfo.cs
+System.Net.Http.Headers/HttpContentHeaders.cs
+System.Net.Http.Headers/HttpHeaderKind.cs
+System.Net.Http.Headers/HttpHeaders.cs
+System.Net.Http.Headers/HttpHeaderValueCollection.cs
+System.Net.Http.Headers/HttpRequestHeaders.cs
+System.Net.Http.Headers/HttpResponseHeaders.cs
+System.Net.Http.Headers/Lexer.cs
+System.Net.Http.Headers/MediaTypeHeaderValue.cs
+System.Net.Http.Headers/MediaTypeWithQualityHeaderValue.cs
+System.Net.Http.Headers/NameValueHeaderValue.cs
+System.Net.Http.Headers/NameValueWithParametersHeaderValue.cs
+System.Net.Http.Headers/Parser.cs
+System.Net.Http.Headers/ProductHeaderValue.cs
+System.Net.Http.Headers/ProductInfoHeaderValue.cs
+System.Net.Http.Headers/QualityValue.cs
+System.Net.Http.Headers/RangeConditionHeaderValue.cs
+System.Net.Http.Headers/RangeHeaderValue.cs
+System.Net.Http.Headers/RangeItemHeaderValue.cs
+System.Net.Http.Headers/RetryConditionHeaderValue.cs
+System.Net.Http.Headers/StringWithQualityHeaderValue.cs
+System.Net.Http.Headers/TransferCodingHeaderValue.cs
+System.Net.Http.Headers/TransferCodingWithQualityHeaderValue.cs
+System.Net.Http.Headers/ViaHeaderValue.cs
+System.Net.Http.Headers/WarningHeaderValue.cs \ No newline at end of file
diff --git a/mcs/class/System.Net/Assembly/AssemblyInfo.cs b/mcs/class/System.Net/Assembly/AssemblyInfo.cs
index 1aeda8cd3f8..85396e8a834 100644
--- a/mcs/class/System.Net/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Net/Assembly/AssemblyInfo.cs
@@ -59,6 +59,10 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo ("System.Windows, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
[assembly: InternalsVisibleTo ("System.Windows.Browser, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
[assembly: InternalsVisibleTo ("System.Xml, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
+#elif NET_4_0
+ [assembly: AssemblyKeyFile ("../msfinal.pub")]
+ [assembly: AllowPartiallyTrustedCallers]
+ [assembly: SecurityCritical]
#else
[assembly: AssemblyKeyFile ("../ecma.pub")]
[assembly: AllowPartiallyTrustedCallers]
diff --git a/mcs/class/System.Net/Assembly/TypeForwarders.cs b/mcs/class/System.Net/Assembly/TypeForwarders.cs
index 2511171a23a..6dd6ee510dd 100644
--- a/mcs/class/System.Net/Assembly/TypeForwarders.cs
+++ b/mcs/class/System.Net/Assembly/TypeForwarders.cs
@@ -24,6 +24,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if NET_4_0
+
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Cookie))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.CookieCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.CookieContainer))]
@@ -45,3 +47,4 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.NetworkChange))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.NetworkInterface))]
+#endif \ No newline at end of file
diff --git a/mcs/class/System.Runtime.Serialization/mobile_static_System.Runtime.Serialization.dll.sources b/mcs/class/System.Runtime.Serialization/mobile_static_System.Runtime.Serialization.dll.sources
new file mode 100644
index 00000000000..6caafd41198
--- /dev/null
+++ b/mcs/class/System.Runtime.Serialization/mobile_static_System.Runtime.Serialization.dll.sources
@@ -0,0 +1 @@
+#include mobile_System.Runtime.Serialization.dll.sources
diff --git a/mcs/class/System.ServiceModel.Activation/Assembly/AssemblyInfo.cs b/mcs/class/System.ServiceModel.Activation/Assembly/AssemblyInfo.cs
new file mode 100644
index 00000000000..f47e8798819
--- /dev/null
+++ b/mcs/class/System.ServiceModel.Activation/Assembly/AssemblyInfo.cs
@@ -0,0 +1,60 @@
+//
+// AssemblyInfo.cs
+//
+// Authors:
+// Marek Safar (marek.safar@gmail.com)
+//
+// Copyright 2013 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Security;
+using System.Security.Permissions;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about the assembly
+
+[assembly: AssemblyTitle ("System.ServiceModel.Activation.dll")]
+[assembly: AssemblyDescription ("System.ServiceModel.Activation.dll")]
+[assembly: AssemblyDefaultAlias ("System.ServiceModel.Activation.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: SatelliteContractVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+
+[assembly: NeutralResourcesLanguage ("en-US")]
+[assembly: CLSCompliant (true)]
+[assembly: AssemblyDelaySign (true)]
+
+[assembly: AssemblyKeyFile("../winfx.pub")]
+
+[assembly: ComVisible (false)]
+
+[assembly: InternalsVisibleTo ("System.ServiceModel, PublicKey=00000000000000000400000000000000")]
diff --git a/mcs/class/System.ServiceModel.Activation/Makefile b/mcs/class/System.ServiceModel.Activation/Makefile
new file mode 100644
index 00000000000..a465c75d9e7
--- /dev/null
+++ b/mcs/class/System.ServiceModel.Activation/Makefile
@@ -0,0 +1,11 @@
+thisdir = class/System.ServiceModel.Activation
+SUBDIRS =
+include ../../build/rules.make
+
+LIBRARY = System.ServiceModel.Activation.dll
+
+LIB_MCS_FLAGS = -r:System.Core.dll -r:System.dll -r:System.ServiceModel.dll
+
+TEST_MCS_FLAGS = -r:System.dll -r:System.Core.dll
+
+include ../../build/library.make
diff --git a/mcs/class/System.ServiceModel.Activation/System.ServiceModel.Activation.dll.sources b/mcs/class/System.ServiceModel.Activation/System.ServiceModel.Activation.dll.sources
new file mode 100644
index 00000000000..1d17a9ee4a4
--- /dev/null
+++ b/mcs/class/System.ServiceModel.Activation/System.ServiceModel.Activation.dll.sources
@@ -0,0 +1,6 @@
+../../build/common/Consts.cs
+../../build/common/MonoTODOAttribute.cs
+Assembly/AssemblyInfo.cs
+
+../System.ServiceModel/System.ServiceModel/ServiceHostingEnvironment.cs
+../System.ServiceModel/System.ServiceModel.Activation/ServiceHostFactory.cs
diff --git a/mcs/class/System.ServiceModel.Web/Makefile b/mcs/class/System.ServiceModel.Web/Makefile
index 97c88830976..4db6ae805b3 100644
--- a/mcs/class/System.ServiceModel.Web/Makefile
+++ b/mcs/class/System.ServiceModel.Web/Makefile
@@ -11,6 +11,10 @@ LIB_MCS_FLAGS += -d:NET_3_5 -d:NET_3_0 \
-r:System.Web.Extensions.dll
endif
+ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
+LIB_MCS_FLAGS += -r:System.ServiceModel.Activation.dll
+endif
+
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
EXTRA_DISTFILES = $(RESOURCE_FILES) \
diff --git a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonSerializationReader.cs b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonSerializationReader.cs
index d15a4733fc8..45ec6fbd415 100644
--- a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonSerializationReader.cs
+++ b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonSerializationReader.cs
@@ -162,7 +162,7 @@ namespace System.Runtime.Serialization.Json
return null;
}
else
- return new Uri (reader.ReadElementContentAsString ());
+ return new Uri (reader.ReadElementContentAsString (), UriKind.RelativeOrAbsolute);
} else if (type == typeof (XmlQualifiedName)) {
s = reader.ReadElementContentAsString ();
int idx = s.IndexOf (':');
diff --git a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/TypeMap.cs b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/TypeMap.cs
index 67aaf7db84e..3f1cbb510c9 100644
--- a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/TypeMap.cs
+++ b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/TypeMap.cs
@@ -33,6 +33,7 @@ using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
+using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
using System.Text;
using System.Xml;
@@ -85,7 +86,7 @@ namespace System.Runtime.Serialization.Json
if (!fi.IsStatic)
l.Add (new TypeMapField (fi, null));
foreach (var pi in type.GetProperties ())
- if (pi.CanRead && pi.CanWrite && !pi.GetGetMethod ().IsStatic && pi.GetIndexParameters ().Length == 0)
+ if (pi.CanRead && pi.CanWrite && !pi.GetGetMethod (true).IsStatic && pi.GetIndexParameters ().Length == 0)
l.Add (new TypeMapProperty (pi, null));
l.Sort ((x, y) => x.Order != y.Order ? x.Order - y.Order : String.Compare (x.Name, y.Name, StringComparison.Ordinal));
return new TypeMap (type, null, l.ToArray ());
@@ -116,7 +117,9 @@ namespace System.Runtime.Serialization.Json
List<TypeMapMember> members = new List<TypeMapMember> ();
- foreach (FieldInfo fi in type.GetFields (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) {
+ foreach (FieldInfo fi in type.GetFields (binding_flags)) {
+ if (fi.GetCustomAttributes (typeof (CompilerGeneratedAttribute), false).Length > 0)
+ continue;
if (dca != null) {
object [] atts = fi.GetCustomAttributes (typeof (DataMemberAttribute), true);
if (atts.Length == 0)
@@ -131,7 +134,7 @@ namespace System.Runtime.Serialization.Json
}
if (dca != null) {
- foreach (PropertyInfo pi in type.GetProperties (BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) {
+ foreach (PropertyInfo pi in type.GetProperties (binding_flags)) {
object [] atts = pi.GetCustomAttributes (typeof (DataMemberAttribute), true);
if (atts.Length == 0)
continue;
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/Atom10FeedFormatter.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/Atom10FeedFormatter.cs
index 99072bee908..5cf086e73b8 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/Atom10FeedFormatter.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/Atom10FeedFormatter.cs
@@ -476,7 +476,7 @@ namespace System.ServiceModel.Syndication
}
if (Feed.Description != null)
- Feed.Description.WriteTo (writer, "description", AtomNamespace);
+ Feed.Description.WriteTo (writer, "subtitle", AtomNamespace);
if (Feed.ImageUrl != null)
writer.WriteElementString ("logo", AtomNamespace, Feed.ImageUrl.ToString ());
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/DataContractJsonSerializerTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/DataContractJsonSerializerTest.cs
index 7a37a5b4e70..fbe9250e572 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/DataContractJsonSerializerTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.Runtime.Serialization.Json/DataContractJsonSerializerTest.cs
@@ -1452,6 +1452,40 @@ namespace MonoTests.System.Runtime.Serialization.Json
Assert.AreEqual (1, dict.Count, "#2");
Assert.AreEqual ("value", dict ["key"], "#3");
}
+
+ [Test]
+ public void Bug13485 ()
+ {
+ const string json = "{ \"Name\" : \"Test\", \"Value\" : \"ValueA\" }";
+
+ string result = string.Empty;
+ var serializer = new DataContractJsonSerializer (typeof (Bug13485Type));
+ Bug13485Type entity;
+ using (var stream = new MemoryStream (Encoding.UTF8.GetBytes (json)))
+ entity = (Bug13485Type) serializer.ReadObject (stream);
+
+ result = entity.GetValue;
+ Assert.AreEqual ("ValueA", result, "#1");
+ }
+
+ [DataContract(Name = "UriTest")]
+ public class UriTest
+ {
+ [DataMember(Name = "members")]
+ public Uri MembersRelativeLink { get; set; }
+ }
+
+ [Test]
+ public void Bug15169 ()
+ {
+ const string json = "{\"members\":\"foo/bar/members\"}";
+ var serializer = new DataContractJsonSerializer (typeof (UriTest));
+ UriTest entity;
+ using (var stream = new MemoryStream (Encoding.UTF8.GetBytes (json)))
+ entity = (UriTest) serializer.ReadObject (stream);
+
+ Assert.AreEqual ("foo/bar/members", entity.MembersRelativeLink.ToString ());
+ }
}
public class CharTest
@@ -1762,3 +1796,16 @@ public class MyDictionary<K, V> : System.Collections.Generic.IDictionary<K, V>
}
}
+[DataContract]
+public class Bug13485Type
+{
+ [DataMember]
+ public string Name { get; set; }
+
+ [DataMember (Name = "Value")]
+ private string Value { get; set; }
+
+ public string GetValue { get { return this.Value; } }
+}
+
+
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Activation/WebScriptServiceHostFactoryTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Activation/WebScriptServiceHostFactoryTest.cs
index e0174b9ee83..d5c40ddd4e7 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Activation/WebScriptServiceHostFactoryTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Activation/WebScriptServiceHostFactoryTest.cs
@@ -1,3 +1,5 @@
+#if !MOBILE
+
using System;
using System.ServiceModel;
using System.ServiceModel.Activation;
@@ -87,3 +89,5 @@ namespace MonoTests.System.ServiceModel.Activation
}
}
}
+
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Channels/WebMessageEncodingBindingElementTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Channels/WebMessageEncodingBindingElementTest.cs
index 3e98dfc0ed1..d7af674eab6 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Channels/WebMessageEncodingBindingElementTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Channels/WebMessageEncodingBindingElementTest.cs
@@ -1,3 +1,4 @@
+#if !MOBILE
using System;
using System.IO;
using System.ServiceModel;
@@ -167,3 +168,4 @@ namespace MonoTests.System.ServiceModel
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Configuration/WebHttpBindingElementTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Configuration/WebHttpBindingElementTest.cs
index 45d766be156..1ab1b89b1a5 100755
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Configuration/WebHttpBindingElementTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Configuration/WebHttpBindingElementTest.cs
@@ -1,4 +1,4 @@
-
+#if !MOBILE
using System;
using System.ServiceModel.Configuration;
using NUnit.Framework;
@@ -65,3 +65,4 @@ namespace MonoTests.System.ServiceModel.Configuration
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Description/WebHttpBehaviorTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Description/WebHttpBehaviorTest.cs
index bba9cb3553d..84c076d475b 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Description/WebHttpBehaviorTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Description/WebHttpBehaviorTest.cs
@@ -22,7 +22,7 @@ namespace MonoTests.System.ServiceModel.Description
{
return GetRequestClientFormatter (operationDescription, endpoint);
}
-
+#if !MOBILE
public IDispatchMessageFormatter DoGetReplyDispatchFormatter (OperationDescription operationDescription, ServiceEndpoint endpoint)
{
return GetReplyDispatchFormatter (operationDescription, endpoint);
@@ -32,7 +32,7 @@ namespace MonoTests.System.ServiceModel.Description
{
return GetRequestDispatchFormatter (operationDescription, endpoint);
}
-
+#endif
public event Action<ServiceEndpoint, ClientRuntime> ApplyClientBehaviorInvoked;
public override void ApplyClientBehavior (ServiceEndpoint endpoint, ClientRuntime client)
@@ -76,6 +76,7 @@ namespace MonoTests.System.ServiceModel.Description
Assert.AreEqual (0, pl.Count, "#1");
}
+#if !MOBILE
[Test]
public void ApplyDispatchBehavior ()
{
@@ -120,6 +121,7 @@ namespace MonoTests.System.ServiceModel.Description
Assert.AreEqual (0, ed.DispatchRuntime.Operations.Count, "#4-0"); // hmm... really?
}
+#endif
[Test]
public void GetMessageFormatters ()
@@ -129,8 +131,10 @@ namespace MonoTests.System.ServiceModel.Description
var b = new WebHttpBehaviorExt ();
Assert.IsNotNull (b.DoGetRequestClientFormatter (od, se), "#1");
Assert.IsNotNull (b.DoGetReplyClientFormatter (od, se), "#2");
+#if !MOBILE
Assert.IsNotNull (b.DoGetRequestDispatchFormatter (od, se), "#3");
Assert.IsNotNull (b.DoGetReplyDispatchFormatter (od, se), "#4");
+#endif
}
[Test]
@@ -153,6 +157,7 @@ namespace MonoTests.System.ServiceModel.Description
}
}
+#if !MOBILE
[Test]
public void RequestClientFormatter2 ()
{
@@ -174,6 +179,7 @@ namespace MonoTests.System.ServiceModel.Description
// TODO: test DeserializeReply too (it is supported unlike above).
}
+#endif
[ServiceContract]
public interface IMyService
@@ -189,7 +195,9 @@ namespace MonoTests.System.ServiceModel.Description
public class MyService: IMyService
{
+#if !MOBILE
[OperationBehavior]
+#endif
public string Echo (string input)
{
return input;
@@ -204,6 +212,7 @@ namespace MonoTests.System.ServiceModel.Description
Assert.IsTrue (od.Behaviors.Contains (typeof (WebGetAttribute)), "Operation is recognized as WebGet");
}
+#if !MOBILE
[Test]
public void MessageFormatterSupportsRaw ()
{
@@ -247,7 +256,7 @@ namespace MonoTests.System.ServiceModel.Description
formatter.DeserializeRequest (msg, pars);
Assert.IsTrue (pars [0] is Stream, "ret");
}
-
+#endif
[ServiceContract]
public interface IMultipleParametersGet
{
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Description/WebHttpEndpointTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Description/WebHttpEndpointTest.cs
index a3a64b516e5..401f1a1f20d 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Description/WebHttpEndpointTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Description/WebHttpEndpointTest.cs
@@ -1,4 +1,4 @@
-#if NET_4_0
+#if NET_4_0 && !MOBILE
using System;
using System.IO;
using System.Runtime.Serialization;
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Description/WebScriptEnablingBehaviorTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Description/WebScriptEnablingBehaviorTest.cs
index 5e7b44557e8..d735c2ebb70 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Description/WebScriptEnablingBehaviorTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Description/WebScriptEnablingBehaviorTest.cs
@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !MOBILE
using System;
using System.Net;
using System.Runtime.Serialization;
@@ -111,3 +112,4 @@ namespace MonoTests.System.ServiceModel.Description
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Dispatcher/WebHttpDispatchOperationSelectorTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Dispatcher/WebHttpDispatchOperationSelectorTest.cs
index 907f3738988..bb4593ac99e 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Dispatcher/WebHttpDispatchOperationSelectorTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Dispatcher/WebHttpDispatchOperationSelectorTest.cs
@@ -26,6 +26,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !MOBILE
using System;
using System.Globalization;
using System.Runtime.Serialization;
@@ -276,3 +277,4 @@ namespace MonoTests.System.ServiceModel.Dispatcher
#endregion
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Atom10FeedFormatterTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Atom10FeedFormatterTest.cs
index 85d402a1dc5..c15d1ec5825 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Atom10FeedFormatterTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Atom10FeedFormatterTest.cs
@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !MOBILE
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -160,6 +161,7 @@ namespace MonoTests.System.ServiceModel.Syndication
SyndicationFeed feed = new SyndicationFeed ();
feed.BaseUri = new Uri ("http://mono-project.com");
feed.Copyright = new TextSyndicationContent ("No rights reserved");
+ feed.Description = new TextSyndicationContent ("A sample feed for unit testing");
feed.Generator = "mono test generator";
// .NET bug: it ignores this value.
feed.Id = "urn:myid";
@@ -169,7 +171,7 @@ namespace MonoTests.System.ServiceModel.Syndication
StringWriter sw = new StringWriter ();
using (XmlWriter w = CreateWriter (sw))
new Atom10FeedFormatter (feed).WriteTo (w);
- Assert.AreEqual ("<feed xml:base=\"http://mono-project.com/\" xmlns=\"http://www.w3.org/2005/Atom\"><title type=\"text\"></title><id>XXX</id><rights type=\"text\">No rights reserved</rights><updated>2008-01-01T00:00:00Z</updated><logo>http://mono-project.com/images/mono.png</logo><generator>mono test generator</generator></feed>", DummyId (sw.ToString ()));
+ Assert.AreEqual ("<feed xml:base=\"http://mono-project.com/\" xmlns=\"http://www.w3.org/2005/Atom\"><title type=\"text\"></title><id>XXX</id><rights type=\"text\">No rights reserved</rights><updated>2008-01-01T00:00:00Z</updated><subtitle type=\"text\">A sample feed for unit testing</subtitle><logo>http://mono-project.com/images/mono.png</logo><generator>mono test generator</generator></feed>", DummyId (sw.ToString ()));
}
[Test]
@@ -384,3 +386,4 @@ namespace MonoTests.System.ServiceModel.Syndication
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Atom10ItemFormatterTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Atom10ItemFormatterTest.cs
index 3ed55740c35..3930ec5b0b6 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Atom10ItemFormatterTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Atom10ItemFormatterTest.cs
@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !MOBILE
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -374,3 +375,4 @@ namespace MonoTests.System.ServiceModel.Syndication
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/AtomPub10CategoriesDocumentFormatterTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/AtomPub10CategoriesDocumentFormatterTest.cs
index b73dd7feb0a..453895dceb2 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/AtomPub10CategoriesDocumentFormatterTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/AtomPub10CategoriesDocumentFormatterTest.cs
@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !MOBILE
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -125,3 +126,4 @@ namespace MonoTests.System.ServiceModel.Syndication
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/AtomPub10ServiceDocumentFormatterTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/AtomPub10ServiceDocumentFormatterTest.cs
index cfc9dfabc4d..5f303095fa8 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/AtomPub10ServiceDocumentFormatterTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/AtomPub10ServiceDocumentFormatterTest.cs
@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !MOBILE
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -137,3 +138,4 @@ namespace MonoTests.System.ServiceModel.Syndication
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Rss20FeedFormatterTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Rss20FeedFormatterTest.cs
index 4a658976704..6efdc398cca 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Rss20FeedFormatterTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Rss20FeedFormatterTest.cs
@@ -25,6 +25,8 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !MOBILE
+
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -355,3 +357,4 @@ namespace MonoTests.System.ServiceModel.Syndication
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Rss20ItemFormatterTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Rss20ItemFormatterTest.cs
index 9fc3a641942..3b83d230cb4 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Rss20ItemFormatterTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/Rss20ItemFormatterTest.cs
@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !MOBILE
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -352,3 +353,4 @@ namespace MonoTests.System.ServiceModel.Syndication
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/ServiceDocumentTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/ServiceDocumentTest.cs
index d6d938089ca..b9f43186c08 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/ServiceDocumentTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/ServiceDocumentTest.cs
@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !MOBILE
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -70,3 +71,4 @@ namespace MonoTests.System.ServiceModel.Syndication
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationElementExtensionTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationElementExtensionTest.cs
index 1a2898e7531..292335af736 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationElementExtensionTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationElementExtensionTest.cs
@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !MOBILE
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -224,3 +225,4 @@ namespace MonoTests.System.ServiceModel.Syndication
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationFeedTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationFeedTest.cs
index 77950c15217..4f424fbb54b 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationFeedTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationFeedTest.cs
@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !MOBILE
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -102,3 +103,4 @@ namespace MonoTests.System.ServiceModel.Syndication
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationItemTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationItemTest.cs
index c0a67b7b372..2a6b6afe7cd 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationItemTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationItemTest.cs
@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !MOBILE
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -144,3 +145,4 @@ namespace MonoTests.System.ServiceModel.Syndication
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationLinkTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationLinkTest.cs
index 55950031ce9..fd537556132 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationLinkTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationLinkTest.cs
@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !MOBILE
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -215,3 +216,4 @@ namespace MonoTests.System.ServiceModel.Syndication
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/TextSyndicationContentTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/TextSyndicationContentTest.cs
index 6bafef7604c..c49be5ba362 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/TextSyndicationContentTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/TextSyndicationContentTest.cs
@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !MOBILE
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -97,3 +98,4 @@ namespace MonoTests.System.ServiceModel.Syndication
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/UrlSyndicationContentTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/UrlSyndicationContentTest.cs
index 4174b4c5851..cd336072352 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/UrlSyndicationContentTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/UrlSyndicationContentTest.cs
@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !MOBILE
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -96,3 +97,4 @@ namespace MonoTests.System.ServiceModel.Syndication
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/XmlSyndicationContentTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/XmlSyndicationContentTest.cs
index 4e8a1720d94..80264bd9dab 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/XmlSyndicationContentTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/XmlSyndicationContentTest.cs
@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !MOBILE
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -137,3 +138,4 @@ namespace MonoTests.System.ServiceModel.Syndication
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebOperationContextTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebOperationContextTest.cs
index 69f05ec217a..d1e8ea5ff58 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebOperationContextTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebOperationContextTest.cs
@@ -31,7 +31,9 @@ using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
+#if !MOBILE
using System.ServiceModel.Syndication;
+#endif
using System.ServiceModel.Web;
using System.Xml;
using NUnit.Framework;
@@ -46,21 +48,25 @@ namespace MonoTests.System.ServiceModel.Web
[Test]
public void Current ()
{
+#if !MOBILE
Assert.IsNull (WebOperationContext.Current, "#1");
+#endif
var binding = new WebHttpBinding ();
var address = new EndpointAddress ("http://localhost:37564");
var ch = (IContextChannel) WebChannelFactory<IHogeService>.CreateChannel (binding, address);
using (var ocs = new OperationContextScope (ch)) {
+#if !MOBILE
Assert.IsNotNull (WebOperationContext.Current, "#2");
Assert.IsNotNull (WebOperationContext.Current.OutgoingRequest, "#3");
Assert.IsNotNull (WebOperationContext.Current.IncomingRequest, "#4");
Assert.IsNotNull (WebOperationContext.Current.IncomingResponse, "#5");
Assert.IsNotNull (WebOperationContext.Current.OutgoingResponse, "#6"); // pointless though.
+#endif
}
ch.Close ();
}
-#if NET_4_0
+#if NET_4_0 && !MOBILE
[Test]
public void CreateAtom10Response ()
{
@@ -126,7 +132,7 @@ namespace MonoTests.System.ServiceModel.Web
string TestJson3 (string s1, string s2);
}
-#if NET_4_0
+#if NET_4_0 && !MOBILE
public class HogeService : IHogeService
{
static XmlWriterSettings settings = new XmlWriterSettings () { OmitXmlDeclaration = true };
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebServiceHostTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebServiceHostTest.cs
index 48a0b103b2f..cf1038dac22 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebServiceHostTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebServiceHostTest.cs
@@ -25,6 +25,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !MOBILE
using System;
using System.Collections.Generic;
using System.Linq;
@@ -135,3 +136,4 @@ namespace MonoTests.System.ServiceModel.Web
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel/WebHttpBindingTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel/WebHttpBindingTest.cs
index 37932c14f7a..1c0c0077ce8 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel/WebHttpBindingTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel/WebHttpBindingTest.cs
@@ -16,7 +16,9 @@ namespace MonoTests.System.ServiceModel
Assert.AreEqual ("http", b.Scheme, "#1");
Assert.AreEqual (Encoding.UTF8, b.WriteEncoding, "#2");
Assert.AreEqual (0x10000, b.MaxBufferSize, "#3");
+#if !MOBILE
Assert.AreEqual (0x80000, b.MaxBufferPoolSize, "#4");
+#endif
Assert.AreEqual (0x10000, b.MaxReceivedMessageSize, "#5");
Assert.IsFalse (((IBindingRuntimePreferences) b).ReceiveSynchronously, "#6");
}
diff --git a/mcs/class/System.ServiceModel.Web/Test/System/UriTemplateTest.cs b/mcs/class/System.ServiceModel.Web/Test/System/UriTemplateTest.cs
index a41802469eb..24ec92861d8 100644
--- a/mcs/class/System.ServiceModel.Web/Test/System/UriTemplateTest.cs
+++ b/mcs/class/System.ServiceModel.Web/Test/System/UriTemplateTest.cs
@@ -441,7 +441,7 @@ namespace MonoTests.System
var t = new UriTemplate ("*");
var m = t.Match (new Uri ("http://localhost"), new Uri ("http://localhost/hoge/ppp"));
Assert.IsNotNull (m, "#0");
- Assert.IsEmpty (m.QueryParameters, "#1.0");
+ Assert.AreEqual (0, m.QueryParameters.Count, "#1.0");
Assert.AreEqual ("hoge", m.WildcardPathSegments [0], "#2");
Assert.AreEqual ("ppp", m.WildcardPathSegments [1], "#3");
}
diff --git a/mcs/class/System.ServiceModel.Web/mobile_static_System.ServiceModel.Web.dll.sources b/mcs/class/System.ServiceModel.Web/mobile_static_System.ServiceModel.Web.dll.sources
new file mode 100644
index 00000000000..cbea0fae7b4
--- /dev/null
+++ b/mcs/class/System.ServiceModel.Web/mobile_static_System.ServiceModel.Web.dll.sources
@@ -0,0 +1 @@
+#include mobile_System.ServiceModel.Web.dll.sources
diff --git a/mcs/class/System.ServiceModel/Assembly/AssemblyInfo.cs b/mcs/class/System.ServiceModel/Assembly/AssemblyInfo.cs
index 923e60cc22d..daa5ae121d1 100644
--- a/mcs/class/System.ServiceModel/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.ServiceModel/Assembly/AssemblyInfo.cs
@@ -38,7 +38,6 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about the System.ServiceModel assembly
-// v3.0 Assembly
[assembly: AssemblyTitle ("System.ServiceModel.dll")]
[assembly: AssemblyDescription ("System.ServiceModel.dll")]
@@ -76,3 +75,11 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo ("System.ServiceModel.Discovery, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] // AnnouncementChannelEndpointElementCollection requires it.
#endif
+#if NET_4_0 && HAS_ACTIVATION
+
+[assembly: TypeForwardedTo (typeof (System.ServiceModel.ServiceHostingEnvironment))]
+[assembly: TypeForwardedTo (typeof (System.ServiceModel.Activation.ServiceHostFactory))]
+
+#endif
+
+
diff --git a/mcs/class/System.ServiceModel/Makefile b/mcs/class/System.ServiceModel/Makefile
index 1aaf90fae44..fd9d297b95a 100755
--- a/mcs/class/System.ServiceModel/Makefile
+++ b/mcs/class/System.ServiceModel/Makefile
@@ -7,6 +7,8 @@ RESOURCE_FILES = \
resources/ws-addr.xsd
LIBRARY = System.ServiceModel.dll
+LIBRARY_USE_INTERMEDIATE_FILE = yes
+
LIB_MCS_FLAGS = \
/nowarn:414,169,67,3005,436,219,618 \
/unsafe \
@@ -31,12 +33,31 @@ LIB_MCS_FLAGS += /d:NET_3_0 \
/r:Mono.Security.dll
endif
-ifeq (moonlight_raw, $(PROFILE))
-LIB_MCS_FLAGS += /r:System.Net
+ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
+
+ACTIVATION_DEP := System.ServiceModel.Activation.dll
+ACTIVATION_DEP_FILE := $(wildcard ../lib/$(PROFILE)/$(ACTIVATION_DEP))
+CYCLIC_DEPS += $(ACTIVATION_DEP)
+CYCLIC_DEP_FILES += $(ACTIVATION_DEP_FILE)
+
+ifdef ACTIVATION_DEP_FILE
+LIB_MCS_FLAGS += -define:HAS_ACTIVATION -r:$(ACTIVATION_DEP)
endif
-ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
LIB_MCS_FLAGS += /r:System.Web.ApplicationServices.dll
+
+ifneq ($(CYCLIC_DEPS:%=../lib/$(PROFILE)/%), $(CYCLIC_DEP_FILES))
+NO_SIGN_ASSEMBLY = yes
+NO_INSTALL = yes
+all-local: echo-warning
+.PHONY: echo-warning
+
+ifeq (, $(strip $(CYCLIC_DEP_FILES)))
+echo-warning:
+ @echo "** Warning: System.ServiceModel.dll built without parts that depend on: $(CYCLIC_DEPS)"
+endif
+endif
+
endif
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
@@ -64,6 +85,8 @@ NO_SIGN_ASSEMBLY = yes
NO_TEST = yes
endif
-
-
include ../../build/library.make
+
+ifdef ACTIVATION_DEP_FILE
+$(build_lib): $(CYCLIC_DEP_FILES)
+endif
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeAnd.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeAnd.cs
index 128c5b9712c..283389d59b1 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeAnd.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeAnd.cs
@@ -22,7 +22,7 @@
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArgument.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArgument.cs
index c06d2478b6e..e2eea5cfa38 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArgument.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArgument.cs
@@ -1,6 +1,6 @@
// created on 28/08/2004 at 17:07
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArgumentReference.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArgumentReference.cs
index d2568649658..4bfcdec9d91 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArgumentReference.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArgumentReference.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArithmeticOperation.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArithmeticOperation.cs
index 92ddb5e954e..dac3d4efcb5 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArithmeticOperation.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArithmeticOperation.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArrayItem.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArrayItem.cs
index b521345a869..7ef31fb03e1 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArrayItem.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArrayItem.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArrayLength.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArrayLength.cs
index 489004e3c01..2b3fdd7c2c5 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArrayLength.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeArrayLength.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeAssignment.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeAssignment.cs
index 49dcb117324..be22efc420f 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeAssignment.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeAssignment.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBinaryComparison.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBinaryComparison.cs
index c60f58afe17..60ad69d6298 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBinaryComparison.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBinaryComparison.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBinaryOperation.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBinaryOperation.cs
index dc6d5ef364e..3cd60037c82 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBinaryOperation.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBinaryOperation.cs
@@ -1,6 +1,6 @@
// created on 28/08/2004 at 17:30
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBlock.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBlock.cs
index 4dfa1d0e4ca..47f0dd18445 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBlock.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBlock.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Collections;
using System.Reflection;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBuilder.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBuilder.cs
index 58de364d19f..7c4456c6d6b 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBuilder.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeBuilder.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.IO;
using System.Collections;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeCast.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeCast.cs
index 4610f4b008f..7370b3b033e 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeCast.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeCast.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeClass.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeClass.cs
index 1327d5c2c7e..e34884a9b56 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeClass.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeClass.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.IO;
using System.Collections;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeCustomAttribute.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeCustomAttribute.cs
index b2c0519f4ad..f75bc8be193 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeCustomAttribute.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeCustomAttribute.cs
@@ -18,7 +18,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.IO;
using System.Collections;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeDecrement.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeDecrement.cs
index d7f488b9104..eddce1600b9 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeDecrement.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeDecrement.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeEquals.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeEquals.cs
index b9ea6dd6945..41410e83717 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeEquals.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeEquals.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeExpression.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeExpression.cs
index 066b27930d4..b090c4f1f58 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeExpression.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeExpression.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeFieldReference.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeFieldReference.cs
index 7beeffe455d..84f01b87cbb 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeFieldReference.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeFieldReference.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeFor.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeFor.cs
index 123e556db63..c871b5bb518 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeFor.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeFor.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeForeach.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeForeach.cs
index 8f7f6bfdef6..5d7baa343c1 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeForeach.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeForeach.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Collections;
using System.Reflection;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeGenerationHelper.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeGenerationHelper.cs
index d0defd95dc8..d753a666688 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeGenerationHelper.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeGenerationHelper.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Collections;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeIf.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeIf.cs
index e860fd8620d..7355c5a94f6 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeIf.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeIf.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeIncrement.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeIncrement.cs
index 5967954dca5..e2863463e53 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeIncrement.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeIncrement.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeIs.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeIs.cs
index c8f682b4e6d..356b35ba459 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeIs.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeIs.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeItem.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeItem.cs
index 6e2586cc2ff..f6808840d95 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeItem.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeItem.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeLiteral.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeLiteral.cs
index 152d7f8b9f6..90c46fe6de7 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeLiteral.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeLiteral.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Globalization;
using System.Reflection;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeMethod.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeMethod.cs
index 2bde3174098..68f477ff01b 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeMethod.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeMethod.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Collections;
using System.IO;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeMethodCall.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeMethodCall.cs
index fc882c4c155..aa378d766d5 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeMethodCall.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeMethodCall.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeModule.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeModule.cs
index bf9b4bd3b60..ff8251f1815 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeModule.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeModule.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.IO;
using System.Collections;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeNew.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeNew.cs
index 2e97c843f66..8c5a860586e 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeNew.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeNew.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeNewArray.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeNewArray.cs
index a7dd963c8da..618d0ffcc2c 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeNewArray.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeNewArray.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeNotEquals.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeNotEquals.cs
index dcf9b3d0306..16dc05e3f87 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeNotEquals.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeNotEquals.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeOr.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeOr.cs
index 32b0ce2fb49..bdce56d6e9e 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeOr.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeOr.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeProperty.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeProperty.cs
index 0e79378a5ce..338e37038d5 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeProperty.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeProperty.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Collections;
using System.IO;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodePropertyReference.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodePropertyReference.cs
index b268e835c49..b496749e3f3 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodePropertyReference.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodePropertyReference.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeReturn.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeReturn.cs
index ca9ecb3f4cf..c2c5e8480fc 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeReturn.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeReturn.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeSelect.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeSelect.cs
index ea83af5d6f9..dfb268174b4 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeSelect.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeSelect.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Collections;
using System.Reflection;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeSelfIncrement.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeSelfIncrement.cs
index 90dd7010d8b..082fbabfbb1 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeSelfIncrement.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeSelfIncrement.cs
@@ -1,6 +1,6 @@
// created on 28/08/2004 at 17:30
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeTryBlock.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeTryBlock.cs
index b917e14fde5..c2330c42499 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeTryBlock.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeTryBlock.cs
@@ -21,7 +21,7 @@
// Copyright (C) 2009 Novell, Inc
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Collections;
#if NET_2_0
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeUnaryOperation.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeUnaryOperation.cs
index b66493a5589..413131b2f6f 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeUnaryOperation.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeUnaryOperation.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeValueReference.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeValueReference.cs
index 52dd50b496e..6cb27ea36d3 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeValueReference.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeValueReference.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeVariableDeclaration.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeVariableDeclaration.cs
index 93f8394b1a9..fb270b24ad7 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeVariableDeclaration.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeVariableDeclaration.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeVariableReference.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeVariableReference.cs
index af682fb2b92..5fb248e4630 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeVariableReference.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeVariableReference.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeWhen.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeWhen.cs
index 41fa2b1fe5f..3ae85a3be36 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeWhen.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeWhen.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeWhile.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeWhile.cs
index d691cfef739..ffd90b45d3b 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeWhile.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeWhile.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeWriter.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeWriter.cs
index ee9ff61616a..b34341d9048 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeWriter.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/CodeWriter.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.IO;
diff --git a/mcs/class/System.ServiceModel/Mono.CodeGeneration/Exp.cs b/mcs/class/System.ServiceModel/Mono.CodeGeneration/Exp.cs
index e67107ad894..a01f4f21a1f 100644
--- a/mcs/class/System.ServiceModel/Mono.CodeGeneration/Exp.cs
+++ b/mcs/class/System.ServiceModel/Mono.CodeGeneration/Exp.cs
@@ -21,7 +21,7 @@
// Copyright (C) Lluis Sanchez Gual, 2004
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Reflection;
using System.Reflection.Emit;
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Activation/ServiceHostFactory.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Activation/ServiceHostFactory.cs
index b14abe885b4..126221fc4a1 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Activation/ServiceHostFactory.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Activation/ServiceHostFactory.cs
@@ -25,11 +25,14 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System;
-using System.ServiceModel;
+
+#if !HAS_ACTIVATION
namespace System.ServiceModel.Activation
{
+#if NET_4_0
+ [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblySystemServiceModel_3_0)]
+#endif
public class ServiceHostFactory : ServiceHostFactoryBase
{
[MonoTODO]
@@ -47,3 +50,5 @@ namespace System.ServiceModel.Activation
}
}
}
+
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs
index 5ab5d92ee0b..5f4081bda7c 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs
@@ -82,6 +82,9 @@ namespace System.ServiceModel.Channels
public XmlDictionaryReaderQuotas ReaderQuotas {
get { return quotas; }
+#if NET_4_0
+ set { quotas = value; }
+#endif
}
public override IChannelFactory<TChannel> BuildChannelFactory<TChannel> (
@@ -152,5 +155,13 @@ namespace System.ServiceModel.Channels
assertions.Add (doc.CreateElement ("msb", "BinaryEncoding", "http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1"));
}
#endif
+
+#if NET_4_5
+ [MonoTODO]
+ public CompressionFormat CompressionFormat {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
+#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/CompressionFormat.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/CompressionFormat.cs
new file mode 100644
index 00000000000..4dd76a3266c
--- /dev/null
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/CompressionFormat.cs
@@ -0,0 +1,34 @@
+//
+// CompressionFormat.cs
+//
+// Author:
+// Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+namespace System.ServiceModel.Channels
+{
+ public enum CompressionFormat {
+ None,
+ GZip,
+ Deflate
+ }
+}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/Message.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/Message.cs
index 3a4b415fb9e..864fd8c4e25 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/Message.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/Message.cs
@@ -94,6 +94,24 @@ namespace System.ServiceModel.Channels
Close ();
}
+#if NET_4_5
+ public T GetBody<T> ()
+ {
+ return OnGetBody<T> (GetReaderAtBodyContents ());
+ }
+
+ public T GetBody<T> (XmlObjectSerializer xmlFormatter)
+ {
+ // FIXME: Somehow use OnGetBody() here as well?
+ return (T)xmlFormatter.ReadObject (GetReaderAtBodyContents ());
+ }
+
+ protected virtual T OnGetBody<T> (XmlDictionaryReader reader)
+ {
+ var xmlFormatter = new DataContractSerializer (typeof (T));
+ return (T)xmlFormatter.ReadObject (reader);
+ }
+#else
public T GetBody<T> ()
{
return GetBody<T> (new DataContractSerializer (typeof (T)));
@@ -103,6 +121,7 @@ namespace System.ServiceModel.Channels
{
return (T) xmlFormatter.ReadObject (GetReaderAtBodyContents ());
}
+#endif
public string GetBodyAttribute (string localName, string ns)
{
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs
index f75b96cf341..008bcea3e84 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs
@@ -88,6 +88,9 @@ namespace System.ServiceModel.Channels
public XmlDictionaryReaderQuotas ReaderQuotas {
get { return quotas; }
+#if NET_4_0
+ set { quotas = value; }
+#endif
}
public Encoding WriteEncoding {
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/WebSocketTransportSettings.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/WebSocketTransportSettings.cs
index f6339fca57e..fd19d6a764d 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/WebSocketTransportSettings.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/WebSocketTransportSettings.cs
@@ -35,10 +35,10 @@ namespace System.ServiceModel.Channels {
}
public const string BinaryEncoderTransferModeHeader = null;
- public const string BinaryMessageReceivedAction = null;
+ public const string BinaryMessageReceivedAction = "http://schemas.microsoft.com/2011/02/websockets/onbinarymessage";
public const string ConnectionOpenedAction = null;
public const string SoapContentTypeHeader = null;
- public const string TextMessageReceivedAction = null;
+ public const string TextMessageReceivedAction = "http://schemas.microsoft.com/2011/02/websockets/ontextmessage";
public bool CreateNotificationOnConnection { get; set; }
public bool DisablePayloadMasking { get; set; }
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs
index fbc6a39dd6b..6c0c3366f75 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs
@@ -122,6 +122,13 @@ namespace System.ServiceModel.Description
get { return behaviors; }
}
+#if NET_4_5
+ [MonoTODO]
+ public KeyedCollection<Type,IContractBehavior> ContractBehaviors {
+ get { throw new NotImplementedException (); }
+ }
+#endif
+
public Type CallbackContractType {
get { return callback_contract_type; }
set { callback_contract_type = value; }
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs
index 7e4823f1819..929a450d22b 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescriptionGenerator.cs
@@ -263,7 +263,7 @@ namespace System.ServiceModel.Description
{
var l = new List<MethodInfo> ();
foreach (var t in GetAllInterfaceTypes (type)) {
-#if MONOTOUCH
+#if FULL_AOT_RUNTIME
// The MethodBase[] from t.GetMethods () is cast to a IEnumerable <MethodInfo>
// when passed to List<MethodInfo>.AddRange, which in turn casts it to
// ICollection <MethodInfo>. The full-aot compiler has no idea of this, so
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/OperationDescription.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/OperationDescription.cs
index df694c8c9eb..caf9ddbeaf8 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/OperationDescription.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/OperationDescription.cs
@@ -74,6 +74,19 @@ namespace System.ServiceModel.Description
get { return behaviors; }
}
+#if NET_4_5
+ [MonoTODO]
+ public KeyedCollection<Type,IOperationBehavior> OperationBehaviors {
+ get { throw new NotImplementedException (); }
+ }
+
+ [MonoTODO]
+ public MethodInfo TaskMethod {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
+#endif
+
public ContractDescription DeclaringContract {
get { return contract; }
set { contract = value; }
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
index 9850f3c3951..259670f53cd 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
@@ -27,6 +27,9 @@
//
using System;
using System.Collections.Generic;
+#if NET_4_5
+using System.Collections.ObjectModel;
+#endif
using System.Diagnostics;
using System.ServiceModel;
using System.ServiceModel.Channels;
@@ -67,6 +70,13 @@ namespace System.ServiceModel.Description
get { return behaviors; }
}
+#if NET_4_5
+ [MonoTODO]
+ public KeyedCollection<Type,IEndpointBehavior> EndpointBehaviors {
+ get { throw new NotImplementedException (); }
+ }
+#endif
+
public ContractDescription Contract {
get { return contract; }
#if NET_4_0
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs
index ddb4bd6a537..6d99d5b16d7 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs
@@ -185,6 +185,25 @@ namespace System.ServiceModel.Dispatcher
}
throw new InvalidOperationException ("Cannot change this property after the service host is opened");
}
+
+#if NET_4_5
+ [MonoTODO]
+ public ICollection<IParameterInspector> ClientParameterInspectors {
+ get { throw new NotImplementedException (); }
+ }
+
+ [MonoTODO]
+ public MethodInfo TaskMethod {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
+
+ [MonoTODO]
+ public Type TaskTResult {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
+#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs
index 92549c81802..3f215925e6f 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs
@@ -98,6 +98,18 @@ namespace System.ServiceModel.Dispatcher
}
#endif
+#if NET_4_5
+ [MonoTODO]
+ public ICollection<ClientOperation> ClientOperations {
+ get { throw new NotImplementedException (); }
+ }
+
+ [MonoTODO]
+ public ICollection<IClientMessageInspector> ClientMessageInspectors {
+ get { throw new NotImplementedException (); }
+ }
+#endif
+
public bool ManualAddressing {
get { return manual_addressing; }
set { manual_addressing = value; }
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.dll.sources b/mcs/class/System.ServiceModel/System.ServiceModel.dll.sources
index 8baeb0a5ecd..7a5148018b5 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.dll.sources
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.dll.sources
@@ -130,7 +130,6 @@ System.Collections.Generic/SynchronizedKeyedCollection.cs
System.Collections.Generic/SynchronizedReadOnlyCollection.cs
System.IO/PipeException.cs
System.ServiceModel.Activation/AspNetIntegrationRequirementsAttribute.cs
-System.ServiceModel.Activation/IServiceHostFactory.cs
System.ServiceModel.Activation/ServiceHostFactory.cs
System.ServiceModel.Activation/ServiceHostFactoryBase.cs
System.ServiceModel.Activation/VirtualPathExtension.cs
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs b/mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs
index 5beb4fe9022..e4d1f452fea 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs
@@ -241,6 +241,9 @@ namespace System.ServiceModel // used to be S.SM.Ch
Ntlm,
Windows,
Certificate,
+#if NET_4_5
+ InheritedFromHost
+#endif
}
public enum HttpProxyCredentialType
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory_1.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory_1.cs
index 81529cb5fd2..1af7625027e 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory_1.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory_1.cs
@@ -137,7 +137,7 @@ namespace System.ServiceModel
public virtual TChannel CreateChannel (EndpointAddress address, Uri via)
{
-#if MONOTOUCH
+#if FULL_AOT_RUNTIME
throw new InvalidOperationException ("MonoTouch does not support dynamic proxy code generation. Override this method or its caller to return specific client proxy instance");
#else
var existing = Endpoint.Address;
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ClientProxyGenerator.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ClientProxyGenerator.cs
index 576e4a8a877..a7b5587abf8 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ClientProxyGenerator.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ClientProxyGenerator.cs
@@ -26,7 +26,7 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
using System;
using System.Collections.Generic;
using System.Reflection;
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/FaultException_1.cs b/mcs/class/System.ServiceModel/System.ServiceModel/FaultException_1.cs
index 7c647a77dc8..b656c1d1d2e 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/FaultException_1.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/FaultException_1.cs
@@ -37,7 +37,7 @@ namespace System.ServiceModel
{
TDetail detail;
-#if MONOTOUCH
+#if FULL_AOT_RUNTIME
// WCF creates FaultExceptions using reflection, so unless we reference
// the corresponding ctor, it will not be possible to use FaultExceptions
// in MonoTouch. This ctor reference will work as long as TDetail
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/InstanceContext.cs b/mcs/class/System.ServiceModel/System.ServiceModel/InstanceContext.cs
index ed999db7713..f9e112d1d4b 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/InstanceContext.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/InstanceContext.cs
@@ -26,6 +26,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
+using System.Threading;
using System.Collections.Generic;
using System.ServiceModel.Channels;
using System.ServiceModel.Dispatcher;
@@ -235,5 +236,13 @@ namespace System.ServiceModel
protected override void OnClose (TimeSpan timeout)
{
}
+
+#if NET_4_0
+ [MonoTODO]
+ public SynchronizationContext SynchronizationContext {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
+#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs b/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs
index 223faff637c..9e7970fc021 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs
@@ -32,6 +32,9 @@ using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Security;
using System.ServiceModel.Security.Tokens;
+#if NET_4_0
+using System.ServiceModel.Configuration;
+#endif
using System.Text;
using System.Xml;
@@ -64,6 +67,16 @@ namespace System.ServiceModel
transport = new TcpTransportBindingElement ();
}
+#if NET_4_0
+ public NetTcpBinding (string configurationName)
+ : this ()
+ {
+ var bindingsSection = ConfigUtil.BindingsSection;
+ var el = bindingsSection.NetTcpBinding.Bindings [configurationName];
+ el.ApplyConfiguration (this);
+ }
+#endif
+
internal NetTcpBinding (TcpTransportBindingElement transport,
NetTcpSecurity security,
bool reliableSessionEnabled)
@@ -120,6 +133,9 @@ namespace System.ServiceModel
public NetTcpSecurity Security {
get { return security; }
+#if NET_4_0
+ set { security = value; }
+#endif
}
public EnvelopeVersion EnvelopeVersion {
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpSecurity.cs b/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpSecurity.cs
index 4481328814a..54c4ac9eb8d 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpSecurity.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpSecurity.cs
@@ -53,6 +53,9 @@ namespace System.ServiceModel
public MessageSecurityOverTcp Message {
get { return message; }
+#if NET_4_0
+ set { message = value; }
+#endif
}
public SecurityMode Mode {
@@ -62,6 +65,9 @@ namespace System.ServiceModel
public TcpTransportSecurity Transport {
get { return transport; }
+#if NET_4_0
+ set { transport = value; }
+#endif
}
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostingEnvironment.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostingEnvironment.cs
index c0082788b29..e22e9a7c708 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostingEnvironment.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostingEnvironment.cs
@@ -26,8 +26,13 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !HAS_ACTIVATION
+
namespace System.ServiceModel {
+#if NET_4_0
+ [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblySystemServiceModel_3_0)]
+#endif
public static class ServiceHostingEnvironment
{
internal static bool InAspNet { get; set; }
@@ -39,3 +44,5 @@ namespace System.ServiceModel {
}
}
}
+
+#endif \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/SpnEndpointIdentity.cs b/mcs/class/System.ServiceModel/System.ServiceModel/SpnEndpointIdentity.cs
index cd19e90d741..2964e9f1a2e 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/SpnEndpointIdentity.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/SpnEndpointIdentity.cs
@@ -46,5 +46,13 @@ namespace System.ServiceModel
: this (Claim.CreateSpnClaim (spn))
{
}
+
+#if NET_4_0
+ [MonoTODO]
+ public static TimeSpan SpnLookupTime {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
+#endif
}
}
diff --git a/mcs/class/System.ServiceModel/mobile_System.ServiceModel.dll.sources b/mcs/class/System.ServiceModel/mobile_System.ServiceModel.dll.sources
index f0de435d755..1b83c9e468e 100644
--- a/mcs/class/System.ServiceModel/mobile_System.ServiceModel.dll.sources
+++ b/mcs/class/System.ServiceModel/mobile_System.ServiceModel.dll.sources
@@ -71,6 +71,7 @@ System.ServiceModel.Channels/ChannelFactoryBase.cs
System.ServiceModel.Channels/ChannelManagerBase.cs
System.ServiceModel.Channels/ChannelParameterCollection.cs
System.ServiceModel.Channels/ChannelPoolSettings.cs
+System.ServiceModel.Channels/CompressionFormat.cs
System.ServiceModel.Channels/CommunicationObject.cs
System.ServiceModel.Channels/ContentType.cs
System.ServiceModel.Channels/CustomBinding.cs
diff --git a/mcs/class/System.ServiceModel/mobile_static_System.ServiceModel.dll.sources b/mcs/class/System.ServiceModel/mobile_static_System.ServiceModel.dll.sources
new file mode 100644
index 00000000000..22ece5ce8ce
--- /dev/null
+++ b/mcs/class/System.ServiceModel/mobile_static_System.ServiceModel.dll.sources
@@ -0,0 +1 @@
+#include mobile_System.ServiceModel.dll.sources
diff --git a/mcs/class/System.ServiceModel/net_4_5_System.ServiceModel.dll.sources b/mcs/class/System.ServiceModel/net_4_5_System.ServiceModel.dll.sources
index 0be4c6b793e..5f1bdb65307 100644
--- a/mcs/class/System.ServiceModel/net_4_5_System.ServiceModel.dll.sources
+++ b/mcs/class/System.ServiceModel/net_4_5_System.ServiceModel.dll.sources
@@ -5,6 +5,7 @@ System.ServiceModel/BasicHttpsBinding.cs
System.ServiceModel/BasicHttpsSecurity.cs
System.ServiceModel/NetHttpBinding.cs
System.ServiceModel/NetHttpMessageEncoding.cs
+System.ServiceModel.Channels/CompressionFormat.cs
System.ServiceModel.Channels/WebSocketTransportSettings.cs
System.ServiceModel.Channels/WebSocketTransportUsage.cs
System.ServiceModel.Configuration/BasicHttpBindingElement_4_5.cs
diff --git a/mcs/class/System.Transactions/Makefile b/mcs/class/System.Transactions/Makefile
index e65451c85ed..a89f1d4c83f 100644
--- a/mcs/class/System.Transactions/Makefile
+++ b/mcs/class/System.Transactions/Makefile
@@ -2,7 +2,7 @@ thisdir = class/System.Transactions
SUBDIRS =
include ../../build/rules.make
-MOBILE_PROFILE := $(filter monotouch monodroid mobile, $(PROFILE))
+MOBILE_PROFILE := $(filter monotouch monodroid mobile mobile_static, $(PROFILE))
LIBRARY = System.Transactions.dll
ifdef MOBILE_PROFILE
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/Route.cs b/mcs/class/System.Web.Routing/System.Web.Routing/Route.cs
index 32b0ba9705a..aeb02c319b2 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/Route.cs
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/Route.cs
@@ -32,6 +32,7 @@ using System.Runtime.CompilerServices;
using System.Security.Permissions;
using System.Text.RegularExpressions;
using System.Web;
+using System.Globalization;
namespace System.Web.Routing
{
@@ -163,13 +164,15 @@ namespace System.Web.Routing
string s = constraint as string;
if (s != null) {
- string v;
+ string v = null;
object o;
+ // NOTE: If constraint was not an IRouteConstraint, is is asumed
+ // to be an object 'convertible' to string, or at least this is how
+ // ASP.NET seems to work by the tests i've done latelly. (pruiz)
+
if (values != null && values.TryGetValue (parameterName, out o))
- v = o as string;
- else
- v = null;
+ v = Convert.ToString (o, CultureInfo.InvariantCulture);
if (!String.IsNullOrEmpty (v))
return MatchConstraintRegex (v, s);
@@ -184,7 +187,7 @@ namespace System.Web.Routing
if (!rdValues.TryGetValue (parameterName, out o))
return false;
- v = o as string;
+ v = Convert.ToString (o, CultureInfo.InvariantCulture);
if (String.IsNullOrEmpty (v))
return false;
diff --git a/mcs/class/System.Web.Routing/Test/System.Web.Routing/RouteTest.cs b/mcs/class/System.Web.Routing/Test/System.Web.Routing/RouteTest.cs
index 4ac8cbcdcd9..e43117793c0 100644
--- a/mcs/class/System.Web.Routing/Test/System.Web.Routing/RouteTest.cs
+++ b/mcs/class/System.Web.Routing/Test/System.Web.Routing/RouteTest.cs
@@ -1699,6 +1699,30 @@ namespace MonoTests.System.Web.Routing
Assert.IsNull(vp, "#3");
}
+ [Test (Description="Xamarin Bug #13708")]
+ public void GetVirtualPath25()
+ {
+ var r = new MyRoute("{year}/{month}/{slug}", new MyRouteHandler())
+ {
+ Defaults = new RouteValueDictionary(new { controller = "Blog", action = "View" }),
+ Constraints = new RouteValueDictionary(new { year = @"\d{4}", month = @"\d{2}" }),
+ };
+ var hc = new HttpContextStub2("~/", String.Empty);
+ var values = new RouteValueDictionary()
+ {
+ { "area", string.Empty },
+ { "controller", "Blog" },
+ { "action", "View" },
+ { "year", 2013 }, // Year as an int, not a string
+ { "month", "08" },
+ { "slug", "hello-world" },
+ };
+ var vp = r.GetVirtualPath(new RequestContext(hc, new RouteData()), values);
+
+ Assert.IsNotNull(vp, "#1");
+ Assert.AreEqual("2013/08/hello-world", vp.VirtualPath, "#2");
+ }
+
// Bug #500739
[Test]
public void RouteGetRequiredStringWithDefaults ()
diff --git a/mcs/class/System.Web.Services/Makefile b/mcs/class/System.Web.Services/Makefile
index 5a13d8ec021..9a4d1cfed1f 100644
--- a/mcs/class/System.Web.Services/Makefile
+++ b/mcs/class/System.Web.Services/Makefile
@@ -3,7 +3,7 @@ SUBDIRS =
include ../../build/rules.make
LIBRARY = System.Web.Services.dll
-MOBILE := $(filter monotouch monodroid mobile, $(PROFILE))
+MOBILE := $(filter monotouch monodroid mobile mobile_static, $(PROFILE))
ifdef MOBILE
LIB_MCS_FLAGS = \
-nowarn:649 -nowarn:169 \
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Description/MessageCollection.cs b/mcs/class/System.Web.Services/System.Web.Services.Description/MessageCollection.cs
index 355da201604..1b4e9e83560 100644
--- a/mcs/class/System.Web.Services/System.Web.Services.Description/MessageCollection.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services.Description/MessageCollection.cs
@@ -53,7 +53,12 @@ namespace System.Web.Services.Description {
}
public Message this [string name] {
- get { return this [IndexOf ((Message) Table [name])]; }
+ get {
+ int index = IndexOf ((Message) Table [name]);
+ if (index >= 0)
+ return this [index];
+ return null;
+ }
}
#endregion // Properties
diff --git a/mcs/class/System.Web.Services/mobile_static_System.Web.Services.dll.sources b/mcs/class/System.Web.Services/mobile_static_System.Web.Services.dll.sources
new file mode 100644
index 00000000000..9e39dcc73b1
--- /dev/null
+++ b/mcs/class/System.Web.Services/mobile_static_System.Web.Services.dll.sources
@@ -0,0 +1 @@
+#include mobile_System.Web.Services.dll.sources
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/HttpCapabilitiesBase.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/HttpCapabilitiesBase.cs
index 99486acfd2b..d37fa87d923 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/HttpCapabilitiesBase.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/HttpCapabilitiesBase.cs
@@ -247,9 +247,17 @@ namespace System.Web.Configuration
}
}
- public IDictionary Capabilities {
+ public IDictionary Capabilities
+ {
get { return capabilities; }
- set { capabilities = new Hashtable(value, StringComparer.OrdinalIgnoreCase); }
+ set {
+ //value comes with duplicated keys, so we filter them out
+ capabilities = new Hashtable (value.Keys.Count, StringComparer.OrdinalIgnoreCase);
+ foreach (object key in value.Keys) {
+ if (!capabilities.Contains (key))
+ capabilities.Add (key, value [key]);
+ }
+ }
}
int defaultSubmitButtonLimit;
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/HttpRuntimeSection.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/HttpRuntimeSection.cs
index 46c8b0a44d5..308560a45f2 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/HttpRuntimeSection.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/HttpRuntimeSection.cs
@@ -65,6 +65,9 @@ namespace System.Web.Configuration
static ConfigurationProperty encoderTypeProp;
static ConfigurationProperty relaxedUrlToFileSystemMappingProp;
#endif
+#if NET_4_5
+ static ConfigurationProperty targetFrameworkProp;
+#endif
static ConfigurationPropertyCollection properties;
static HttpRuntimeSection ()
@@ -141,6 +144,12 @@ namespace System.Web.Configuration
ConfigurationPropertyOptions.None);
relaxedUrlToFileSystemMappingProp = new ConfigurationProperty ("relaxedUrlToFileSystemMapping", typeof (bool), false);
#endif
+#if NET_4_5
+ targetFrameworkProp = new ConfigurationProperty ("targetFramework", typeof (Version), new Version (4, 0),
+ PropertyHelper.VersionConverter,
+ PropertyHelper.DefaultValidator,
+ ConfigurationPropertyOptions.None);
+#endif
properties = new ConfigurationPropertyCollection();
properties.Add (apartmentThreadingProp);
@@ -170,6 +179,9 @@ namespace System.Web.Configuration
properties.Add (encoderTypeProp);
properties.Add (relaxedUrlToFileSystemMappingProp);
#endif
+#if NET_4_5
+ properties.Add (targetFrameworkProp);
+#endif
}
public HttpRuntimeSection()
@@ -343,6 +355,14 @@ namespace System.Web.Configuration
set { base [relaxedUrlToFileSystemMappingProp] = value; }
}
#endif
+#if NET_4_5
+ [ConfigurationProperty ("targetFramework", DefaultValue = "4.0")]
+ [TypeConverter ("System.Web.Configuration.VersionConverter")]
+ public Version TargetFramework {
+ get { return (Version) base [targetFrameworkProp]; }
+ set { base [targetFrameworkProp] = value; }
+ }
+#endif
protected internal override ConfigurationPropertyCollection Properties {
get { return properties; }
}
diff --git a/mcs/class/System.Web/System.Web.Util/HttpEncoder.cs b/mcs/class/System.Web/System.Web.Util/HttpEncoder.cs
index ddda8757888..68da3951f2f 100644
--- a/mcs/class/System.Web/System.Web.Util/HttpEncoder.cs
+++ b/mcs/class/System.Web/System.Web.Util/HttpEncoder.cs
@@ -138,10 +138,9 @@ namespace System.Web.Util
static string EncodeHeaderString (string input)
{
StringBuilder sb = null;
- char ch;
for (int i = 0; i < input.Length; i++) {
- ch = input [i];
+ char ch = input [i];
if ((ch < 32 && ch != 9) || ch == 127)
StringBuilderAppend (String.Format ("%{0:x2}", (int)ch), ref sb);
@@ -276,11 +275,11 @@ namespace System.Web.Util
return s;
StringBuilder output = new StringBuilder ();
- char ch;
int len = s.Length;
for (int i = 0; i < len; i++) {
- switch (s [i]) {
+ char ch = s [i];
+ switch (ch) {
case '&' :
output.Append ("&amp;");
break;
@@ -307,7 +306,6 @@ namespace System.Web.Util
break;
default:
- ch = s [i];
if (ch > 159 && ch < 256) {
output.Append ("&#");
output.Append (((int) ch).ToString (Helpers.InvariantCulture));
@@ -351,27 +349,30 @@ namespace System.Web.Util
StringBuilder output = new StringBuilder ();
int len = s.Length;
- for (int i = 0; i < len; i++)
- switch (s [i]) {
- case '&' :
- output.Append ("&amp;");
- break;
- case '"' :
- output.Append ("&quot;");
- break;
- case '<':
- output.Append ("&lt;");
- break;
+
+ for (int i = 0; i < len; i++) {
+ char ch = s [i];
+ switch (ch) {
+ case '&' :
+ output.Append ("&amp;");
+ break;
+ case '"' :
+ output.Append ("&quot;");
+ break;
+ case '<':
+ output.Append ("&lt;");
+ break;
#if NET_4_0
- case '\'':
- output.Append ("&#39;");
- break;
+ case '\'':
+ output.Append ("&#39;");
+ break;
#endif
- default:
- output.Append (s [i]);
- break;
+ default:
+ output.Append (ch);
+ break;
}
-
+ }
+
return output.ToString();
}
diff --git a/mcs/class/System.Web/System.Web/HttpResponse.cs b/mcs/class/System.Web/System.Web/HttpResponse.cs
index 6a310ecc874..ac432ab3da3 100644
--- a/mcs/class/System.Web/System.Web/HttpResponse.cs
+++ b/mcs/class/System.Web/System.Web/HttpResponse.cs
@@ -127,8 +127,13 @@ namespace System.Web
this.context = context;
#if !TARGET_J2EE
- if (worker_request != null)
- use_chunked = (worker_request.GetHttpVersion () == "HTTP/1.1");
+ if (worker_request != null && worker_request.GetHttpVersion () == "HTTP/1.1") {
+ string gi = worker_request.GetServerVariable ("GATEWAY_INTERFACE");
+ use_chunked = (String.IsNullOrEmpty (gi) ||
+ !gi.StartsWith ("cgi", StringComparison.OrdinalIgnoreCase));
+ } else {
+ use_chunked = false;
+ }
#endif
writer = new HttpWriter (this);
}
diff --git a/mcs/class/System.Web/System.Web/HttpRuntime.cs b/mcs/class/System.Web/System.Web/HttpRuntime.cs
index cbb1746bdb0..2e68a21a852 100644
--- a/mcs/class/System.Web/System.Web/HttpRuntime.cs
+++ b/mcs/class/System.Web/System.Web/HttpRuntime.cs
@@ -329,6 +329,21 @@ namespace System.Web
internal static HttpRuntimeSection Section { get { return runtime_section; } }
public static bool UsingIntegratedPipeline { get { return false; } }
+
+#if NET_4_5
+ public static Version IISVersion {
+ get {
+ // Null means not hosted by IIS
+ return null;
+ }
+ }
+
+ public static Version TargetFramework {
+ get {
+ return runtime_section.TargetFramework;
+ }
+ }
+#endif
[SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
public static void Close ()
diff --git a/mcs/class/System.Web/Test/System.Web/AppBrowsersTest.cs b/mcs/class/System.Web/Test/System.Web/AppBrowsersTest.cs
index 3561780ff11..6d02c725aa8 100644
--- a/mcs/class/System.Web/Test/System.Web/AppBrowsersTest.cs
+++ b/mcs/class/System.Web/Test/System.Web/AppBrowsersTest.cs
@@ -40,7 +40,9 @@ using System.Threading;
namespace MonoTests.System.Web
{
[TestFixture]
- [Ignore ("Pending fix for bug 351878")]
+#if NET_3_0
+ [Ignore ("adapters.browser depends on System.Web_test_net_2_0.dll")]
+#endif
public class AppBrowsersTest
{
[TestFixtureSetUp]
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/Makefile b/mcs/class/System.Windows.Forms.DataVisualization/Makefile
index b076ebdfa1f..b871fd3acf4 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/Makefile
+++ b/mcs/class/System.Windows.Forms.DataVisualization/Makefile
@@ -3,7 +3,7 @@ SUBDIRS =
include ../../build/rules.make
LIBRARY = System.Windows.Forms.DataVisualization.dll
-LIB_MCS_FLAGS = -r:System -r:System.Drawing -r:System.Windows.Forms -r:System.Core
+LIB_MCS_FLAGS = -r:System -r:System.Drawing -r:System.Windows.Forms -r:System.Core -r:System.Data -r:System.Xml
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
EXTRA_DISTFILES =
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Annotation.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Annotation.cs
new file mode 100644
index 00000000000..45c4a9e28e4
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Annotation.cs
@@ -0,0 +1,125 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public abstract class Annotation : ChartNamedElement
+ {
+ protected Annotation ()
+ {
+ }
+
+ public virtual ContentAlignment Alignment { get; set; }
+ public virtual bool AllowAnchorMoving { get; set; }
+ public virtual bool AllowMoving { get; set; }
+ public virtual bool AllowPathEditing { get; set; }
+ public virtual bool AllowResizing { get; set; }
+ public virtual bool AllowSelecting { get; set; }
+ public virtual bool AllowTextEditing { get; set; }
+ public virtual ContentAlignment AnchorAlignment { get; set; }
+ public virtual DataPoint AnchorDataPoint { get; set; }
+ public virtual string AnchorDataPointName { get; set; }
+ public virtual double AnchorOffsetX { get; set; }
+ public virtual double AnchorOffsetY { get; set; }
+ public virtual double AnchorX { get; set; }
+ public virtual double AnchorY { get; set; }
+ public AnnotationGroup AnnotationGroup { get; private set; }
+ public abstract string AnnotationType { get; }
+ public virtual Axis AxisX { get; set; }
+ public virtual string AxisXName { get; set; }
+ public virtual Axis AxisY { get; set; }
+ public virtual string AxisYName { get; set; }
+ public virtual Color BackColor { get; set; }
+ public virtual GradientStyle BackGradientStyle { get; set; }
+ public virtual ChartHatchStyle BackHatchStyle { get; set; }
+ public virtual Color BackSecondaryColor { get; set; }
+ public virtual double Bottom { get; set; }
+ public virtual string ClipToChartArea { get; set; }
+ public virtual Font Font { get; set; }
+ public virtual Color ForeColor { get; set; }
+ public virtual double Height { get; set; }
+ public virtual bool IsSelected { get; set; }
+ public virtual bool IsSizeAlwaysRelative { get; set; }
+ public virtual Color LineColor { get; set; }
+ public virtual ChartDashStyle LineDashStyle { get; set; }
+ public virtual int LineWidth { get; set; }
+ public override string Name { get; set; }
+ public virtual double Right { get; set; }
+ public virtual Color ShadowColor { get; set; }
+ public virtual int ShadowOffset { get; set; }
+ public AnnotationSmartLabelStyle SmartLabelStyle { get; set; }
+ public virtual TextStyle TextStyle { get; set; }
+ public virtual string ToolTip { get; set; }
+ public virtual bool Visible { get; set; }
+ public virtual double Width { get; set; }
+ public virtual double X { get; set; }
+ public virtual double Y { get; set; }
+ public virtual string YAxisName { get; set; }
+
+ [MonoTODO]
+ public virtual void BeginPlacement ()
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public virtual void BringToFront ()
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ protected override void Dispose (bool disposing)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public virtual void EndPlacement ()
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public virtual void ResizeToContent ()
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public virtual void SendToBack ()
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void SetAnchor (DataPoint dataPoint)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void SetAnchor (DataPoint dataPoint1, DataPoint dataPoint2)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Activation/IServiceHostFactory.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationCollection.cs
index e16bc10e6f7..1bcae8cc2e6 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Activation/IServiceHostFactory.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationCollection.cs
@@ -1,9 +1,7 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
//
-// IServiceHostFactory.cs
-//
-// Author: Atsushi Enomoto (atsushi@ximian.com)
-//
-// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+// (C) Francis Fisher 2013
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -23,15 +21,15 @@
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.ServiceModel.Channels;
-namespace System.ServiceModel.Activation
+
+namespace System.Windows.Forms.DataVisualization.Charting
{
- public interface IServiceHostFactory
+ public class AnnotationCollection : ChartNamedElementCollection<Annotation>
{
- ServiceHostBase CreateServiceHost (string constructorString,
- Uri [] baseAddresses);
+ [MonoTODO]
+ public override Annotation FindByName (string name) {
+ throw new NotImplementedException ();
+ }
}
}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationGroup.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationGroup.cs
new file mode 100644
index 00000000000..4534cdf74a4
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationGroup.cs
@@ -0,0 +1,61 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class AnnotationGroup : Annotation
+ {
+ public AnnotationGroup ()
+ {
+ Annotations = new AnnotationCollection ();
+ }
+
+ public override ContentAlignment Alignment { get; set; }
+ public override bool AllowAnchorMoving { get; set; }
+ public override bool AllowMoving { get; set; }
+ public override bool AllowPathEditing { get; set; }
+ public override bool AllowResizing { get; set; }
+ public override bool AllowSelecting { get; set; }
+ public override bool AllowTextEditing { get; set; }
+ public AnnotationCollection Annotations { get; private set; }
+ public override string AnnotationType { get { throw new NotImplementedException (); } } //FIXME - find out what MS implementation returns here
+ public override Color BackColor { get; set; }
+ public override GradientStyle BackGradientStyle { get; set; }
+ public override ChartHatchStyle BackHatchStyle { get; set; }
+ public override Color BackSecondaryColor { get; set; }
+ public override string ClipToChartArea { get; set; }
+ public override Font Font { get; set; }
+ public override Color ForeColor { get; set; }
+ public override bool IsSelected { get; set; }
+ public override bool IsSizeAlwaysRelative { get; set; }
+ public override Color LineColor { get; set; }
+ public override ChartDashStyle LineDashStyle { get; set; }
+ public override int LineWidth { get; set; }
+ public override Color ShadowColor { get; set; }
+ public override int ShadowOffset { get; set; }
+ public override TextStyle TextStyle { get; set; }
+ public override bool Visible { get; set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationPathPoint.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationPathPoint.cs
index 3bd7261b652..2cd6fc96683 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationPathPoint.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationPathPoint.cs
@@ -46,6 +46,8 @@ namespace System.Windows.Forms.DataVisualization.Charting
#endregion
#region Public Properties
+ public string Name { get; private set; }
+ public byte PointType { get; set; }
public float X { get; set; }
public float Y { get; set; }
#endregion
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationPositionChangingEventArgs.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationPositionChangingEventArgs.cs
new file mode 100644
index 00000000000..9f490989166
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationPositionChangingEventArgs.cs
@@ -0,0 +1,91 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class AnnotationPositionChangingEventArgs : EventArgs
+ {
+ public AnnotationPositionChangingEventArgs ()
+ {
+ }
+
+ public Annotation Annotation { get; set; }
+
+ public PointF NewAnchorLocation { get; set; }
+ public double NewAnchorLocationX {
+ get { return this.NewAnchorLocation.X; }
+ set {
+ PointF nal = this.NewAnchorLocation;
+ nal.X = (float)value;
+ this.NewAnchorLocation = nal;
+ }
+ }
+ public double NewAnchorLocationY {
+ get { return this.NewAnchorLocation.Y; }
+ set {
+ PointF nal = this.NewAnchorLocation;
+ nal.Y = (float)value;
+ this.NewAnchorLocation = nal;
+ }
+ }
+
+ public RectangleF NewPosition { get; set; }
+
+ public double NewLocationX {
+ get { return this.NewPosition.X; }
+ set {
+ RectangleF np = this.NewPosition;
+ np.X = (float)value;
+ this.NewPosition = np;
+ }
+ }
+ public double NewLocationY {
+ get { return this.NewPosition.Y; }
+ set {
+ RectangleF np = this.NewPosition;
+ np.Y = (float)value;
+ this.NewPosition = np;
+ }
+ }
+ public double NewSizeWidth {
+ get { return this.NewPosition.Width; }
+ set {
+ RectangleF np = this.NewPosition;
+ np.Width = (float)value;
+ this.NewPosition = np;
+ }
+ }
+ public double NewSizeHeight {
+ get { return this.NewPosition.Height; }
+ set {
+ RectangleF np = this.NewPosition;
+ np.Height = (float)value;
+ this.NewPosition = np;
+ }
+ }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationSmartLabelStyle.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationSmartLabelStyle.cs
new file mode 100644
index 00000000000..647d80e655b
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnnotationSmartLabelStyle.cs
@@ -0,0 +1,30 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class AnnotationSmartLabelStyle : SmartLabelStyle
+ {
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ArrowAnnotation.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ArrowAnnotation.cs
index 31ad4944dea..36fb4ea302b 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ArrowAnnotation.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ArrowAnnotation.cs
@@ -1,6 +1,7 @@
//
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
+// Francis Fisher (frankie@terrorise.me.uk)
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
@@ -24,10 +25,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System;
+using System.Drawing;
namespace System.Windows.Forms.DataVisualization.Charting
{
- public class ArrowAnnotation
+ public class ArrowAnnotation : Annotation
{
private int arrow_size = 5;
@@ -38,6 +40,8 @@ namespace System.Windows.Forms.DataVisualization.Charting
#endregion
#region Public Properties
+ public override ContentAlignment AnchorAlignment { get; set; }
+ public override string AnnotationType { get { throw new NotImplementedException (); } } //FIXME - find out what MS implementation returns here
public virtual int ArrowSize {
get { return arrow_size; }
set {
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Axis.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Axis.cs
index 5c273026591..345fc70f725 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Axis.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Axis.cs
@@ -1,6 +1,7 @@
//
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
+// Francis Fisher (frankie@terrorise.me.uk)
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
@@ -33,6 +34,8 @@ namespace System.Windows.Forms.DataVisualization.Charting
#region Constructors
public Axis (ChartArea chartArea, AxisName axisTypeName)
{
+ this.ChartArea = chartArea;
+ this.AxisName = axisTypeName;
}
public Axis ()
@@ -42,9 +45,9 @@ namespace System.Windows.Forms.DataVisualization.Charting
#region Public Properties
public AxisArrowStyle ArrowStyle { get; set; }
- public virtual AxisName AxisName { get; }
+ public virtual AxisName AxisName { get; private set; }
public virtual double Crossing { get; set; }
- public CustomLabelCollection CustomLabels { get; }
+ public CustomLabelCollection CustomLabels { get; private set; }
public AxisEnabled Enabled { get; set; }
public Color InterlacedColor { get; set; }
public double Interval { get; set; }
@@ -83,7 +86,7 @@ namespace System.Windows.Forms.DataVisualization.Charting
public virtual AxisScaleBreakStyle ScaleBreakStyle { get; set; }
public AxisScaleView ScaleView { get; set; }
public AxisScrollBar ScrollBar { get; set; }
- public StripLinesCollection StripLines { get; }
+ public StripLinesCollection StripLines { get; private set; }
public TextOrientation TextOrientation { get; set; }
public string Title { get; set; }
public StringAlignment TitleAlignment { get; set; }
@@ -92,32 +95,40 @@ namespace System.Windows.Forms.DataVisualization.Charting
public string ToolTip { get; set; }
#endregion
+ private ChartArea ChartArea;
+
#region Public Methods
+ [MonoTODO]
public double GetPosition (double axisValue)
{
throw new NotImplementedException ();
}
+ [MonoTODO]
public double PixelPositionToValue (double position)
{
throw new NotImplementedException ();
}
+ [MonoTODO]
public double PositionToValue (double position)
{
throw new NotImplementedException ();
}
+ [MonoTODO]
public void RoundAxisValues ()
{
throw new NotImplementedException ();
}
+ [MonoTODO]
public double ValueToPixelPosition (double axisValue)
{
throw new NotImplementedException ();
}
+ [MonoTODO]
public double ValueToPosition (double axisValue)
{
throw new NotImplementedException ();
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AxisScaleView.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AxisScaleView.cs
index 57a0dcadd71..8d0cb4bedc5 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AxisScaleView.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AxisScaleView.cs
@@ -1,6 +1,7 @@
//
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
+// Francis Fisher (frankie@terrorise.me.uk)
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
@@ -30,5 +31,63 @@ namespace System.Windows.Forms.DataVisualization.Charting
{
public class AxisScaleView
{
+ public bool IsZoomed { get; private set;}
+ public double MinSize { get; set; }
+ public DateTimeIntervalType MinSizeType { get; set; }
+ public double Position { get; set; }
+ public double Size { get; set; }
+ public DateTimeIntervalType SizeType { get; set; }
+ public double SmallScrollMinSize { get; set; }
+ public DateTimeIntervalType SmallScrollMinSizeType { get; set; }
+ public double SmallScrollSize { get; set; }
+ public DateTimeIntervalType SmallScrollSizeType { get; set; }
+ public double ViewMaximum { get; private set; }
+ public double ViewMinimum { get; private set;}
+ public bool Zoomable { get; set; }
+
+
+ [MonoTODO]
+ public void Scroll (DateTime newPosition)
+ {
+ throw new NotImplementedException();
+ }
+ [MonoTODO]
+ public void Scroll (double newPosition)
+ {
+ throw new NotImplementedException();
+ }
+ [MonoTODO]
+ public void Scroll (ScrollType scrollType)
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ public void Zoom (double viewStart,double viewEnd)
+ {
+ throw new NotImplementedException();
+ }
+ [MonoTODO]
+ public void Zoom (double viewPosition, double viewSize, DateTimeIntervalType viewSizeType)
+ {
+ throw new NotImplementedException();
+ }
+ [MonoTODO]
+ public void Zoom (double viewPosition, double viewSize, DateTimeIntervalType viewSizeType, bool saveState)
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ public void ZoomReset ()
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ public void ZoomReset (int numberOfViews)
+ {
+ throw new NotImplementedException();
+ }
}
}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AxisScrollBar.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AxisScrollBar.cs
new file mode 100644
index 00000000000..16b3f9a858c
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AxisScrollBar.cs
@@ -0,0 +1,55 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class AxisScrollBar : IDisposable
+ {
+ public Axis Axis { get; private set; }
+ public Color BackColor { get; set; }
+ public Color ButtonColor { get; set; }
+ public ScrollBarButtonStyles ButtonStyle { get; set; }
+ public ChartArea ChartArea { get; private set; }
+ public bool Enabled { get; set; }
+ public bool IsPositionedInside { get; set; }
+ public bool IsVisible { get; private set; }
+ public Color LineColor { get; set; }
+ public double Size { get; set; }
+
+ [MonoTODO]
+ public void Dispose ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ protected virtual void Dispose (bool disposing )
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Border3DAnnotation.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Border3DAnnotation.cs
new file mode 100644
index 00000000000..07703241c52
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Border3DAnnotation.cs
@@ -0,0 +1,32 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class Border3DAnnotation : RectangleAnnotation
+ {
+ public override string AnnotationType { get { throw new NotImplementedException (); } } //FIXME - find out what MS implementation returns here
+ public BorderSkin BorderSkin { get; set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/BorderSkin.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/BorderSkin.cs
new file mode 100644
index 00000000000..f607234d7ab
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/BorderSkin.cs
@@ -0,0 +1,45 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class BorderSkin : ChartElement
+ {
+ public Color BackColor { get; set; }
+ public GradientStyle BackGradientStyle { get; set; }
+ public ChartHatchStyle BackHatchStyle { get; set; }
+ public string BackImage { get; set; }
+ public ChartImageAlignmentStyle BackImageAlignment { get; set; }
+ public Color BackImageTransparentColor { get; set; }
+ public ChartImageWrapMode BackImageWrapMode { get; set; }
+ public Color BackSecondaryColor { get; set; }
+ public Color BorderColor { get; set; }
+ public ChartDashStyle BorderDashStyle { get; set; }
+ public int BorderWidth { get; set; }
+ public Color PageColor { get; set; }
+ public BorderSkinStyle SkinStyle { get; set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CalloutAnnotation.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CalloutAnnotation.cs
new file mode 100644
index 00000000000..840926733b5
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CalloutAnnotation.cs
@@ -0,0 +1,45 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class CalloutAnnotation : TextAnnotation
+ {
+ public override ContentAlignment AnchorAlignment { get; set; }
+ public override double AnchorOffsetX { get; set; }
+ public override double AnchorOffsetY { get; set; }
+ public override string AnnotationType { get { throw new NotImplementedException (); } } //FIXME - find out what MS implementation returns here
+ public override Color BackColor { get; set; }
+ public override GradientStyle BackGradientStyle { get; set; }
+ public override ChartHatchStyle BackHatchStyle { get; set; }
+ public override Color BackSecondaryColor { get; set; }
+ public virtual LineAnchorCapStyle CalloutAnchorCap { get; set; }
+ public virtual CalloutStyle CalloutStyle { get; set; }
+ public override Color LineColor { get; set; }
+ public override ChartDashStyle LineDashStyle { get; set; }
+ public override int LineWidth { get; set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Chart.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Chart.cs
index 0e394c0a505..af2c3471f71 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Chart.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Chart.cs
@@ -1,6 +1,7 @@
//
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
+// Francis Fisher (frankie@terrorise.me.uk)
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
@@ -24,12 +25,15 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System;
-using System.Collections.Generic;
using System.Drawing;
+using System.Drawing.Imaging;
+using System.IO;
+using System.ComponentModel;
+using System.Data.Common;
namespace System.Windows.Forms.DataVisualization.Charting
{
- public class Chart : Control
+ public class Chart : Control, ISupportInitialize, IDisposable
{
public Chart ()
{
@@ -37,9 +41,45 @@ namespace System.Windows.Forms.DataVisualization.Charting
ChartAreas = new ChartAreaCollection ();
Series = new SeriesCollection ();
}
-
+ public AnnotationCollection Annotations { get; private set;}
+ public AntiAliasingStyles AntiAliasing { get; set; }
+ public override Color BackColor { get; set; }
+ public GradientStyle BackGradientStyle { get; set; }
+ public override Image BackgroundImage { get; set; }
+ public ChartHatchStyle BackHatchStyle { get; set; }
+ public string BackImage { get; set; }
+ public ChartImageAlignmentStyle BackImageAlignment { get; set; }
+ public Color BackImageTransparentColor { get; set; }
+ public ChartImageWrapMode BackImageWrapMode { get; set; }
+ public Color BackSecondaryColor { get; set; }
+ public Color BorderColor { get; set; }
+ public ChartDashStyle BorderDashStyle { get; set; }
+ public Color BorderlineColor { get; set; }
+ public ChartDashStyle BorderlineDashStyle { get; set; }
+ public int BorderlineWidth { get; set; }
+ public BorderSkin BorderSkin { get; set; }
+ public int BorderWidth { get; set; }
+ public string BuildNumber { get; private set;}
public ChartAreaCollection ChartAreas { get; private set; }
+ public DataManipulator DataManipulator { get; private set;}
+ public Object DataSource { get; set; }
+ protected override Size DefaultSize { get { return DefaultSize; } }//FIXME
+ public Font Font { get; set; }
+ public override Color ForeColor { get; set; }
+ public NamedImagesCollection Images { get; private set;}
+ public bool IsSoftShadows { get; set; }
+ public LegendCollection Legends { get; private set; }
+ public ChartColorPalette Palette { get; set; }
+ public Color[] PaletteCustomColors { get; set; }
+ public PrintingManager Printing { get; private set;}
+ public double RenderingDpiX { get; set; }
+ public double RenderingDpiY { get; set; }
+ public ChartSerializer Serializer { get; private set; }
public SeriesCollection Series { get; private set; }
+ public Size Size { get; set; }
+ public bool SuppressExceptions { get; set; }
+ public TextAntiAliasingQuality TextAntiAliasingQuality { get; set; }
+ public TitleCollection Titles { get; private set;}
#region Protected Properties
protected override void OnPaint (PaintEventArgs e)
@@ -71,6 +111,171 @@ namespace System.Windows.Forms.DataVisualization.Charting
}
#endregion
+
+
+ public event EventHandler AnnotationPlaced;
+ public event EventHandler AnnotationPositionChanged;
+ public event EventHandler<AnnotationPositionChangingEventArgs> AnnotationPositionChanging;
+ public event EventHandler AnnotationSelectionChanged;
+ public event EventHandler AnnotationTextChanged;
+ public event EventHandler<ScrollBarEventArgs> AxisScrollBarClicked;
+ public event EventHandler<ViewEventArgs> AxisViewChanged;
+ public event EventHandler<ViewEventArgs> AxisViewChanging;
+ public event EventHandler<CursorEventArgs> CursorPositionChanged;
+ public event EventHandler<CursorEventArgs> CursorPositionChanging;
+ public event EventHandler Customize;
+ public event EventHandler<CustomizeLegendEventArgs> CustomizeLegend;
+ public event EventHandler<FormatNumberEventArgs> FormatNumber;
+ public event EventHandler<ToolTipEventArgs> GetToolTipText;
+ public event EventHandler<ChartPaintEventArgs> PostPaint;
+ public event EventHandler<ChartPaintEventArgs> PrePaint;
+ public event EventHandler<CursorEventArgs> SelectionRangeChanged;
+ public event EventHandler<CursorEventArgs> SelectionRangeChanging;
+
+
+ #region Public Methods
+
+ [MonoTODO]
+ public void AlignDataPointsByAxisLabel ()
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void AlignDataPointsByAxisLabel (PointSortOrder sortingOrder)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void AlignDataPointsByAxisLabel(string series)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void AlignDataPointsByAxisLabel (string series, PointSortOrder sortingOrder)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void ApplyPaletteColors ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void BeginInit ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void DataBind ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void DataBindCrossTable (System.Collections.IEnumerable dataSource, string seriesGroupByField, string xField, string yFields, string otherFields)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void DataBindCrossTable (System.Collections.IEnumerable dataSource, string seriesGroupByField, string xField, string yFields, string otherFields, PointSortOrder sortingOrder)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void DataBindTable (System.Collections.IEnumerable dataSource)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void DataBindTable (System.Collections.IEnumerable dataSource, string xField)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void EndInit ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public HitTestResult HitTest (int x, int y)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public HitTestResult HitTest (int x, int y, bool ignoreTransparent)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public HitTestResult HitTest (int x, int y, ChartElementType requestedElement)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public HitTestResult[] HitTest (int x, int y, bool ignoreTransparent, params ChartElementType[] requestedElement)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void LoadTemplate (Stream stream)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void LoadTemplate (string name)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void ResetAutoValues ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void SaveImage (Stream imageStream, ImageFormat format)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void SaveImage (Stream imageStream, ChartImageFormat format)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void SaveImage (string imageFileName, ImageFormat format)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void SaveImage (string imageFileName, ChartImageFormat format)
+ {
+ throw new NotImplementedException ();
+ }
+ #endregion
+
+ #region Protected Methods
+
+
+ protected override void Dispose (bool disposing)
+ {
+ }
+
+
+
+ #endregion
+
#region Private Methods
private void PaintElement (ChartGraphics g, object element, ElementPosition position)
{
@@ -81,4 +286,4 @@ namespace System.Windows.Forms.DataVisualization.Charting
}
#endregion
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartArea.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartArea.cs
index 0d8a4c1c8f4..1a8ed82aec9 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartArea.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartArea.cs
@@ -1,6 +1,7 @@
//
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
+// Francis Fisher (frankie@terrorise.me.uk)
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
@@ -24,11 +25,73 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System;
+using System.Drawing;
namespace System.Windows.Forms.DataVisualization.Charting
{
public class ChartArea : ChartNamedElement
{
+ public ChartArea() {}
+ public ChartArea( string name ){
+ Name = name;
+ }
+
+ public AreaAlignmentOrientations AlignmentOrientation { get; set; }
+ public AreaAlignmentStyles AlignmentStyle { get; set; }
+ public string AlignWithChartArea { get; set; }
+ public ChartArea3DStyle Area3DStyle { get; set; }
+ public Axis[] Axes { get; set; }
+ public Axis AxisX { get; set; }
+ public Axis AxisX2 { get; set; }
+ public Axis AxisY { get; set; }
+ public Axis AxisY2 { get; set; }
+ public Color BackColor { get; set; }
+ public GradientStyle BackGradientStyle { get; set; }
+ public ChartHatchStyle BackHatchStyle { get; set; }
+ public string BackImage { get; set; }
+ public ChartImageAlignmentStyle BackImageAlignment { get; set; }
+ public Color BackImageTransparentColor { get; set; }
+ public ChartImageWrapMode BackImageWrapMode { get; set; }
+ public Color BackSecondaryColor { get; set; }
+ public Color BorderColor { get; set; }
+ public ChartDashStyle BorderDashStyle { get; set; }
+ public int BorderWidth { get; set; }
+ public Cursor CursorX { get; set; }
+ public Cursor CursorY { get; set; }
+ public ElementPosition InnerPlotPosition { get; set; }
+ public bool IsSameFontSizeForAllAxes { get; set; }
public override string Name { get; set; }
+ public ElementPosition Position { get; set; }
+ public Color ShadowColor { get; set; }
+ public int ShadowOffset { get; set; }
+ public virtual bool Visible { get; set; }
+
+
+ [MonoTODO]
+ protected override void Dispose (bool disposing)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public float GetSeriesDepth (Series series )
+ {
+ throw new NotImplementedException();
+ }
+ [MonoTODO]
+ public float GetSeriesZPosition (Series series)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void RecalculateAxesScale ()
+ {
+ throw new NotImplementedException();
+ }
+ [MonoTODO]
+ public void TransformPoints (Point3D[] points)
+ {
+ throw new NotImplementedException ();
+ }
}
}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartElement.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartElement.cs
index 20dbaf0ac69..4c3a7396552 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartElement.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartElement.cs
@@ -65,6 +65,7 @@ namespace System.Windows.Forms.DataVisualization.Charting
}
#endregion
+
#region Protected Methods
protected virtual void Dispose (bool disposing)
{
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartGraphics.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartGraphics.cs
index 7e3429b8321..e16b4375a2d 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartGraphics.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartGraphics.cs
@@ -1,6 +1,7 @@
//
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
+// Francis Fisher (frankie@terrorise.me.uk)
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
@@ -41,5 +42,53 @@ namespace System.Windows.Forms.DataVisualization.Charting
#region Public Properties
public Graphics Graphics { get; set; }
#endregion
+
+ [MonoTODO]
+ protected override void Dispose (bool disposing)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public PointF GetAbsolutePoint (PointF point)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public RectangleF GetAbsoluteRectangle (RectangleF rectangle)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public SizeF GetAbsoluteSize (SizeF size)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public double GetPositionFromAxis (string chartAreaName, AxisName axis, double axisValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public PointF GetRelativePoint (PointF point)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public RectangleF GetRelativeRectangle (RectangleF rectangle)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public SizeF GetRelativeSize (SizeF size)
+ {
+ throw new NotImplementedException ();
+ }
}
}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartNamedElementCollection.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartNamedElementCollection.cs
index 69bcba62ded..8c783d1d6e8 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartNamedElementCollection.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartNamedElementCollection.cs
@@ -1,6 +1,7 @@
//
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
+// Francis Fisher (frankie@terrorise.me.uk)
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
@@ -24,10 +25,78 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System;
+using System.Collections.Generic;
namespace System.Windows.Forms.DataVisualization.Charting
{
public class ChartNamedElementCollection<T> : ChartElementCollection<T> where T : ChartNamedElement
{
+ public T this[string name] { //FIXME this should probably be indexed
+ get{
+ foreach (T el in this) {
+ if (el.Name == name) {
+ return el;
+ }
+ }
+ throw new KeyNotFoundException (); //FIXME check what actual behaviour is in MS implementation
+ }
+
+ set{
+ for(int i = 0; i<this.Count; i++)
+ {
+ T el = this[i];
+ if (el.Name == name) {
+ this.SetItem (i, value);
+ return;
+ }
+ }
+ throw new KeyNotFoundException (); //FIXME check what actual behaviour is in MS implementation
+ }
+ }
+
+ protected virtual string NamePrefix { get; private set;}
+
+
+ [MonoTODO]
+ public virtual T FindByName (string name)
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ public int IndexOf (string name)
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ protected override void InsertItem (int index,T item)
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ public virtual bool IsUniqueName (string name)
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ public virtual string NextUniqueName ()
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ protected override void RemoveItem (int index)
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ protected override void SetItem (int index,T item)
+ {
+ throw new NotImplementedException();
+ }
}
}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartSerializer.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartSerializer.cs
new file mode 100644
index 00000000000..681ec040020
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ChartSerializer.cs
@@ -0,0 +1,100 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class ChartSerializer
+ {
+ public SerializationContents Content { get; set; }
+ public SerializationFormat Format { get; set; }
+ public bool IsResetWhenLoading { get; set; }
+ public bool IsTemplateMode { get; set; }
+ public bool IsUnknownAttributeIgnored { get; set; }
+ public string NonSerializableContent { get; set; }
+ public string SerializableContent { get; set; }
+
+
+ [MonoTODO]
+ protected string GetContentString (SerializationContents content, bool serializable)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Load (Stream stream)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Load (string fileName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Load (TextReader reader)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Load (XmlReader reader)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Reset ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Save (Stream stream)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void Save (string fileName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Save (TextWriter writer)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Save (XmlWriter writer)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Cursor.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Cursor.cs
new file mode 100644
index 00000000000..d4801da1d5d
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Cursor.cs
@@ -0,0 +1,83 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class Cursor : IDisposable
+ {
+ public Cursor ()
+ {
+ }
+
+ public bool AutoScroll { get; set; }
+ public AxisType AxisType { get; set; }
+ public double Interval { get; set; }
+ public double IntervalOffset { get; set; }
+ public DateTimeIntervalType IntervalOffsetType { get; set; }
+ public DateTimeIntervalType IntervalType { get; set; }
+ public bool IsUserEnabled { get; set; }
+ public bool IsUserSelectionEnabled { get; set; }
+ public Color LineColor { get; set; }
+ public ChartDashStyle LineDashStyle { get; set; }
+ public int LineWidth { get; set; }
+ public double Position { get; set; }
+ public Color SelectionColor { get; set; }
+ public double SelectionEnd { get; set; }
+ public double SelectionStart { get; set; }
+
+
+ [MonoTODO]
+ public void Dispose ()
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ protected virtual void Dispose (bool disposing)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void SetCursorPixelPosition (PointF point,bool roundToBoundary)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void SetCursorPosition (double newPosition)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void SetSelectionPixelPosition (PointF startPoint, PointF endPoint, bool roundToBoundary)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void SetSelectionPosition (double newStart, double newEnd)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CursorEventArgs.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CursorEventArgs.cs
new file mode 100644
index 00000000000..274192e6692
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CursorEventArgs.cs
@@ -0,0 +1,54 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class CursorEventArgs : EventArgs
+ {
+ public CursorEventArgs( ChartArea chartArea, Axis axis, double newPosition)
+ {
+ this.ChartArea = chartArea;
+ this.Axis = axis;
+ this.NewPosition = newPosition;
+ }
+
+ public CursorEventArgs(ChartArea chartArea, Axis axis, double newSelectionStart, double newSelectionEnd)
+ {
+ this.ChartArea = chartArea;
+ this.Axis = axis;
+ this.NewSelectionStart = newSelectionStart;
+ this.NewSelectionEnd = newSelectionEnd;
+ }
+
+ public Axis Axis { get; private set; }
+
+ public ChartArea ChartArea { get; private set; }
+
+ public double NewPosition { get; set; }
+
+ public double NewSelectionStart { get; set; }
+
+ public double NewSelectionEnd { get; set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CustomLabel.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CustomLabel.cs
new file mode 100644
index 00000000000..d5de054bdd9
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CustomLabel.cs
@@ -0,0 +1,71 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class CustomLabel : ChartNamedElement
+ {
+ public CustomLabel ()
+ {
+ }
+ public CustomLabel (double fromPosition, double toPosition, string text, int labelRow, LabelMarkStyle markStyle)
+ {
+ FromPosition = fromPosition;
+ ToPosition = toPosition;
+ Text = text;
+ RowIndex = labelRow;
+ LabelMark = markStyle;
+ }
+ public CustomLabel (double fromPosition, double toPosition, string text, int labelRow, LabelMarkStyle markStyle, GridTickTypes gridTick)
+ {
+ FromPosition = fromPosition;
+ ToPosition = toPosition;
+ Text = text;
+ RowIndex = labelRow;
+ LabelMark = markStyle;
+ GridTicks = gridTick;
+ }
+
+ public Axis Axis { get; private set; }
+ public Color ForeColor { get; set; }
+ public double FromPosition { get; set; }
+ public GridTickTypes GridTicks { get; set; }
+ public string Image { get; set; }
+ public Color ImageTransparentColor { get; set; }
+ public LabelMarkStyle LabelMark { get; set; }
+ public Color MarkColor { get; set; }
+ public override string Name { get; set; }
+ public int RowIndex { get; set; }
+ public string Text { get; set; }
+ public string ToolTip { get; set; }
+ public double ToPosition { get; set; }
+
+ [MonoTODO]
+ public CustomLabel Clone ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CustomLabelCollection.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CustomLabelCollection.cs
new file mode 100644
index 00000000000..31bf30a4ec4
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CustomLabelCollection.cs
@@ -0,0 +1,66 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class CustomLabelCollection : ChartElementCollection<CustomLabel>
+ {
+ [MonoTODO]
+ public void Add (double labelsStep, DateTimeIntervalType intervalType)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public CustomLabel Add (double fromPosition, double toPosition, string text)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void Add (double labelsStep, DateTimeIntervalType intervalType, string format)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public CustomLabel Add (double fromPosition, double toPosition, string text, int rowIndex, LabelMarkStyle markStyle)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void Add (double labelsStep, DateTimeIntervalType intervalType, string format, int rowIndex, LabelMarkStyle markStyle)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public CustomLabel Add (double fromPosition, double toPosition, string text, int rowIndex, LabelMarkStyle markStyle, GridTickTypes gridTick)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void Add ( double labelsStep, DateTimeIntervalType intervalType, double min, double max, string format, int rowIndex, LabelMarkStyle markStyle)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CustomProperties.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CustomProperties.cs
new file mode 100644
index 00000000000..62e28af7fe0
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CustomProperties.cs
@@ -0,0 +1,30 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class CustomProperties
+ {
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CustomizeLegendEventArgs.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CustomizeLegendEventArgs.cs
new file mode 100644
index 00000000000..cffaf95ebca
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/CustomizeLegendEventArgs.cs
@@ -0,0 +1,32 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class CustomizeLegendEventArgs : EventArgs
+ {
+ public LegendItemsCollection LegendItems { get; private set; }
+ public string LegendName { get; private set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataFormula.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataFormula.cs
new file mode 100644
index 00000000000..4072490ca4d
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataFormula.cs
@@ -0,0 +1,75 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class DataFormula
+ {
+ public bool IsEmptyPointIgnored { get; set; }
+ public bool IsStartFromFirst { get; set; }
+ public StatisticFormula Statistics { get; private set;}
+
+ [MonoTODO]
+ public void CopySeriesValues (string inputSeries,string outputSeries)
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ public void FinancialFormula (FinancialFormula formulaName,string inputSeries)
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ public void FinancialFormula (FinancialFormula formulaName,Series inputSeries)
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ public void FinancialFormula (FinancialFormula formulaName, string inputSeries, string outputSeries)
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ public void FinancialFormula(FinancialFormula formulaName, Series inputSeries, Series outputSeries)
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ public void FinancialFormula(FinancialFormula formulaName, string parameters, string inputSeries, string outputSeries)
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ public void FinancialFormula(FinancialFormula formulaName, string parameters, Series inputSeries, Series outputSeries)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataManipulator.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataManipulator.cs
new file mode 100644
index 00000000000..8d15d408c90
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataManipulator.cs
@@ -0,0 +1,329 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Data;
+using System.Collections.Generic;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class DataManipulator : DataFormula
+ {
+ public bool FilterMatchedPoints { get; set; }
+ public bool FilterSetEmptyPoints { get; set; }
+
+ [MonoTODO]
+ public DataSet ExportSeriesValues ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public DataSet ExportSeriesValues (Series series)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public DataSet ExportSeriesValues (string seriesNames)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Filter (IDataPointFilter filterInterface, string inputSeriesNames)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Filter (IDataPointFilter filterInterface, Series inputSeries)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Filter (CompareMethod compareMethod, double compareValue, string inputSeriesNames)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Filter (CompareMethod compareMethod, double compareValue, Series inputSeries)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Filter (DateRangeType dateRange, string rangeElements, string inputSeriesNames)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Filter (DateRangeType dateRange, string rangeElements, Series inputSeries)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Filter (IDataPointFilter filterInterface, string inputSeriesNames, string outputSeriesNames)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Filter (IDataPointFilter filterInterface, Series inputSeries, Series outputSeries)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Filter (CompareMethod compareMethod, double compareValue, string inputSeriesNames, string outputSeriesNames)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Filter (CompareMethod compareMethod, double compareValue, Series inputSeries, Series outputSeries)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Filter (DateRangeType dateRange, string rangeElements, string inputSeriesNames, string outputSeriesNames)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Filter (DateRangeType dateRange, string rangeElements, Series inputSeries, Series outputSeries)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Filter (CompareMethod compareMethod, double compareValue, string inputSeriesNames, string outputSeriesNames, string usingValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Filter (CompareMethod compareMethod, double compareValue, Series inputSeries, Series outputSeries, string usingValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void FilterTopN (int pointCount, string inputSeriesNames)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void FilterTopN (int pointCount, Series inputSeries)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void FilterTopN (int pointCount, string inputSeriesNames, string outputSeriesNames)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void FilterTopN (int pointCount, Series inputSeries, Series outputSeries)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void FilterTopN (int pointCount, string inputSeriesNames, string outputSeriesNames, string usingValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void FilterTopN (int pointCount, Series inputSeries, Series outputSeries, string usingValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void FilterTopN (int pointCount, string inputSeriesNames, string outputSeriesNames, string usingValue, bool getTopValues)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void FilterTopN (int pointCount, Series inputSeries, Series outputSeries, string usingValue, bool getTopValues)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Group (string formula, double interval, IntervalType intervalType, string inputSeriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Group (string formula, double interval, IntervalType intervalType, Series inputSeries)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Group (string formula, double interval, IntervalType intervalType, string inputSeriesName, string outputSeriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Group (string formula, double interval, IntervalType intervalType, Series inputSeries, Series outputSeries)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Group (string formula, double interval, IntervalType intervalType, double intervalOffset, IntervalType intervalOffsetType, string inputSeriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Group (string formula, double interval, IntervalType intervalType, double intervalOffset, IntervalType intervalOffsetType, Series inputSeries)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Group (string formula, double interval, IntervalType intervalType, double intervalOffset, IntervalType intervalOffsetType, string inputSeriesName, string outputSeriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Group (string formula, double interval, IntervalType intervalType, double intervalOffset, IntervalType intervalOffsetType, Series inputSeries, Series outputSeries)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void GroupByAxisLabel (string formula, string inputSeriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void GroupByAxisLabel (string formula, Series inputSeries)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void GroupByAxisLabel (string formula, string inputSeriesName, string outputSeriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void GroupByAxisLabel (string formula, Series inputSeries, Series outputSeries)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void InsertEmptyPoints (double interval, IntervalType intervalType, string seriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void InsertEmptyPoints (double interval, IntervalType intervalType, Series series)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void InsertEmptyPoints (double interval, IntervalType intervalType, double intervalOffset, IntervalType intervalOffsetType, string seriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void InsertEmptyPoints (double interval, IntervalType intervalType, double intervalOffset, IntervalType intervalOffsetType, Series series)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void InsertEmptyPoints (double interval, IntervalType intervalType, double intervalOffset, IntervalType intervalOffsetType, double fromXValue, double toXValue, string seriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void InsertEmptyPoints (double interval, IntervalType intervalType, double intervalOffset, IntervalType intervalOffsetType, double fromXValue, double toXValue, Series series)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Sort (IComparer<DataPoint> comparer, string seriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Sort (IComparer<DataPoint> comparer, Series series)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Sort (PointSortOrder pointSortOrder, string seriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Sort (PointSortOrder pointSortOrder, Series series)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Sort (PointSortOrder pointSortOrder, string sortBy, string seriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Sort (PointSortOrder pointSortOrder, string sortBy, Series series)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataPoint.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataPoint.cs
index 587cbdd938d..76a4a03438d 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataPoint.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataPoint.cs
@@ -28,8 +28,7 @@ using System.Linq;
namespace System.Windows.Forms.DataVisualization.Charting
{
- [MonoTODO ("Base class should be DataPointCustomProperties")]
- public class DataPoint : ChartNamedElement
+ public class DataPoint : DataPointCustomProperties
{
#region Constructors
public DataPoint ()
@@ -39,32 +38,38 @@ namespace System.Windows.Forms.DataVisualization.Charting
public DataPoint (double xValue, double yValue)
{
XValue = xValue;
- YValue = new double[] { yValue };
+ YValues = new double[] { yValue };
}
public DataPoint (double xValue, double[] yValues)
{
XValue = xValue;
- YValue = yValues;
+ YValues = yValues;
}
[MonoTODO ()]
public DataPoint (Series series)
{
}
+
+ [MonoTODO ()]
+ public DataPoint(double xValue, string yValues)
+ {
+ }
+
#endregion
#region Public Properties
public bool IsEmpty { get; set; }
public override string Name { get; set; }
public double XValue { get; set; }
- public double[] YValue { get; set; }
+ public double[] YValues { get; set; }
#endregion
#region Public Methods
public DataPoint Clone ()
{
- DataPoint clone = new DataPoint (XValue, YValue);
+ DataPoint clone = new DataPoint (XValue, YValues);
clone.IsEmpty = IsEmpty;
clone.Name = Name;
@@ -83,17 +88,17 @@ namespace System.Windows.Forms.DataVisualization.Charting
if (valueName.StartsWith ("y")) {
if (valueName.Length == 1)
- return YValue[0];
+ return YValues[0];
int index = 0;
if (int.TryParse (valueName.Substring (1), out index)) {
- if (index > YValue.Length)
+ if (index > YValues.Length)
throw new ArgumentException ("Y index greater than number of YValues");
if (index == 0)
throw new ArgumentException ("Y index must be greater than zero");
- return YValue[index - 1];
+ return YValues[index - 1];
}
}
@@ -103,12 +108,12 @@ namespace System.Windows.Forms.DataVisualization.Charting
public void SetValueXY (object xValue, params object[] yValue)
{
XValue = (double)xValue;
- YValue = yValue.Cast<double> ().ToArray ();
+ YValues = yValue.Cast<double> ().ToArray ();
}
public void SetValueY (params object[] yValue)
{
- YValue = yValue.Cast<double> ().ToArray ();
+ YValues = yValue.Cast<double> ().ToArray ();
}
#endregion
}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataPointCollection.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataPointCollection.cs
index 0d2cc6ae103..6dc57ab3d59 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataPointCollection.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataPointCollection.cs
@@ -1,6 +1,7 @@
//
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
+// Francis Fisher (frankie@terrorise.me.uk)
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
@@ -29,5 +30,154 @@ namespace System.Windows.Forms.DataVisualization.Charting
{
public class DataPointCollection : ChartElementCollection<DataPoint>
{
+ [MonoTODO]
+ public DataPoint Add (params double[] y)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public int AddXY (double xValue, double yValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public int AddXY (Object xValue, params Object[] yValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public int AddY (double yValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public int AddY (params Object[] yValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ protected override void ClearItems ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void DataBind (System.Collections.IEnumerable dataSource, string xField, string yFields, string otherFields)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void DataBindXY (System.Collections.IEnumerable xValue, params System.Collections.IEnumerable[] yValues)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void DataBindXY (System.Collections.IEnumerable xValue, string xField, System.Collections.IEnumerable yValue, string yFields)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void DataBindY (params System.Collections.IEnumerable[] yValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void DataBindY (System.Collections.IEnumerable yValue, string yFields)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public System.Collections.Generic.IEnumerable<DataPoint> FindAllByValue (double valueToFind)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public System.Collections.Generic.IEnumerable<DataPoint> FindAllByValue (double valueToFind, string useValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public System.Collections.Generic.IEnumerable<DataPoint> FindAllByValue (double valueToFind, string useValue, int startIndex)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public DataPoint FindByValue (double valueToFind)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public DataPoint FindByValue (double valueToFind, string useValue)
+ {
+ return FindByValue( valueToFind, useValue, 0);
+ }
+
+ [MonoTODO]
+ public DataPoint FindByValue (double valueToFind, string useValue, int startIndex)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public DataPoint FindMaxByValue ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public DataPoint FindMaxByValue (string useValue)
+ {
+ return FindMaxByValue (useValue, 0);
+ }
+
+ [MonoTODO]
+ public DataPoint FindMaxByValue (string useValue, int startIndex)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public DataPoint FindMinByValue ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public DataPoint FindMinByValue (string useValue)
+ {
+ return FindMinByValue (useValue, 0);
+ }
+
+ [MonoTODO]
+ public DataPoint FindMinByValue (string useValue, int startIndex)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void InsertXY (int index, Object xValue, params Object[] yValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void InsertY (int index, params Object[] yValue)
+ {
+ throw new NotImplementedException ();
+ }
}
}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataPointCustomProperties.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataPointCustomProperties.cs
index 18a2acabd1d..4a185f574f2 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataPointCustomProperties.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataPointCustomProperties.cs
@@ -1,6 +1,7 @@
//
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
+// Francis Fisher (frankie@terrorise.me.uk)
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
@@ -24,10 +25,106 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System;
+using System.Drawing;
namespace System.Windows.Forms.DataVisualization.Charting
{
public class DataPointCustomProperties : ChartNamedElement
{
+ public virtual string AxisLabel { get; set; }
+ public GradientStyle BackGradientStyle { get; set; }
+ public ChartHatchStyle BackHatchStyle { get; set; }
+ public string BackImage { get; set; }
+ public ChartImageAlignmentStyle BackImageAlignment { get; set; }
+ public Color BackImageTransparentColor { get; set; }
+ public ChartImageWrapMode BackImageWrapMode { get; set; }
+ public Color BackSecondaryColor { get; set; }
+ public Color BorderColor { get; set; }
+ public ChartDashStyle BorderDashStyle { get; set; }
+ public int BorderWidth { get; set; }
+ public Color Color { get; set; }
+ public string CustomProperties { get; set; }
+ public CustomProperties CustomPropertiesExtended { get; set; }
+ public Font Font { get; set; }
+ public bool IsValueShownAsLabel { get; set; }
+ public bool IsVisibleInLegend { get; set; }
+
+ [MonoTODO]
+ public string this[int idx] {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+ [MonoTODO]
+ public string this[string propName] {
+ get {
+ throw new NotImplementedException ();
+ }
+ set {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public virtual string Label { get; set; }
+ public int LabelAngle { get; set; }
+ public Color LabelBackColor { get; set; }
+ public Color LabelBorderColor { get; set; }
+ public ChartDashStyle LabelBorderDashStyle { get; set; }
+ public int LabelBorderWidth { get; set; }
+ public Color LabelForeColor { get; set; }
+ public string LabelFormat { get; set; }
+ public string LabelToolTip { get; set; }
+ public string LegendText { get; set; }
+ public string LegendToolTip { get; set; }
+ public Color MarkerBorderColor { get; set; }
+ public int MarkerBorderWidth { get; set; }
+ public Color MarkerColor { get; set; }
+ public string MarkerImage { get; set; }
+ public Color MarkerImageTransparentColor { get; set; }
+ public int MarkerSize { get; set; }
+ public MarkerStyle MarkerStyle { get; set; }
+ public string ToolTip { get; set; }
+
+ #region Public methods
+ [MonoTODO]
+ public virtual void DeleteCustomProperty (string name)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public virtual string GetCustomProperty(string name)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public virtual bool IsCustomPropertySet(string name)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void ResetIsValueShownAsLabel ()
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void ResetIsVisibleInLegend ()
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public virtual void SetCustomProperty (string name,string propertyValue)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public virtual void SetDefault (bool clearAll)
+ {
+ throw new NotImplementedException ();
+ }
+
+ #endregion
}
}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/EllipseAnnotation.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/EllipseAnnotation.cs
new file mode 100644
index 00000000000..1ae20f27e2a
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/EllipseAnnotation.cs
@@ -0,0 +1,30 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class EllipseAnnotation : RectangleAnnotation
+ {
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/FTestResult.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/FTestResult.cs
new file mode 100644
index 00000000000..be200a7ac63
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/FTestResult.cs
@@ -0,0 +1,37 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class FTestResult
+ {
+ public double FCriticalValueOneTail { get; private set;}
+ public double FirstSeriesMean { get; private set;}
+ public double FirstSeriesVariance { get; private set;}
+ public double FValue { get; private set;}
+ public double ProbabilityFOneTail { get; private set;}
+ public double SecondSeriesMean { get; private set;}
+ public double SecondSeriesVariance { get; private set;}
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/HitTestResult.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/HitTestResult.cs
new file mode 100644
index 00000000000..41d685a9d87
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/HitTestResult.cs
@@ -0,0 +1,40 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class HitTestResult
+ {
+ public Axis Axis { get; set; }
+ public ChartArea ChartArea { get; set; }
+ public ChartElementType ChartElementType { get; set; }
+ public int PointIndex { get; set; }
+ public Series Series { get; set; }
+ public Object Object { get; set; }
+ public Object SubObject { get; set; }
+ }
+}
+
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/HorizontalLineAnnotation.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/HorizontalLineAnnotation.cs
new file mode 100644
index 00000000000..38519c8646b
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/HorizontalLineAnnotation.cs
@@ -0,0 +1,30 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class HorizontalLineAnnotation : LineAnnotation
+ {
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ImageAnnotation.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ImageAnnotation.cs
new file mode 100644
index 00000000000..a2b8869a400
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ImageAnnotation.cs
@@ -0,0 +1,47 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class ImageAnnotation : Annotation
+ {
+ public override ContentAlignment Alignment { get; set; }
+ public override string AnnotationType { get { throw new NotImplementedException (); } } //FIXME - find out what MS implementation returns here
+ public override Color BackColor { get; set; }
+ public override GradientStyle BackGradientStyle { get; set; }
+ public override ChartHatchStyle BackHatchStyle { get; set; }
+ public override Color BackSecondaryColor { get; set; }
+ public override Font Font { get; set; }
+ public override Color ForeColor { get; set; }
+ public virtual string Image { get; set; }
+ public Color ImageTransparentColor { get; set; }
+ public ChartImageWrapMode ImageWrapMode { get; set; }
+ public override Color LineColor { get; set; }
+ public override ChartDashStyle LineDashStyle { get; set; }
+ public override int LineWidth { get; set; }
+ public override TextStyle TextStyle { get; set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LabelStyle.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LabelStyle.cs
new file mode 100644
index 00000000000..2e817375fad
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LabelStyle.cs
@@ -0,0 +1,44 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class LabelStyle : ChartElement
+ {
+ public int Angle { get; set; }
+ public bool Enabled { get; set; }
+ public Font Font { get; set; }
+ public Color ForeColor { get; set; }
+ public string Format { get; set; }
+ public double Interval { get; set; }
+ public DateTimeIntervalType IntervalType { get; set; }
+ public double IntervalOffset { get; set; }
+ public DateTimeIntervalType IntervalOffsetType { get; set; }
+ public bool IsEndLabelVisible { get; set; }
+ public bool IsStaggered { get; set; }
+ public bool TruncatedLabels { get; set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Legend.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Legend.cs
new file mode 100644
index 00000000000..024ae6533d0
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Legend.cs
@@ -0,0 +1,92 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class Legend : ChartNamedElement
+ {
+ public Legend ()
+ {
+ }
+ public Legend (string name)
+ {
+ Name = name;
+ }
+
+ public StringAlignment Alignment { get; set; }
+ public int AutoFitMinFontSize { get; set; }
+ public Color BackColor { get; set; }
+ public GradientStyle BackGradientStyle { get; set; }
+ public ChartHatchStyle BackHatchStyle { get; set; }
+ public string BackImage { get; set; }
+ public ChartImageAlignmentStyle BackImageAlignment { get; set; }
+ public Color BackImageTransparentColor { get; set; }
+ public ChartImageWrapMode BackImageWrapMode { get; set; }
+ public Color BackSecondaryColor { get; set; }
+ public Color BorderColor { get; set; }
+ public ChartDashStyle BorderDashStyle { get; set; }
+ public int BorderWidth { get; set; }
+ public LegendCellColumnCollection CellColumns { get; private set; }
+ public LegendItemsCollection CustomItems { get; private set; }
+ public string DockedToChartArea { get; set; }
+ public Docking Docking { get; set; }
+ public bool Enabled { get; set; }
+ public Font Font { get; set; }
+ public Color ForeColor { get; set; }
+ public LegendSeparatorStyle HeaderSeparator { get; set; }
+ public Color HeaderSeparatorColor { get; set; }
+ public string InsideChartArea { get; set; }
+ public bool InterlacedRows { get; set; }
+ public Color InterlacedRowsColor { get; set; }
+ public bool IsDockedInsideChartArea { get; set; }
+ public bool IsEquallySpacedItems { get; set; }
+ public bool IsTextAutoFit { get; set; }
+ public LegendSeparatorStyle ItemColumnSeparator { get; set; }
+ public Color ItemColumnSeparatorColor { get; set; }
+ public int ItemColumnSpacing { get; set; }
+ public LegendItemOrder LegendItemOrder { get; set; }
+ public LegendStyle LegendStyle { get; set; }
+ public float MaximumAutoSize { get; set; }
+ public override string Name { get; set; }
+ public ElementPosition Position { get; set; }
+ public Color ShadowColor { get; set; }
+ public int ShadowOffset { get; set; }
+ public LegendTableStyle TableStyle { get; set; }
+ public int TextWrapThreshold { get; set; }
+ public string Title { get; set; }
+ public StringAlignment TitleAlignment { get; set; }
+ public Color TitleBackColor { get; set; }
+ public Font TitleFont { get; set; }
+ public Color TitleForeColor { get; set; }
+ public LegendSeparatorStyle TitleSeparator { get; set; }
+ public Color TitleSeparatorColor { get; set; }
+
+ [MonoTODO]
+ protected override void Dispose(bool disposing){
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCell.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCell.cs
new file mode 100644
index 00000000000..1abb4211c98
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCell.cs
@@ -0,0 +1,61 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class LegendCell : ChartNamedElement
+ {
+ public LegendCell ()
+ {
+ }
+ public LegendCell (string text)
+ {
+ }
+ public LegendCell (LegendCellType cellType, string text)
+ {
+ }
+ public LegendCell (LegendCellType cellType, string text, ContentAlignment alignment)
+ {
+ }
+
+ public virtual ContentAlignment Alignment { get; set; }
+ public virtual Color BackColor { get; set; }
+ public virtual int CellSpan { get; set; }
+ public virtual LegendCellType CellType { get; set; }
+ public virtual Font Font { get; set; }
+ public virtual Color ForeColor { get; set; }
+ public virtual string Image { get; set; }
+ public virtual Size ImageSize { get; set; }
+ public virtual Color ImageTransparentColor { get; set; }
+ public virtual Legend Legend { get; private set;}
+ public virtual LegendItem LegendItem { get; private set;}
+ public virtual Margins Margins { get; set; }
+ public override string Name { get; set; }
+ public virtual Size SeriesSymbolSize { get; set; }
+ public virtual string Text { get; set; }
+ public virtual string ToolTip { get; set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCellCollection.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCellCollection.cs
new file mode 100644
index 00000000000..8eeb51b02fa
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCellCollection.cs
@@ -0,0 +1,43 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class LegendCellCollection : ChartNamedElementCollection<LegendCell>
+ {
+ [MonoTODO]
+ public int Add (LegendCellType cellType, string text, ContentAlignment alignment)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void Insert (int index, LegendCellType cellType, string text, ContentAlignment alignment)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCellColumn.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCellColumn.cs
new file mode 100644
index 00000000000..4a8d880feac
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCellColumn.cs
@@ -0,0 +1,50 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class LegendCellColumn : ChartNamedElement
+ {
+ public virtual ContentAlignment Alignment { get; set; }
+ public virtual Color BackColor { get; set; }
+ public virtual LegendCellColumnType ColumnType { get; set; }
+ public virtual Font Font { get; set; }
+ public virtual Color ForeColor { get; set; }
+ public StringAlignment HeaderAlignment { get; set; }
+ public virtual Color HeaderBackColor { get; set; }
+ public virtual Font HeaderFont { get; set; }
+ public virtual Color HeaderForeColor { get; set; }
+ public virtual string HeaderText { get; set; }
+ public virtual Legend Legend { get; private set;}
+ public virtual Margins Margins { get; set; }
+ public virtual int MaximumWidth { get; set; }
+ public virtual int MinimumWidth { get; set; }
+ public override string Name { get; set; }
+ public virtual Size SeriesSymbolSize { get; set; }
+ public virtual string Text { get; set; }
+ public virtual string ToolTip { get; set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCellColumnCollection.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCellColumnCollection.cs
new file mode 100644
index 00000000000..5063f9e64e2
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCellColumnCollection.cs
@@ -0,0 +1,39 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class LegendCellColumnCollection : ChartNamedElementCollection<LegendCellColumn>
+ {
+
+ [MonoTODO]
+ protected override void Dispose (bool disposing)
+ {
+ throw new NotImplementedException();
+ }
+
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCollection.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCollection.cs
new file mode 100644
index 00000000000..ee1a44ef78f
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendCollection.cs
@@ -0,0 +1,30 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class LegendCollection : ChartNamedElementCollection<Legend>
+ {
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendItem.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendItem.cs
new file mode 100644
index 00000000000..89d99ec3a40
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendItem.cs
@@ -0,0 +1,72 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class LegendItem : ChartNamedElement
+ {
+ public LegendItem ()
+ {
+ Cells = new LegendCellCollection ();
+ }
+ public LegendItem (string name,Color color,string image)
+ {
+ this.Name = name;
+ this.Color = color;
+ this.Image = image;
+ Cells = new LegendCellCollection ();
+ }
+
+ public GradientStyle BackGradientStyle { get; set; }
+ public ChartHatchStyle BackHatchStyle { get; set; }
+ public Color BackImageTransparentColor { get; set; }
+ public Color BackSecondaryColor { get; set; }
+ public Color BorderColor { get; set; }
+ public ChartDashStyle BorderDashStyle { get; set; }
+ public int BorderWidth { get; set; }
+ public LegendCellCollection Cells { get; private set; }
+ public Color Color { get; set; }
+ public bool Enabled { get; set; }
+ public string Image { get; set; }
+ public LegendImageStyle ImageStyle { get; set; }
+ public Legend Legend { get; private set;}
+ public Color MarkerBorderColor { get; set; }
+ public int MarkerBorderWidth { get; set; }
+ public Color MarkerColor { get; set; }
+ public string MarkerImage { get; set; }
+ public Color MarkerImageTransparentColor { get; set; }
+ public int MarkerSize { get; set; }
+ public MarkerStyle MarkerStyle { get; set; }
+ public override string Name { get; set; }
+ public Color SeparatorColor { get; set; }
+ public LegendSeparatorStyle SeparatorType { get; set; }
+ public string SeriesName { get; set; }
+ public int SeriesPointIndex { get; set; }
+ public Color ShadowColor { get; set; }
+ public int ShadowOffset { get; set; }
+ public string ToolTip { get; set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendItemsCollection.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendItemsCollection.cs
new file mode 100644
index 00000000000..09a5d45a346
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LegendItemsCollection.cs
@@ -0,0 +1,57 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class LegendItemsCollection : ChartElementCollection<LegendItem>
+ {
+ [MonoTODO]
+ public int Add (Color color, string text)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public int Add (string image, string text)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void Insert (int index, Color color, string text)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void Insert (int index, string image, string text)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void Reverse()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LineAnnotation.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LineAnnotation.cs
new file mode 100644
index 00000000000..803f9aa4551
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/LineAnnotation.cs
@@ -0,0 +1,46 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class LineAnnotation : Annotation
+ {
+ public override ContentAlignment Alignment { get; set; }
+ public override ContentAlignment AnchorAlignment { get; set; }
+ public override string AnnotationType { get { throw new NotImplementedException (); } } //FIXME - find out what MS implementation returns here
+ public override Color BackColor { get; set; }
+ public override GradientStyle BackGradientStyle { get; set; }
+ public override ChartHatchStyle BackHatchStyle { get; set; }
+ public override Color BackSecondaryColor { get; set; }
+ public virtual LineAnchorCapStyle EndCap { get; set; }
+ public override Font Font { get; set; }
+ public override Color ForeColor { get; set; }
+ public virtual bool IsInfinitive { get; set; }
+ public override bool IsSizeAlwaysRelative { get; set; }
+ public virtual LineAnchorCapStyle StartCap { get; set; }
+ public override TextStyle TextStyle { get; set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/PolygonAnnotation.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/PolygonAnnotation.cs
new file mode 100644
index 00000000000..21c2c177844
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/PolygonAnnotation.cs
@@ -0,0 +1,30 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class PolygonAnnotation : PolylineAnnotation
+ {
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/PolylineAnnotation.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/PolylineAnnotation.cs
new file mode 100644
index 00000000000..691695bb1bc
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/PolylineAnnotation.cs
@@ -0,0 +1,51 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+using System.Drawing.Drawing2D;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class PolylineAnnotation : Annotation
+ {
+ public PolylineAnnotation ()
+ {
+ GraphicsPathPoints = new AnnotationPathPointCollection ();
+ }
+ public override ContentAlignment Alignment { get; set; }
+ public override string AnnotationType { get { throw new NotImplementedException (); } } //FIXME - find out what MS implementation returns here
+ public override Color BackColor { get; set; }
+ public override GradientStyle BackGradientStyle { get; set; }
+ public override ChartHatchStyle BackHatchStyle { get; set; }
+ public override Color BackSecondaryColor { get; set; }
+ public virtual LineAnchorCapStyle EndCap { get; set; }
+ public override Font Font { get; set; }
+ public override Color ForeColor { get; set; }
+ public virtual GraphicsPath GraphicsPath { get; set; }
+ public AnnotationPathPointCollection GraphicsPathPoints { get; private set; }
+ public virtual bool IsFreeDrawPlacement { get; set; }
+ public virtual LineAnchorCapStyle StartCap { get; set; }
+ public override TextStyle TextStyle { get; set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/PrintingManager.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/PrintingManager.cs
new file mode 100644
index 00000000000..a9e7397511e
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/PrintingManager.cs
@@ -0,0 +1,65 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+using System.Drawing.Printing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class PrintingManager : IDisposable
+ {
+ public PrintDocument PrintDocument { get; set; }
+
+ [MonoTODO]
+ public void Dispose ()
+ {
+ throw new NotImplementedException();
+ }
+ [MonoTODO]
+ protected virtual void Dispose (bool disposing)
+ {
+ throw new NotImplementedException();
+ }
+ [MonoTODO]
+ public void PageSetup ()
+ {
+ throw new NotImplementedException();
+ }
+ [MonoTODO]
+ public void Print (bool showPrintDialog)
+ {
+ throw new NotImplementedException();
+ }
+ [MonoTODO]
+ public void PrintPaint (Graphics graphics,Rectangle position)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void PrintPreview ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/RectangleAnnotation.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/RectangleAnnotation.cs
new file mode 100644
index 00000000000..0fe95b71a9e
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/RectangleAnnotation.cs
@@ -0,0 +1,33 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class RectangleAnnotation : TextAnnotation
+ {
+ public override string AnnotationType { get { throw new NotImplementedException (); } } //FIXME - find out what MS implementation returns here
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ScrollBarEventArgs.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ScrollBarEventArgs.cs
new file mode 100644
index 00000000000..a62650df898
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ScrollBarEventArgs.cs
@@ -0,0 +1,38 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class ScrollBarEventArgs : EventArgs
+ {
+ public Axis Axis { get; private set; }
+ public ScrollBarButtonType ButtonType { get; private set;}
+ public ChartArea ChartArea { get; private set;}
+ public bool IsHandled { get; set; }
+ public int MousePositionX { get; private set; }
+ public int MousePositionY { get; private set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Series.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Series.cs
index 856bd4f213e..4c64b0c72ff 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Series.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Series.cs
@@ -1,6 +1,7 @@
//
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
+// Francis Fisher (frankie@terrorise.me.uk)
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
@@ -24,6 +25,8 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using System;
+using System.Drawing;
+using System.Collections.Generic;
namespace System.Windows.Forms.DataVisualization.Charting
{
@@ -33,9 +36,61 @@ namespace System.Windows.Forms.DataVisualization.Charting
{
Points = new DataPointCollection ();
}
+ public Series (string name)
+ {
+ Name = name;
+ }
+ public Series (string name,int yValues)
+ {
+ Name = name;
+ YValuesPerPoint = yValues;
+ }
+ public override string AxisLabel { get; set; }
public string ChartArea { get; set; }
+ public SeriesChartType ChartType { get; set; }
+ public string ChartTypeName { get; set; }
+ public DataPointCustomProperties EmptyPointStyle { get; set; }
+ public bool Enabled { get; set; }
+ public bool IsXValueIndexed { get; set; }
+ public string Legend { get; set; }
+ public int MarkerStep { get; set; }
public override string Name { get; set; }
+ public ChartColorPalette Palette { get; set; }
public DataPointCollection Points { get; private set; }
+ public Color ShadowColor { get; set; }
+ public int ShadowOffset { get; set; }
+ public SmartLabelStyle SmartLabelStyle { get; set; }
+ public AxisType XAxisType { get; set; }
+ public string XValueMember { get; set; }
+ public ChartValueType XValueType { get; set; }
+ public AxisType YAxisType { get; set; }
+ public string YValueMembers { get; set; }
+ public ChartValueType YValueType { get; set; }
+
+ public int YValuesPerPoint { get; set; }
+
+
+ [MonoTODO]
+ protected override void Dispose (bool disposing)
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ public void Sort (IComparer<DataPoint> comparer)
+ {
+ throw new NotImplementedException();
+ }
+ [MonoTODO]
+ public void Sort (PointSortOrder pointSortOrder)
+ {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public void Sort (PointSortOrder pointSortOrder,string sortBy)
+ {
+ throw new NotImplementedException();
+ }
}
}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/SmartLabelStyle.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/SmartLabelStyle.cs
new file mode 100644
index 00000000000..282f4282ecb
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/SmartLabelStyle.cs
@@ -0,0 +1,45 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class SmartLabelStyle
+ {
+ public virtual LabelOutsidePlotAreaStyle AllowOutsidePlotArea { get; set; }
+ public virtual Color CalloutBackColor { get; set; }
+ public virtual LineAnchorCapStyle CalloutLineAnchorCapStyle { get; set; }
+ public virtual Color CalloutLineColor { get; set; }
+ public virtual ChartDashStyle CalloutLineDashStyle { get; set; }
+ public virtual int CalloutLineWidth { get; set; }
+ public virtual LabelCalloutStyle CalloutStyle { get; set; }
+ public virtual bool Enabled { get; set; }
+ public virtual bool IsMarkerOverlappingAllowed { get; set; }
+ public virtual bool IsOverlappedHidden { get; set; }
+ public virtual double MaxMovingDistance { get; set; }
+ public virtual double MinMovingDistance { get; set; }
+ public virtual LabelAlignmentStyles MovingDirection { get; set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/StatisticFormula.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/StatisticFormula.cs
new file mode 100644
index 00000000000..ad7607d7f2e
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/StatisticFormula.cs
@@ -0,0 +1,147 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class StatisticFormula
+ {
+ [MonoTODO]
+ public AnovaResult Anova (double probability, string inputSeriesNames)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public double BetaFunction (double m, double n)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public double Correlation (string firstInputSeriesName, string secondInputSeriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public double Covariance (string firstInputSeriesName, string secondInputSeriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public double FDistribution (double value, int firstDegreeOfFreedom, int secondDegreeOfFreedom)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public FTestResult FTest (double probability, string firstInputSeriesName, string secondInputSeriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public double GammaFunction (double value)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public double InverseFDistribution (double probability, int firstDegreeOfFreedom, int secondDegreeOfFreedom){
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public double InverseNormalDistribution (double probability)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public double InverseTDistribution (double probability, int degreeOfFreedom)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public double Mean (string inputSeriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public double Median (string inputSeriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public double NormalDistribution (double zValue)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public double TDistribution (double value, int degreeOfFreedom, bool oneTail)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public TTestResult TTestEqualVariances (double hypothesizedMeanDifference, double probability,
+ string firstInputSeriesName, string secondInputSeriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public TTestResult TTestPaired (double hypothesizedMeanDifference, double probability,
+ string firstInputSeriesName, string secondInputSeriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public TTestResult TTestUnequalVariances (double hypothesizedMeanDifference, double probability,
+ string firstInputSeriesName, string secondInputSeriesName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public double Variance (string inputSeriesName, bool sampleVariance)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public ZTestResult ZTest (double hypothesizedMeanDifference, double varianceFirstGroup,
+ double varianceSecondGroup, double probability,
+ string firstInputSeriesName, string secondInputSeriesName)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/StripLine.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/StripLine.cs
new file mode 100644
index 00000000000..1ee810197a4
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/StripLine.cs
@@ -0,0 +1,57 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class StripLine : ChartElement
+ {
+ public Color BackColor { get; set; }
+ public GradientStyle BackGradientStyle { get; set; }
+ public ChartHatchStyle BackHatchStyle { get; set; }
+ public string BackImage { get; set; }
+ public ChartImageAlignmentStyle BackImageAlignment { get; set; }
+ public Color BackImageTransparentColor { get; set; }
+ public ChartImageWrapMode BackImageWrapMode { get; set; }
+ public Color BackSecondaryColor { get; set; }
+ public Color BorderColor { get; set; }
+ public ChartDashStyle BorderDashStyle { get; set; }
+ public int BorderWidth { get; set; }
+ public Font Font { get; set; }
+ public Color ForeColor { get; set; }
+ public double Interval { get; set; }
+ public double IntervalOffset { get; set; }
+ public DateTimeIntervalType IntervalOffsetType { get; set; }
+ public DateTimeIntervalType IntervalType { get; set; }
+ public string Name { get; private set; }
+ public double StripWidth { get; set; }
+ public DateTimeIntervalType StripWidthType { get; set; }
+ public string Text { get; set; }
+ public StringAlignment TextAlignment { get; set; }
+ public StringAlignment TextLineAlignment { get; set; }
+ public TextOrientation TextOrientation { get; set; }
+ public string ToolTip { get; set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnchorStyle.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/StripLinesCollection.cs
index b050463ea95..b9a98a8b5b7 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/AnchorStyle.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/StripLinesCollection.cs
@@ -1,8 +1,7 @@
-//
// Authors:
-// Jonathan Pobst (monkey@jpobst.com)
+// Francis Fisher (frankie@terrorise.me.uk)
//
-// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
+// (C) Francis Fisher 2013
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -23,14 +22,10 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-using System;
-
namespace System.Windows.Forms.DataVisualization.Charting
{
- public enum MarkerStyle
+
+ public class StripLinesCollection : ChartElementCollection<StripLine>
{
- Simple = 0,
- DoubleArrow = 1,
- Tailed = 2
}
}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/TTestResult.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/TTestResult.cs
new file mode 100644
index 00000000000..312d2548181
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/TTestResult.cs
@@ -0,0 +1,40 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class TTestResult
+ {
+ public double DegreeOfFreedom { get; private set;}
+ public double FirstSeriesMean { get; private set;}
+ public double FirstSeriesVariance { get; private set;}
+ public double ProbabilityTOneTail { get; private set;}
+ public double ProbabilityTTwoTail { get; private set;}
+ public double SecondSeriesMean { get; private set;}
+ public double SecondSeriesVariance { get; private set;}
+ public double TCriticalValueOneTail { get; private set;}
+ public double TCriticalValueTwoTail { get; private set;}
+ public double TValue { get; private set;}
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/TextAnnotation.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/TextAnnotation.cs
new file mode 100644
index 00000000000..9bbc074195e
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/TextAnnotation.cs
@@ -0,0 +1,43 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class TextAnnotation : Annotation
+ {
+ public override string AnnotationType { get { throw new NotImplementedException (); } } //FIXME - find out what MS implementation returns here
+ public override Color BackColor { get; set; }
+ public override GradientStyle BackGradientStyle { get; set; }
+ public override ChartHatchStyle BackHatchStyle { get; set; }
+ public override Color BackSecondaryColor { get; set; }
+ public override Font Font { get; set; }
+ public virtual bool IsMultiline { get; set; }
+ public override Color LineColor { get; set; }
+ public override ChartDashStyle LineDashStyle { get; set; }
+ public override int LineWidth { get; set; }
+ public virtual string Text { get; set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Title.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Title.cs
new file mode 100644
index 00000000000..ea6a19be889
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/Title.cs
@@ -0,0 +1,88 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class Title : ChartNamedElement, IDisposable
+ {
+ public Title ()
+ {
+ }
+ public Title (string text)
+ {
+ this.Text = text;
+ }
+ public Title (string text, Docking docking)
+ {
+ this.Text = text;
+ this.Docking = docking;
+ }
+ public Title (string text,
+ Docking docking,
+ Font font,
+ Color color)
+ {
+ this.Text = text;
+ this.Docking = docking;
+ this.Font = font;
+ this.ForeColor = color;
+ }
+
+ public ContentAlignment Alignment { get; set; }
+ public Color BackColor { get; set; }
+ public GradientStyle BackGradientStyle { get; set; }
+ public ChartHatchStyle BackHatchStyle { get; set; }
+ public string BackImage { get; set; }
+ public ChartImageAlignmentStyle BackImageAlignment { get; set; }
+ public Color BackImageTransparentColor { get; set; }
+ public ChartImageWrapMode BackImageWrapMode { get; set; }
+ public Color BackSecondaryColor { get; set; }
+ public Color BorderColor { get; set; }
+ public ChartDashStyle BorderDashStyle { get; set; }
+ public int BorderWidth { get; set; }
+ public string DockedToChartArea { get; set; }
+ public Docking Docking { get; set; }
+ public int DockingOffset { get; set; }
+ public Font Font { get; set; }
+ public Color ForeColor { get; set; }
+ public bool IsDockedInsideChartArea { get; set; }
+ public override string Name { get; set; }
+ public ElementPosition Position { get; set; }
+ public Color ShadowColor { get; set; }
+ public int ShadowOffset { get; set; }
+ public string Text { get; set; }
+ public TextOrientation TextOrientation { get; set; }
+ public TextStyle TextStyle { get; set; }
+ public string ToolTip { get; set; }
+ public virtual bool Visible { get; set; }
+
+ [MonoTODO]
+ protected override void Dispose (bool disposing)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/TitleCollection.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/TitleCollection.cs
new file mode 100644
index 00000000000..31c884ace2b
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/TitleCollection.cs
@@ -0,0 +1,30 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class TitleCollection : ChartNamedElementCollection<Title>
+ {
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ToolTipEventArgs.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ToolTipEventArgs.cs
index 0dff392b825..7828e88c6bd 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ToolTipEventArgs.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ToolTipEventArgs.cs
@@ -1,6 +1,7 @@
//
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
+// Francis Fisher (frankie@terrorise.me.uk)
//
// Copyright (C) 2009 Novell, Inc (http://www.novell.com)
//
@@ -31,9 +32,18 @@ namespace System.Windows.Forms.DataVisualization.Charting
public class ToolTipEventArgs : EventArgs
{
#region Constructors
- //public ToolTipEventArgs (int x, int y, string text, HitTestResult result)
- //{
- //}
+ public ToolTipEventArgs (int x, int y, string text, HitTestResult result)
+ {
+ X = x;
+ Y = y;
+ Text = text;
+ HitTestResult = result;
+ }
#endregion
+
+ public HitTestResult HitTestResult { get; private set;}
+ public string Text { get; set; }
+ public int X { get; private set; }
+ public int Y { get; private set;}
}
}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/VerticalLineAnnotation.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/VerticalLineAnnotation.cs
new file mode 100644
index 00000000000..5181204e5ef
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/VerticalLineAnnotation.cs
@@ -0,0 +1,30 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class VerticalLineAnnotation : LineAnnotation
+ {
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ViewEventArgs.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ViewEventArgs.cs
new file mode 100644
index 00000000000..97316087860
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ViewEventArgs.cs
@@ -0,0 +1,37 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// 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.Drawing;
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class ViewEventArgs : EventArgs
+ {
+ public Axis Axis { get; private set;}
+ public ChartArea ChartArea { get; private set;}
+ public double NewPosition { get; set; }
+ public double NewSize { get; set; }
+ public DateTimeIntervalType NewSizeType { get; set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ZTestResult.cs b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ZTestResult.cs
new file mode 100644
index 00000000000..5cde52efe62
--- /dev/null
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/ZTestResult.cs
@@ -0,0 +1,39 @@
+// Authors:
+// Francis Fisher (frankie@terrorise.me.uk)
+//
+// (C) Francis Fisher 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+namespace System.Windows.Forms.DataVisualization.Charting
+{
+ public class ZTestResult
+ {
+ public double FirstSeriesMean { get; private set; }
+ public double FirstSeriesVariance { get; private set; }
+ public double ProbabilityZOneTail { get; private set; }
+ public double ProbabilityZTwoTail { get; private set; }
+ public double SecondSeriesMean { get; private set; }
+ public double SecondSeriesVariance { get; private set; }
+ public double ZCriticalValueOneTail { get; private set; }
+ public double ZCriticalValueTwoTail { get; private set; }
+ public double ZValue { get; private set; }
+ }
+}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.csproj b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.csproj
index 6eda3b58e66..e041b9ef813 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.csproj
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.csproj
@@ -35,7 +35,6 @@
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
<Reference Include="System" />
- <Reference Include="System.configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
@@ -44,10 +43,10 @@
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
+ <Reference Include="System.Configuration" />
</ItemGroup>
<ItemGroup>
<Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="common\MonoTODOAttribute.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\Axis.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\AxisScaleView.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartArea3DStyle.cs" />
@@ -59,6 +58,8 @@
<Compile Include="System.Windows.Forms.DataVisualization.Charting\MarkerStyle.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\AnnotationPathPoint.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\AnnotationPathPointCollection.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\Annotation.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\AnnotationPositionChangingEventArgs.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\AnovaResult.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\AreaAlignmentOrientations.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\AreaAlignmentStyles.cs" />
@@ -92,6 +93,9 @@
<Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartNamedElement.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartNamedElementCollection.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartValueType.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\CursorEventArgs.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\CustomLabel.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\CustomLabelCollection.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\CompareMethod.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\DataPoint.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\DataPointCollection.cs" />
@@ -141,12 +145,60 @@
<Compile Include="System.Windows.Forms.DataVisualization.Charting\TickMark.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\TickMarkStyle.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\ToolTipEventArgs.cs" />
+ <Compile Include="..\..\build\common\Consts.cs">
+ <Link>Consts.cs</Link>
+ </Compile>
+ <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
+ <Link>MonoTODOAttribute.cs</Link>
+ </Compile>
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\LabelStyle.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\AxisScrollBar.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\StripLine.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\StripLinesCollection.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\Legend.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendCellColumn.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\ScrollBarEventArgs.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\ViewEventArgs.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\HitTestResult.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendItem.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\SmartLabelStyle.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\CustomProperties.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\Title.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\AnnotationCollection.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartSerializer.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\DataManipulator.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendCollection.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\PrintingManager.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\TitleCollection.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\DataFormula.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\BorderSkin.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendCellColumnCollection.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendItemsCollection.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendCell.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendCellCollection.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\CalloutAnnotation.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\TextAnnotation.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\LineAnnotation.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\RectangleAnnotation.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\AnnotationGroup.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\AnnotationSmartLabelStyle.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\Cursor.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\CustomizeLegendEventArgs.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\PolylineAnnotation.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\Border3DAnnotation.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\EllipseAnnotation.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\HorizontalLineAnnotation.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\ImageAnnotation.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\PolygonAnnotation.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\VerticalLineAnnotation.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\StatisticFormula.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\FTestResult.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\TTestResult.cs" />
+ <Compile Include="System.Windows.Forms.DataVisualization.Charting\ZTestResult.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="common\Consts.cs" />
+ <Folder Include="common\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
@@ -156,4 +208,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project> \ No newline at end of file
+</Project>
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.dll.sources b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.dll.sources
index 873a00f08dc..222e657e6df 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.dll.sources
+++ b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.dll.sources
@@ -3,22 +3,34 @@
Assembly/AssemblyInfo.cs
System.Windows.Forms.DataVisualization.Charting/AnnotationPathPoint.cs
System.Windows.Forms.DataVisualization.Charting/AnnotationPathPointCollection.cs
+System.Windows.Forms.DataVisualization.Charting/Annotation.cs
+System.Windows.Forms.DataVisualization.Charting/AnnotationCollection.cs
+System.Windows.Forms.DataVisualization.Charting/AnnotationGroup.cs
+System.Windows.Forms.DataVisualization.Charting/AnnotationPositionChangingEventArgs.cs
+System.Windows.Forms.DataVisualization.Charting/AnnotationSmartLabelStyle.cs
System.Windows.Forms.DataVisualization.Charting/AnovaResult.cs
System.Windows.Forms.DataVisualization.Charting/AntiAliasingStyles.cs
System.Windows.Forms.DataVisualization.Charting/AreaAlignmentOrientations.cs
System.Windows.Forms.DataVisualization.Charting/AreaAlignmentStyles.cs
System.Windows.Forms.DataVisualization.Charting/ArrowAnnotation.cs
System.Windows.Forms.DataVisualization.Charting/ArrowStyle.cs
+System.Windows.Forms.DataVisualization.Charting/Axis.cs
System.Windows.Forms.DataVisualization.Charting/AxisArrowStyle.cs
System.Windows.Forms.DataVisualization.Charting/AxisEnabled.cs
System.Windows.Forms.DataVisualization.Charting/AxisName.cs
System.Windows.Forms.DataVisualization.Charting/AxisScaleBreakStyle.cs
+System.Windows.Forms.DataVisualization.Charting/AxisScaleView.cs
+System.Windows.Forms.DataVisualization.Charting/AxisScrollBar.cs
System.Windows.Forms.DataVisualization.Charting/AxisType.cs
+System.Windows.Forms.DataVisualization.Charting/Border3DAnnotation.cs
+System.Windows.Forms.DataVisualization.Charting/BorderSkin.cs
System.Windows.Forms.DataVisualization.Charting/BorderSkinStyle.cs
System.Windows.Forms.DataVisualization.Charting/BreakLineStyle.cs
+System.Windows.Forms.DataVisualization.Charting/CalloutAnnotation.cs
System.Windows.Forms.DataVisualization.Charting/CalloutStyle.cs
System.Windows.Forms.DataVisualization.Charting/Chart.cs
System.Windows.Forms.DataVisualization.Charting/ChartArea.cs
+System.Windows.Forms.DataVisualization.Charting/ChartArea3DStyle.cs
System.Windows.Forms.DataVisualization.Charting/ChartAreaCollection.cs
System.Windows.Forms.DataVisualization.Charting/ChartColorPalette.cs
System.Windows.Forms.DataVisualization.Charting/ChartDashStyle.cs
@@ -33,8 +45,17 @@ System.Windows.Forms.DataVisualization.Charting/ChartImageWrapMode.cs
System.Windows.Forms.DataVisualization.Charting/ChartNamedElement.cs
System.Windows.Forms.DataVisualization.Charting/ChartNamedElementCollection.cs
System.Windows.Forms.DataVisualization.Charting/ChartPaintEventArgs.cs
+System.Windows.Forms.DataVisualization.Charting/ChartSerializer.cs
System.Windows.Forms.DataVisualization.Charting/ChartValueType.cs
+System.Windows.Forms.DataVisualization.Charting/Cursor.cs
+System.Windows.Forms.DataVisualization.Charting/CursorEventArgs.cs
+System.Windows.Forms.DataVisualization.Charting/CustomizeLegendEventArgs.cs
+System.Windows.Forms.DataVisualization.Charting/CustomLabel.cs
+System.Windows.Forms.DataVisualization.Charting/CustomLabelCollection.cs
+System.Windows.Forms.DataVisualization.Charting/CustomProperties.cs
System.Windows.Forms.DataVisualization.Charting/CompareMethod.cs
+System.Windows.Forms.DataVisualization.Charting/DataFormula.cs
+System.Windows.Forms.DataVisualization.Charting/DataManipulator.cs
System.Windows.Forms.DataVisualization.Charting/DataPoint.cs
System.Windows.Forms.DataVisualization.Charting/DataPointCollection.cs
System.Windows.Forms.DataVisualization.Charting/DataPointCustomProperties.cs
@@ -42,11 +63,17 @@ System.Windows.Forms.DataVisualization.Charting/DateRangeType.cs
System.Windows.Forms.DataVisualization.Charting/DateTimeIntervalType.cs
System.Windows.Forms.DataVisualization.Charting/Docking.cs
System.Windows.Forms.DataVisualization.Charting/ElementPosition.cs
+System.Windows.Forms.DataVisualization.Charting/EllipseAnnotation.cs
System.Windows.Forms.DataVisualization.Charting/FinancialFormula.cs
+System.Windows.Forms.DataVisualization.Charting/FTestResult.cs
System.Windows.Forms.DataVisualization.Charting/FormatNumberEventArgs.cs
System.Windows.Forms.DataVisualization.Charting/GradientStyle.cs
+System.Windows.Forms.DataVisualization.Charting/Grid.cs
System.Windows.Forms.DataVisualization.Charting/GridTickTypes.cs
+System.Windows.Forms.DataVisualization.Charting/HitTestResult.cs
+System.Windows.Forms.DataVisualization.Charting/HorizontalLineAnnotation.cs
System.Windows.Forms.DataVisualization.Charting/IDataPointFilter.cs
+System.Windows.Forms.DataVisualization.Charting/ImageAnnotation.cs
System.Windows.Forms.DataVisualization.Charting/IntervalAutoMode.cs
System.Windows.Forms.DataVisualization.Charting/IntervalType.cs
System.Windows.Forms.DataVisualization.Charting/LabelAlignmentStyles.cs
@@ -54,14 +81,24 @@ System.Windows.Forms.DataVisualization.Charting/LabelAutoFitStyles.cs
System.Windows.Forms.DataVisualization.Charting/LabelCalloutStyle.cs
System.Windows.Forms.DataVisualization.Charting/LabelMarkStyle.cs
System.Windows.Forms.DataVisualization.Charting/LabelOutsidePlotAreaStyle.cs
+System.Windows.Forms.DataVisualization.Charting/LabelStyle.cs
+System.Windows.Forms.DataVisualization.Charting/Legend.cs
+System.Windows.Forms.DataVisualization.Charting/LegendCell.cs
+System.Windows.Forms.DataVisualization.Charting/LegendCellCollection.cs
+System.Windows.Forms.DataVisualization.Charting/LegendCellColumn.cs
+System.Windows.Forms.DataVisualization.Charting/LegendCellColumnCollection.cs
System.Windows.Forms.DataVisualization.Charting/LegendCellColumnType.cs
System.Windows.Forms.DataVisualization.Charting/LegendCellType.cs
+System.Windows.Forms.DataVisualization.Charting/LegendCollection.cs
System.Windows.Forms.DataVisualization.Charting/LegendImageStyle.cs
+System.Windows.Forms.DataVisualization.Charting/LegendItem.cs
System.Windows.Forms.DataVisualization.Charting/LegendItemOrder.cs
+System.Windows.Forms.DataVisualization.Charting/LegendItemsCollection.cs
System.Windows.Forms.DataVisualization.Charting/LegendSeparatorStyle.cs
System.Windows.Forms.DataVisualization.Charting/LegendStyle.cs
System.Windows.Forms.DataVisualization.Charting/LegendTableStyle.cs
System.Windows.Forms.DataVisualization.Charting/LightStyle.cs
+System.Windows.Forms.DataVisualization.Charting/LineAnnotation.cs
System.Windows.Forms.DataVisualization.Charting/LineAnchorCapStyle.cs
System.Windows.Forms.DataVisualization.Charting/Margins.cs
System.Windows.Forms.DataVisualization.Charting/MarkerStyle.cs
@@ -69,16 +106,34 @@ System.Windows.Forms.DataVisualization.Charting/NamedImage.cs
System.Windows.Forms.DataVisualization.Charting/NamedImagesCollection.cs
System.Windows.Forms.DataVisualization.Charting/PointSortOrder.cs
System.Windows.Forms.DataVisualization.Charting/Point3D.cs
+System.Windows.Forms.DataVisualization.Charting/PolygonAnnotation.cs
+System.Windows.Forms.DataVisualization.Charting/PolylineAnnotation.cs
+System.Windows.Forms.DataVisualization.Charting/PrintingManager.cs
+System.Windows.Forms.DataVisualization.Charting/RectangleAnnotation.cs
System.Windows.Forms.DataVisualization.Charting/ScrollBarButtonStyles.cs
System.Windows.Forms.DataVisualization.Charting/ScrollBarButtonType.cs
+System.Windows.Forms.DataVisualization.Charting/ScrollBarEventArgs.cs
System.Windows.Forms.DataVisualization.Charting/ScrollType.cs
System.Windows.Forms.DataVisualization.Charting/SerializationContents.cs
System.Windows.Forms.DataVisualization.Charting/SerializationFormat.cs
System.Windows.Forms.DataVisualization.Charting/Series.cs
System.Windows.Forms.DataVisualization.Charting/SeriesChartType.cs
System.Windows.Forms.DataVisualization.Charting/SeriesCollection.cs
+System.Windows.Forms.DataVisualization.Charting/SmartLabelStyle.cs
+System.Windows.Forms.DataVisualization.Charting/StatisticFormula.cs
+System.Windows.Forms.DataVisualization.Charting/StripLine.cs
+System.Windows.Forms.DataVisualization.Charting/StripLinesCollection.cs
System.Windows.Forms.DataVisualization.Charting/StartFromZero.cs
+System.Windows.Forms.DataVisualization.Charting/TextAnnotation.cs
System.Windows.Forms.DataVisualization.Charting/TextAntiAliasingQuality.cs
System.Windows.Forms.DataVisualization.Charting/TextOrientation.cs
System.Windows.Forms.DataVisualization.Charting/TextStyle.cs
+System.Windows.Forms.DataVisualization.Charting/TickMark.cs
System.Windows.Forms.DataVisualization.Charting/TickMarkStyle.cs
+System.Windows.Forms.DataVisualization.Charting/Title.cs
+System.Windows.Forms.DataVisualization.Charting/TitleCollection.cs
+System.Windows.Forms.DataVisualization.Charting/ToolTipEventArgs.cs
+System.Windows.Forms.DataVisualization.Charting/TTestResult.cs
+System.Windows.Forms.DataVisualization.Charting/VerticalLineAnnotation.cs
+System.Windows.Forms.DataVisualization.Charting/ViewEventArgs.cs
+System.Windows.Forms.DataVisualization.Charting/ZTestResult.cs
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/Test/ChartingTests.csproj b/mcs/class/System.Windows.Forms.DataVisualization/Test/ChartingTests.csproj
index d2583d7cd19..bdb8077f3d2 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/Test/ChartingTests.csproj
+++ b/mcs/class/System.Windows.Forms.DataVisualization/Test/ChartingTests.csproj
@@ -34,6 +34,7 @@
<Reference Include="nunit.framework, Version=2.5.2.9222, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\NUnit 2.5.2\bin\net-2.0\framework\nunit.framework.dll</HintPath>
+ <Package>nunit</Package>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -51,12 +52,8 @@
<Compile Include="System.Windows.Forms.DataVisualization.Charting\AnovaResultTest.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\ArrowAnnotationTest.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\AxisScaleBreakStyleTest.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartElementCollectionTest.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartElementTest.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartNamedElementCollectionTest.cs" />
<Compile Include="System.Windows.Forms.DataVisualization.Charting\DataPointTest.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\GridTest.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\TickMarkTest.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
diff --git a/mcs/class/System.XML/Mono.Xml.Schema/XmlSchemaValidatingReader.cs b/mcs/class/System.XML/Mono.Xml.Schema/XmlSchemaValidatingReader.cs
index 43f0a75d098..c6a85fbea49 100644..100755
--- a/mcs/class/System.XML/Mono.Xml.Schema/XmlSchemaValidatingReader.cs
+++ b/mcs/class/System.XML/Mono.Xml.Schema/XmlSchemaValidatingReader.cs
@@ -125,7 +125,7 @@ namespace Mono.Xml.Schema
schemas,
nsResolver,
options);
- if (reader.BaseURI != String.Empty)
+ if (reader.BaseURI != String.Empty && Uri.IsWellFormedUriString(reader.BaseURI, UriKind.Absolute))
v.SourceUri = new Uri (reader.BaseURI);
readerLineInfo = reader as IXmlLineInfo;
diff --git a/mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs b/mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs
index 7f19ce58d3d..f6b56c6b3c6 100644
--- a/mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs
+++ b/mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs
@@ -473,7 +473,7 @@ namespace Mono.Xml.Schema
private void ValidateEndElementParticle ()
{
- if (Context.State != null) {
+ if (xsiNilDepth < 0 && Context.State != null) {
if (!Context.EvaluateEndElement ()) {
HandleError ("Invalid end element: " + reader.Name);
}
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl/XslStylesheet.cs b/mcs/class/System.XML/Mono.Xml.Xsl/XslStylesheet.cs
index 31a488b7b81..1e67574de49 100644
--- a/mcs/class/System.XML/Mono.Xml.Xsl/XslStylesheet.cs
+++ b/mcs/class/System.XML/Mono.Xml.Xsl/XslStylesheet.cs
@@ -376,6 +376,8 @@ namespace Mono.Xml.Xsl {
return; // Already done.
c.PushInputDocument (included);
+ included.MoveToRoot ();
+ included.MoveToFirstChild ();
while (c.Input.NodeType != XPathNodeType.Element)
if (!c.Input.MoveToNext ())
@@ -387,8 +389,9 @@ namespace Mono.Xml.Xsl {
templates.Add (new XslTemplate (c));
}
else {
+ c.Input.MoveToFirstChild ();
do {
- if (c.Input.NodeType != XPathNodeType.Element)
+ if (c.Input.NodeType != XPathNodeType.Element || c.Input.LocalName == "import" && c.Input.NamespaceURI == XsltNamespace)
continue;
Debug.EnterNavigator (c);
HandleTopLevelElement (c);
@@ -417,6 +420,8 @@ namespace Mono.Xml.Xsl {
case XsltNamespace:
switch (n.LocalName)
{
+ case "import":
+ throw new XsltCompileException ("Invalid occurence of import element after other top-level content", null, c.Input);
case "include":
HandleInclude (c);
break;
diff --git a/mcs/class/System.XML/System.Xml.Schema/BuiltInDatatype.cs b/mcs/class/System.XML/System.Xml.Schema/BuiltInDatatype.cs
index b082221ed07..72d8cf3e4ea 100644
--- a/mcs/class/System.XML/System.Xml.Schema/BuiltInDatatype.cs
+++ b/mcs/class/System.XML/System.Xml.Schema/BuiltInDatatype.cs
@@ -2263,7 +2263,8 @@ namespace Mono.Xml.Schema
internal override ValueType ParseValueType (string s, XmlNameTable nameTable, NSResolver nsmgr)
{
- return DateTime.ParseExact (Normalize(s), "--MM--", null);
+ DateTime ret;
+ return DateTime.TryParseExact (Normalize(s), "--MM", null, DateTimeStyles.RoundtripKind, out ret) ? ret : DateTime.ParseExact (Normalize(s), "--MM--", null);
}
internal override XsdOrdering Compare(object x, object y) {
diff --git a/mcs/class/System.XML/System.Xml.Schema/XmlAtomicValue.cs b/mcs/class/System.XML/System.Xml.Schema/XmlAtomicValue.cs
index 87f576c0011..ccb62f048e5 100644
--- a/mcs/class/System.XML/System.Xml.Schema/XmlAtomicValue.cs
+++ b/mcs/class/System.XML/System.Xml.Schema/XmlAtomicValue.cs
@@ -45,8 +45,10 @@ namespace System.Xml.Schema
double doubleValue;
int intValue;
long longValue;
+ ulong ulongValue;
object objectValue;
float floatValue;
+ byte [] bytesValue;
string stringValue;
XmlSchemaType schemaType;
XmlTypeCode xmlTypeCode;
@@ -68,6 +70,20 @@ namespace System.Xml.Schema
schemaType = xmlType;
}
+ internal XmlAtomicValue (byte [] value, XmlSchemaType xmlType)
+ {
+ Init (value, xmlType);
+ }
+
+ private void Init (byte [] value, XmlSchemaType xmlType)
+ {
+ if (xmlType == null)
+ throw new ArgumentNullException ("xmlType");
+ xmlTypeCode = XmlTypeCode.Base64Binary;
+ this.bytesValue = value;
+ schemaType = xmlType;
+ }
+
internal XmlAtomicValue (DateTime value, XmlSchemaType xmlType)
{
Init (value, xmlType);
@@ -138,6 +154,20 @@ namespace System.Xml.Schema
schemaType = xmlType;
}
+ internal XmlAtomicValue (ulong value, XmlSchemaType xmlType)
+ {
+ Init (value, xmlType);
+ }
+
+ private void Init (ulong value, XmlSchemaType xmlType)
+ {
+ if (xmlType == null)
+ throw new ArgumentNullException ("xmlType");
+ xmlTypeCode = XmlTypeCode.UnsignedLong;
+ this.ulongValue = value;
+ schemaType = xmlType;
+ }
+
internal XmlAtomicValue (float value, XmlSchemaType xmlType)
{
Init (value, xmlType);
@@ -182,6 +212,12 @@ namespace System.Xml.Schema
throw new ArgumentNullException ("xmlType");
switch (Type.GetTypeCode (value.GetType ())) {
+ case TypeCode.Byte:
+ Init ((byte) value, xmlType);
+ return;
+ case TypeCode.SByte:
+ Init ((sbyte) value, xmlType);
+ return;
case TypeCode.Int16:
Init ((short) value, xmlType);
return;
@@ -206,6 +242,9 @@ namespace System.Xml.Schema
case TypeCode.UInt32:
Init ((uint) value, xmlType);
return;
+ case TypeCode.UInt64:
+ Init ((ulong) value, xmlType);
+ return;
case TypeCode.String:
Init ((string) value, xmlType);
return;
@@ -216,6 +255,10 @@ namespace System.Xml.Schema
Init ((bool) value, xmlType);
return;
}
+ if (value is byte []) {
+ Init ((byte []) value, xmlType);
+ return;
+ }
ICollection col = value as ICollection;
if (col != null && col.Count == 1) {
@@ -254,6 +297,9 @@ namespace System.Xml.Schema
case XmlTypeCode.Long:
Init (another.longValue, xmlType);
return;
+ case XmlTypeCode.UnsignedLong:
+ Init (another.ulongValue, xmlType);
+ return;
case XmlTypeCode.Float:
Init (another.floatValue, xmlType);
return;
@@ -309,6 +355,11 @@ namespace System.Xml.Schema
return TypedValue;
case XmlTypeCode.QName:
return XmlQualifiedName.Parse (Value, nsResolver, true);
+ case XmlTypeCode.Base64Binary:
+ case XmlTypeCode.HexBinary:
+ if (bytesValue != null)
+ return bytesValue;
+ break;
}
throw new NotImplementedException ();
}
@@ -376,11 +427,31 @@ namespace System.Xml.Schema
case XmlTypeCode.DateTime:
stringValue = XQueryConvert.DateTimeToString (ValueAsDateTime);
break;
+ case XmlTypeCode.Duration:
+ stringValue = XQueryConvert.DayTimeDurationToString (TimeSpan.FromMilliseconds (doubleValue));
+ break;
+ case XmlTypeCode.GYear:
+ stringValue = XQueryConvert.GYearToString (ValueAsDateTime);
+ break;
+ case XmlTypeCode.GYearMonth:
+ stringValue = XQueryConvert.GYearMonthToString (ValueAsDateTime);
+ break;
+ case XmlTypeCode.GMonth:
+ stringValue = XQueryConvert.GMonthToString (ValueAsDateTime);
+ break;
+ case XmlTypeCode.GMonthDay:
+ stringValue = XQueryConvert.GMonthDayToString (ValueAsDateTime);
+ break;
+ case XmlTypeCode.GDay:
+ stringValue = XQueryConvert.GDayToString (ValueAsDateTime);
+ break;
case XmlTypeCode.Float:
case XmlTypeCode.Double:
stringValue = XQueryConvert.DoubleToString (ValueAsDouble);
break;
case XmlTypeCode.Integer:
+ case XmlTypeCode.UnsignedInt:
+ case XmlTypeCode.UnsignedLong:
case XmlTypeCode.Decimal:
stringValue = XQueryConvert.DecimalToString (ValueAsDecimal);
break;
@@ -388,18 +459,24 @@ namespace System.Xml.Schema
case XmlTypeCode.NonNegativeInteger:
case XmlTypeCode.NegativeInteger:
case XmlTypeCode.Long:
- case XmlTypeCode.UnsignedLong:
case XmlTypeCode.PositiveInteger:
stringValue = XQueryConvert.IntegerToString (ValueAsLong);
break;
case XmlTypeCode.Int:
case XmlTypeCode.Short:
case XmlTypeCode.Byte:
- case XmlTypeCode.UnsignedInt:
case XmlTypeCode.UnsignedShort:
case XmlTypeCode.UnsignedByte:
stringValue = XQueryConvert.IntToString (ValueAsInt);
break;
+ case XmlTypeCode.Base64Binary:
+ stringValue = XQueryConvert.Base64BinaryToString (bytesValue);
+ break;
+ case XmlTypeCode.HexBinary:
+ stringValue = XQueryConvert.HexBinaryToString (bytesValue);
+ break;
+ case XmlTypeCode.QName:
+ case XmlTypeCode.AnyUri:
case XmlTypeCode.String:
return stringValue;
@@ -419,6 +496,9 @@ namespace System.Xml.Schema
case XmlTypeCode.DateTime:
stringValue = XQueryConvert.DateTimeToString ((DateTime) objectValue);
break;
+ case XmlTypeCode.Duration:
+ stringValue = XQueryConvert.DayTimeDurationToString (TimeSpan.FromMilliseconds ((double) objectValue));
+ break;
case XmlTypeCode.Boolean:
stringValue = XQueryConvert.BooleanToString ((bool) objectValue);
break;
@@ -438,6 +518,12 @@ namespace System.Xml.Schema
case XmlTypeCode.Int:
stringValue = XQueryConvert.IntToString ((int) objectValue);
break;
+ case XmlTypeCode.Base64Binary:
+ stringValue = XQueryConvert.Base64BinaryToString ((byte []) objectValue);
+ break;
+ case XmlTypeCode.HexBinary:
+ stringValue = XQueryConvert.HexBinaryToString ((byte []) objectValue);
+ break;
}
break;
}
@@ -445,7 +531,7 @@ namespace System.Xml.Schema
return stringValue;
if (objectValue != null)
- throw new InvalidCastException (String.Format ("Conversion from runtime type {0} to {1} is not supported", objectValue.GetType (), XmlTypeCode.String));
+ throw new InvalidCastException (String.Format ("Conversion from runtime type {0}, resolved as type code {1}, to {2} is not supported", objectValue.GetType (), ResolvedTypeCode, XmlTypeCode.String));
else
throw new InvalidCastException (String.Format ("Conversion from schema type {0} (type code {1}, resolved type code {2}) to {3} is not supported.", schemaType.QualifiedName, xmlTypeCode, ResolvedTypeCode, XmlTypeCode.String));
}
@@ -489,6 +575,16 @@ namespace System.Xml.Schema
return dateTimeValue;
case XmlTypeCode.String:
return XQueryConvert.StringToDateTime (stringValue);
+ case XmlTypeCode.GYear:
+ return XQueryConvert.StringToGYear (stringValue);
+ case XmlTypeCode.GYearMonth:
+ return XQueryConvert.StringToGYearMonth (stringValue);
+ case XmlTypeCode.GMonth:
+ return XQueryConvert.StringToGMonth (stringValue);
+ case XmlTypeCode.GMonthDay:
+ return XQueryConvert.StringToGMonthDay (stringValue);
+ case XmlTypeCode.GDay:
+ return XQueryConvert.StringToGDay (stringValue);
case XmlTypeCode.None:
case XmlTypeCode.Item:
case XmlTypeCode.AnyAtomicType:
@@ -515,6 +611,8 @@ namespace System.Xml.Schema
return XQueryConvert.DoubleToDecimal (doubleValue);
case XmlTypeCode.Long:
return XQueryConvert.IntegerToDecimal (longValue);
+ case XmlTypeCode.UnsignedLong:
+ return XQueryConvert.IntegerToDecimal (ulongValue);
case XmlTypeCode.Int:
return XQueryConvert.IntToDecimal (intValue);
case XmlTypeCode.Float:
@@ -660,6 +758,9 @@ namespace System.Xml.Schema
return typeof (DateTime);
case XmlTypeCode.Boolean:
return typeof (bool);
+ case XmlTypeCode.Base64Binary:
+ case XmlTypeCode.HexBinary:
+ return typeof (byte []);
case XmlTypeCode.Item:
return typeof (object);
}
@@ -692,7 +793,10 @@ namespace System.Xml.Schema
case TypeCode.Boolean:
return XmlTypeCode.Boolean;
case TypeCode.Object:
- return XmlTypeCode.Item;
+ if (cliType == typeof (byte []))
+ return XmlTypeCode.Base64Binary;
+ else
+ return XmlTypeCode.Item;
}
if (raiseError)
throw new NotSupportedException (String.Format ("XQuery internal error: Cannot infer XmlTypeCode from Runtime Type {0}", cliType));
diff --git a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaSet.cs b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaSet.cs
index 11ad6b3a4a2..6b9e8deb64e 100644
--- a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaSet.cs
+++ b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaSet.cs
@@ -130,14 +130,10 @@ namespace System.Xml.Schema
public XmlSchema Add (string targetNamespace, string schemaUri)
{
- XmlTextReader r = null;
- try {
- r = new XmlTextReader (schemaUri, nameTable);
- return Add (targetNamespace, r);
- } finally {
- if (r != null)
- r.Close ();
- }
+ var uri = xmlResolver.ResolveUri (null, schemaUri);
+ using (var stream = (Stream) xmlResolver.GetEntity (uri, null, typeof (Stream)))
+ using (var r = XmlReader.Create (stream, new XmlReaderSettings () { XmlResolver = xmlResolver, NameTable = nameTable}, uri.ToString ()))
+ return Add (targetNamespace, r);
}
public XmlSchema Add (string targetNamespace, XmlReader schemaDocument)
diff --git a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs
index 92274b2e157..286963d3056 100644
--- a/mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs
+++ b/mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs
@@ -539,10 +539,10 @@ namespace System.Xml.Schema
if (skipValidationDepth < 0 || depth <= skipValidationDepth)
AssessCloseStartElementSchemaValidity (schemaInfo);
- depth++;
} finally {
current_info = null;
occuredAtts.Clear ();
+ depth++;
}
}
@@ -976,7 +976,7 @@ namespace System.Xml.Schema
private void ValidateEndElementParticle ()
{
- if (Context.State != null) {
+ if (xsiNilDepth < 0 && Context.State != null) {
if (!Context.EvaluateEndElement ()) {
HandleError ("Invalid end element. There are still required content items.");
}
@@ -1588,7 +1588,8 @@ namespace System.Xml.Schema
if (value == "true") {
if (element.ValidatedFixedValue != null)
HandleError ("Schema instance nil was specified, where the element declaration for " + element.QualifiedName + "has fixed value constraints.");
- xsiNilDepth = depth;
+ if (xsiNilDepth < 0)
+ xsiNilDepth = depth;
if (info != null)
info.IsNil = true;
}
diff --git a/mcs/class/System.XML/System.Xml.Serialization/MapCodeGenerator.cs b/mcs/class/System.XML/System.Xml.Serialization/MapCodeGenerator.cs
index ed06d61a688..9f754c727b7 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/MapCodeGenerator.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/MapCodeGenerator.cs
@@ -691,6 +691,7 @@ namespace System.Xml.Serialization {
}
else
{
+ defaultValue = defaultValue is decimal ? (object) ('"' + ((decimal) defaultValue).ToString (CultureInfo.InvariantCulture) + '"') : defaultValue;
AddCustomAttribute (externalField, "System.ComponentModel.DefaultValue", GetArg (defaultValue));
//internalField.InitExpression = new CodePrimitiveExpression (defaultValue);
}
diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlSchemaImporter.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlSchemaImporter.cs
index fdcbc0e186f..0ea81302af1 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/XmlSchemaImporter.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/XmlSchemaImporter.cs
@@ -35,6 +35,7 @@ using System.CodeDom.Compiler;
#endif
using System.Xml.Schema;
using System.Collections;
+using System.Collections.Generic;
#if NET_2_0 && CONFIGURATION_DEP
using System.Configuration;
using System.Xml.Serialization.Configuration;
@@ -744,6 +745,25 @@ namespace System.Xml.Serialization
}
}
}
+
+ IEnumerable<XmlSchemaAttribute> EnumerateAttributes (XmlSchemaObjectCollection col, List<XmlSchemaAttributeGroup> recurse)
+ {
+ foreach (var o in col) {
+ if (o is XmlSchemaAttributeGroupRef) {
+ var gr = (XmlSchemaAttributeGroupRef) o;
+ var g = FindRefAttributeGroup (gr.RefName);
+ if (recurse.Contains (g))
+ continue;
+ recurse.Add (g);
+ if (g == null)
+ throw new InvalidOperationException (string.Format ("Referenced AttributeGroup '{0}' was not found.", gr.RefName));
+ foreach (var a in EnumerateAttributes (g.Attributes, recurse))
+ yield return a;
+ }
+ else
+ yield return (XmlSchemaAttribute) o;
+ }
+ }
// Attributes might be redefined, so there is an existing attribute for the same name, skip it.
// FIXME: this is nothing more than just a hack.
@@ -753,7 +773,7 @@ namespace System.Xml.Serialization
XmlSchemaObjectCollection src, ClassMap map)
{
XmlSchemaObjectCollection atts = new XmlSchemaObjectCollection ();
- foreach (XmlSchemaAttribute a in src)
+ foreach (var a in EnumerateAttributes (src, new List<XmlSchemaAttributeGroup> ()))
if (map.GetAttribute (a.QualifiedName.Name, a.QualifiedName.Namespace) == null)
atts.Add (a);
return atts;
diff --git a/mcs/class/System.XML/System.Xml/XQueryConvert.cs b/mcs/class/System.XML/System.Xml/XQueryConvert.cs
index 178cb53dbcb..941b9e91036 100644
--- a/mcs/class/System.XML/System.Xml/XQueryConvert.cs
+++ b/mcs/class/System.XML/System.Xml/XQueryConvert.cs
@@ -342,17 +342,17 @@ namespace System.Xml
public static string GMonthToString (DateTime value)
{
- return XmlConvert.ToString (new TimeSpan (0, value.Month, 0));
+ return XmlConvert.ToString (new TimeSpan (0, value.Month, 1));
}
public static string GYearMonthToString (DateTime value)
{
- return XmlConvert.ToString (new TimeSpan (value.Year, value.Month, 0));
+ return XmlConvert.ToString (new TimeSpan (value.Year, value.Month, 1));
}
public static string GYearToString (DateTime value)
{
- return XmlConvert.ToString (new TimeSpan (new DateTime (value.Year, 0, 0).Ticks));
+ return XmlConvert.ToString (new TimeSpan (new DateTime (value.Year, 1, 1).Ticks));
}
public static string HexBinaryToString (byte [] data)
@@ -376,6 +376,11 @@ namespace System.Xml
return (decimal) value;
}
+ public static decimal IntegerToDecimal (ulong value)
+ {
+ return (decimal) value;
+ }
+
public static double IntegerToDouble (long value)
{
return Convert.ToDouble (value);
diff --git a/mcs/class/System.XML/System.Xml/XmlConvert.cs b/mcs/class/System.XML/System.Xml/XmlConvert.cs
index c00965d425a..8497c85eee9 100644
--- a/mcs/class/System.XML/System.Xml/XmlConvert.cs
+++ b/mcs/class/System.XML/System.Xml/XmlConvert.cs
@@ -928,47 +928,60 @@ namespace System.Xml {
#if NET_4_0
public static bool IsNCNameChar (char ch)
{
- throw new NotImplementedException ();
+ return XmlChar.IsNCNameChar (ch);
}
public static bool IsPublicIdChar (char ch)
{
- throw new NotImplementedException ();
+ return XmlChar.IsPubidChar (ch);
}
public static bool IsStartNCNameChar (char ch)
{
- throw new NotImplementedException ();
+ return XmlChar.IsFirstNameChar (ch);
}
public static bool IsWhitespaceChar (char ch)
{
- throw new NotImplementedException ();
+ return XmlChar.IsWhitespace (ch);
}
public static bool IsXmlChar (char ch)
{
- throw new NotImplementedException ();
+ return XmlChar.IsValid (ch);
}
public static bool IsXmlSurrogatePair (char lowChar, char highChar)
{
- throw new NotImplementedException ();
+ return 0xD800 <= lowChar && lowChar <= 0xDBFF && 0xDC00 <= highChar && highChar <= 0xDFFF;
}
public static string VerifyPublicId (string publicId)
{
- throw new NotImplementedException ();
+ if (publicId == null)
+ throw new ArgumentNullException ("publicId");
+ if (XmlChar.IsPubid (publicId))
+ return publicId;
+ throw new XmlException (string.Format ("'{0}' is not a valid PUBLIC ID", publicId));
}
public static string VerifyWhitespace (string content)
{
- throw new NotImplementedException ();
+ if (content == null)
+ throw new ArgumentNullException ("content");
+ if (XmlChar.IsWhitespace (content))
+ return content;
+ throw new XmlException (string.Format ("'{0}' is not whitespace", content));
}
public static string VerifyXmlChars (string content)
{
- throw new NotImplementedException ();
+ if (content == null)
+ throw new ArgumentNullException ("content");
+ var idx = XmlChar.IndexOfInvalid (content, true);
+ if (idx < 0)
+ return content;
+ throw new XmlException (string.Format ("Invalid XML character was found in the content, at index {0}.", idx));
}
#endif
}
diff --git a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaDatatypeTests.cs b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaDatatypeTests.cs
index bfbd80e9a0d..0d417787a49 100644
--- a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaDatatypeTests.cs
+++ b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaDatatypeTests.cs
@@ -321,5 +321,144 @@ namespace MonoTests.System.Xml
datatype.ChangeType(300, typeof (int));
}
+
+ [Test]
+ public void Bug12469 ()
+ {
+ Dictionary<string, string> validValues = new Dictionary<string, string> {
+ {"string", "abc"},
+
+ {"normalizedString", "abc"},
+ {"token", "abc"},
+ {"language", "en"},
+ {"Name", "abc"},
+ {"NCName", "abc"},
+ {"ID", "abc"},
+ {"ENTITY", "abc"},
+ {"NMTOKEN", "abc"},
+
+ {"boolean", "true"},
+ {"decimal", "1"},
+ {"integer", "1"},
+ {"nonPositiveInteger", "0"},
+ {"negativeInteger", "-1"},
+ {"long", "9223372036854775807"},
+ {"int", "2147483647"},
+ {"short", "32767"},
+ {"byte", "127"},
+ {"nonNegativeInteger", "0"},
+ {"unsignedLong", "18446744073709551615"},
+ {"unsignedInt", "4294967295"},
+ {"unsignedShort", "65535"},
+ {"unsignedByte", "255"},
+ {"positiveInteger", "1"},
+ {"float", "1.1"},
+ {"double", "1.1"},
+ {"time", "00:00:00"},
+ {"date", "1999-12-31"},
+ {"dateTime", "1999-12-31T00:00:00.000"},
+ {"duration", "P1Y2M3DT10H30M"},
+ {"gYearMonth", "1999-01"},
+ {"gYear", "1999"},
+ {"gMonthDay", "--12-31"},
+ {"gMonth", "--12"},
+ {"gDay", "---31"},
+
+ {"base64Binary", "AbCd eFgH IjKl 019+"},
+ {"hexBinary", "0123456789ABCDEF"},
+
+ {"anyURI", "https://www.server.com"},
+ {"QName", "xml:abc"},
+ };
+
+ // FIXME: implement validation
+ Dictionary<string, string> invalidValues = new Dictionary<string, string> {
+ {"Name", "***"},
+ {"NCName", "a::"},
+ {"ID", "123"},
+ {"ENTITY", "***"},
+ {"NMTOKEN", "***"},
+
+ {"boolean", "ABC"},
+ {"decimal", "1A"},
+ {"integer", "1.5"},
+ {"nonPositiveInteger", "5"},
+ {"negativeInteger", "10"},
+ {"long", "999999999999999999999999999999999999999"},
+ {"int", "999999999999999999999999999999999999999"},
+ {"short", "32768"},
+ {"byte", "128"},
+ {"nonNegativeInteger", "-1"},
+ {"unsignedLong", "-1"},
+ {"unsignedInt", "-1"},
+ {"unsignedShort", "-1"},
+ {"unsignedByte", "-1"},
+ {"positiveInteger", "0"},
+ {"float", "1.1x"},
+ {"double", "1.1x"},
+ {"time", "0"},
+ {"date", "1"},
+ {"dateTime", "2"},
+ {"duration", "P1"},
+ {"gYearMonth", "1999"},
+ {"gYear", "-1"},
+ {"gMonthDay", "-12-31"},
+ {"gMonth", "-12"},
+ {"gDay", "--31"},
+
+ {"base64Binary", "####"},
+ {"hexBinary", "G"},
+
+ // anyURI passes everything (as long as I observed)
+ {"QName", "::"},
+ };
+
+ const string schemaTemplate = @"
+ <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' elementFormDefault='qualified'>
+ <xs:element name='EL'>
+ <xs:complexType>
+ <xs:attribute name='attr' type='xs:{0}' use='required' />
+ </xs:complexType>
+ </xs:element>
+ </xs:schema>";
+
+ const string documentTemplate = @"<EL attr='{0}' />";
+
+ foreach (var type in validValues.Keys) {
+ try {
+ var schema = string.Format (schemaTemplate, type);
+ var document = string.Format (documentTemplate, validValues[type]);
+
+ var schemaSet = new XmlSchemaSet ();
+ using (var reader = new StringReader (schema))
+ schemaSet.Add (XmlSchema.Read (reader, null));
+ schemaSet.Compile ();
+ var doc = new XmlDocument ();
+ using (var reader = new StringReader (document))
+ doc.Load (reader);
+ doc.Schemas = schemaSet;
+ doc.Validate (null);
+
+ // FIXME: implement validation
+ /*
+ if (!invalidValues.ContainsKey (type))
+ continue;
+ try {
+ doc = new XmlDocument ();
+ document = string.Format (documentTemplate, invalidValues [type]);
+ using (var reader = new StringReader (document))
+ doc.Load (reader);
+ doc.Schemas = schemaSet;
+ doc.Validate (null);
+ Assert.Fail (string.Format ("Failed to invalidate {0} for {1}", document, type));
+ } catch (XmlSchemaException) {
+ }
+ */
+ } catch (Exception) {
+ Console.Error.WriteLine (type);
+ throw;
+ }
+ }
+ }
}
}
diff --git a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs
index 6a8a7a49d8a..127a21aea4e 100644
--- a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs
+++ b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs
@@ -11,6 +11,7 @@
using System;
using System.Collections;
using System.IO;
+using System.Text;
using System.Xml;
using System.Xml.Schema;
using NUnit.Framework;
@@ -279,6 +280,40 @@ type=""xsd:string"" use=""required""/>
xss.Compile ();
Assert.IsNotNull (xss.GlobalElements [new XmlQualifiedName ("GetSystemDateAndTimeResponse", "http://www.onvif.org/ver10/device/wsdl")], "#1");
}
+
+ [Test] // bug #13716
+ public void ResolveSchemaUriUsingXmlResolver ()
+ {
+ var resolver = new Bug13716XmlResolver ();
+ string xml = "<people xmlns='testschema'><person name='Ian'><books><book>Clean Code</book></books></person></people>";
+ string ns = "testschema";
+ string xsdPath = "my.xsd";
+
+ var readerSettings = new XmlReaderSettings ();
+
+ //readerSettings.XmlResolver = resolver;
+ readerSettings.Schemas.XmlResolver = resolver;
+ readerSettings.Schemas.Add (ns, xsdPath);
+ readerSettings.ValidationType = ValidationType.Schema;
+
+ using (var xr = XmlReader.Create (new StringReader (xml), readerSettings))
+ {
+ while (!xr.EOF)
+ xr.Read ();
+ }
+ }
+
+ public class Bug13716XmlResolver : XmlUrlResolver
+ {
+ public override object GetEntity(Uri absoluteUri, string role, Type typeOfObjectToReturn)
+ {
+ string xsd = @"
+ <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' targetNamespace='testschema'>
+ <xs:element name='people' />
+ </xs:schema>";
+ return new MemoryStream (Encoding.UTF8.GetBytes (xsd));
+ }
+ }
}
}
#endif
diff --git a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaValidatorTests.cs b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaValidatorTests.cs
index bf258f6cc17..081f2c76d47 100644..100755
--- a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaValidatorTests.cs
+++ b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaValidatorTests.cs
@@ -397,6 +397,60 @@ namespace MonoTests.System.Xml
i++;
Assert.AreEqual (2, i, "#2");
}
+
+ [Test]
+ public void Bug12035 ()
+ {
+ string xml = @"<UserSettings
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xmlns:xsd='http://www.w3.org/2001/XMLSchema'
+ xmlns='http://schema/test'><Enabled>false</Enabled><Time xsi:nil='true' /></UserSettings>";
+ string xsd = @"<?xml version='1.0' encoding='utf-8'?>
+<xs:schema
+ targetNamespace='http://schema/test'
+ xmlns='http://schema/test'
+ xmlns:xs='http://www.w3.org/2001/XMLSchema'
+ elementFormDefault='qualified'>
+ <xs:element name='UserSettings'>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name='Enabled' type='xs:boolean' />
+ <xs:element name='Time' type='CoarseTime' nillable='true' />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name='CoarseTime'>
+ <xs:sequence>
+ <xs:element name='Hours' type='xs:int' />
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>";
+ var schema = XmlSchema.Read (new StringReader (xsd), null);
+ var schemaSet = new XmlSchemaSet ();
+ schemaSet.Add (schema);
+ var xmlReaderSettings = new XmlReaderSettings { ValidationType = ValidationType.Schema };
+ xmlReaderSettings.ValidationFlags |= XmlSchemaValidationFlags.ReportValidationWarnings;
+ xmlReaderSettings.Schemas.Add (schemaSet);
+
+ using (var configStream = new StringReader (xml)) {
+ using (var validatingReader = XmlReader.Create (configStream, xmlReaderSettings)) {
+ // Read the XML, throwing an exception if a validation error occurs
+ while (validatingReader.Read()) {
+ }
+ }
+ }
+ }
+
+ [Test]
+ public void IgnoresInvalidBaseUri ()
+ {
+ var source = new StringReader (@"<?xml version='1.0' encoding='utf-8'?><Test></Test>");
+ var readerSettings = new XmlReaderSettings { ValidationType = ValidationType.Schema };
+ var reader = XmlReader.Create (source, readerSettings, "invalidBaseUri");
+
+ Assert.IsNotNull (reader);
+ }
}
}
diff --git a/mcs/class/System.XML/Test/System.Xml.Xsl/XslTransformTests.cs b/mcs/class/System.XML/Test/System.Xml.Xsl/XslTransformTests.cs
index b276342806c..41973b0aa55 100644
--- a/mcs/class/System.XML/Test/System.Xml.Xsl/XslTransformTests.cs
+++ b/mcs/class/System.XML/Test/System.Xml.Xsl/XslTransformTests.cs
@@ -2226,7 +2226,6 @@ NO
Assert.IsTrue (sw.ToString ().IndexOf ("NO") > 0);
}
-#if NET_2_0
[Test] // bug #349375
public void PreserveWhitespace ()
{
@@ -2416,6 +2415,37 @@ NO
}
private bool valueHasBeenSet;
-#endif
+
+ [Test] // bug #4434
+ public void IncludeProcessStylesheet ()
+ {
+ string includedXsl = @"<?xml version='1.0' ?>
+<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:doc='http://nwalsh.com/xsl/documentation/1.0' exclude-result-prefixes='doc' version='1.0'>
+ <doc:template name='foo' />
+ <xsl:template name='foo'>
+ <foo />
+ </xsl:template>
+</xsl:stylesheet>";
+ string file = Path.Combine (Path.GetTempPath (), "include.xsl");
+ StreamWriter includedWriter = new StreamWriter (file);
+ includedWriter.WriteLine (includedXsl);
+ includedWriter.Close ();
+ XslCompiledTransform transform = new XslCompiledTransform ();
+ string xsl = @"<?xml version='1.0' ?>
+<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
+ <xsl:include href='include.xsl' />
+ <xsl:template match='/'>
+ <xsl:call-template name='foo' />
+ </xsl:template>
+</xsl:stylesheet>".Replace ("include.xsl", file);
+ XmlReader xslReader = XmlReader.Create (new StringReader (xsl));
+ transform.Load (xslReader);
+ XmlReader inputReader = XmlReader.Create (new StringReader ("<bar />"));
+ var sw = new StringWriter ();
+ XmlWriter outputWriter = XmlWriter.Create (sw);
+ transform.Transform (inputReader, outputWriter);
+ outputWriter.Close ();
+ Assert.AreEqual ("<?xml version=\"1.0\" encoding=\"utf-16\"?><foo />", sw.ToString (), "#1");
+ }
}
}
diff --git a/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/Makefile b/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/Makefile
index 2186adc2da3..b0ebe6bbce1 100644
--- a/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/Makefile
+++ b/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/Makefile
@@ -12,25 +12,20 @@
RUNTIME = mono
-ifeq ($(PROFILE), net_2_0)
- nunit_MONO_PATH="../../../../../class/lib/net_2_0"
- CSCOMPILE=MONO_PATH=../../../../../class/lib/net_2_0 ../../../../../../mono/runtime/mono-wrapper ../../../../../class/lib/net_2_0/gmcs.exe
-else
- nunit_MONO_PATH="../../../../../class/lib/net_1_1"
- CSCOMPILE=mcs
-endif
+nunit_MONO_PATH="../../../../../class/lib/net_4_5"
+CSCOMPILE=MONO_PATH=../../../../../class/lib/net_4_5 ../../../../../../runtime/mono-wrapper ../../../../../class/lib/build/mcs.exe
TEST_ARCHIVE = xslt-testsuite-03.ZIP
CATALOG = testsuite/TESTS/catalog.xml
FIXED_CATALOG = testsuite/TESTS/catalog-fixed.xml
-mono_wrapper_PATH="../../../../../../mono/runtime/mono-wrapper"
-NUNIT_CONSOLE=$(mono_wrapper_PATH) --debug ./nunit-console.exe
+mono_wrapper_PATH="../../../../../../runtime/mono-wrapper"
+NUNIT_CONSOLE=$(mono_wrapper_PATH) --debug $(nunit_MONO_PATH)/nunit-console.exe
FIXTURE=MonoTests.oasis_xslt.SuiteBuilder
-CLEAN_NUNIT_FLAGS=/fixture:$(FIXTURE) /xml=TestResult.xml /include=Clean
-FAILED_NUNIT_FLAGS=/fixture:$(FIXTURE) /xml=FailedTestResult.xml /include=KnownFailures
-ALL_NUNIT_FLAGS=/fixture:$(FIXTURE) /xml=AllTestResult.xml /out=AllTestResult.log /include=KnownFailures,Clean
+CLEAN_NUNIT_FLAGS=-fixture:$(FIXTURE) -xml=TestResult.xml -include=Clean
+FAILED_NUNIT_FLAGS=-fixture:$(FIXTURE) -xml=FailedTestResult.xml -include=KnownFailures
+ALL_NUNIT_FLAGS=-fixture:$(FIXTURE) -xml=AllTestResult.xml -out=AllTestResult.log -include=KnownFailures,Clean
TEST_PROG=xslttest.dll
GENERATE_EXE=generate.exe
@@ -41,7 +36,7 @@ else
REFERENCE_RESULTS_NAME=results
endif
REFERENCE_RESULTS_ARCHIVE=xslt-reference-$(REFERENCE_RESULTS_NAME).tar.gz
-REFERENCE_RESULTS_URL=http://anonsvn.mono-project.com/source/trunk/release/test-ext/xslt-standalone/$(REFERENCE_RESULTS_ARCHIVE)
+REFERENCE_RESULTS_URL=https://github.com/mono/release/raw/master/test-ext/xslt-standalone/$(REFERENCE_RESULTS_ARCHIVE)
REFERENCE_RESULTS=$(REFERENCE_RESULTS_NAME)/timestamp
test : $(TEST_PROG) $(FIXED_CATALOG) $(REFERENCE_RESULTS)
@@ -92,7 +87,7 @@ $(GENERATE_EXE) : generate.cs XsltTestUtils.cs
# It somehow does not work fine unless nunit-console.exe is here ...
cp $(nunit_MONO_PATH)/nunit-console.exe .
$(TEST_PROG) : xslttest.cs XsltTestUtils.cs
- $(CSCOMPILE) xslttest.cs XsltTestUtils.cs XmlCompare.cs -r:nunit.core -r:nunit.framework -out:$@ -t:library
+ $(CSCOMPILE) xslttest.cs XsltTestUtils.cs XmlCompare.cs -r:nunit.core -r:nunit.core.interfaces -r:nunit.framework -out:$@ -t:library
catalog-fixed : $(FIXED_CATALOG)
diff --git a/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslttest.cs b/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslttest.cs
index 8ecd22edf47..0761338aef3 100644
--- a/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslttest.cs
+++ b/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslttest.cs
@@ -17,10 +17,8 @@ namespace MonoTests.oasis_xslt {
ArrayList fixmeList = new ArrayList ();
#endregion
- TestSuite _suite;
- SuiteBuilder (TestSuite suite)
+ public SuiteBuilder ()
{
- _suite = suite;
}
void ReadLists ()
@@ -42,7 +40,7 @@ namespace MonoTests.oasis_xslt {
}
}
- public void Build ()
+ void Build (TestSuite suite)
{
// if (Environment.GetEnvironmentVariables().Contains("START_DEBUG"))
// System.Diagnostics.Debugger.Launch ();
@@ -65,18 +63,23 @@ namespace MonoTests.oasis_xslt {
string expectedException = (string) expectedExceptions[testid];
bool isKnownFailure = knownFailures.Contains (testid) || fixmeList.Contains (testid);
- _suite.Add (new TestFromCatalog (testid, stt, expectedException,
+ suite.Add (new TestFromCatalog (testid, stt, expectedException,
EnvOptions.InverseResults, isKnownFailure));
}
}
+ static object lock_obj = new object ();
+ static TestSuite _suite;
+
[Suite]
public static TestSuite Suite {
get {
+ if (_suite == null) { lock (lock_obj) {
TestSuite suite = new TestSuite ("MonoTests.oasis_xslt.SuiteBuilder");
- SuiteBuilder builder = new SuiteBuilder (suite);
- builder.Build ();
- return suite;
+ new SuiteBuilder ().Build (suite);
+ _suite = suite;
+ } }
+ return _suite;
}
}
}
@@ -99,7 +102,7 @@ namespace MonoTests.oasis_xslt {
ArrayList arr = new ArrayList ();
if (isKnownFailure) {
arr.Add ("KnownFailures");
- this.IsExplicit = true;
+ //this.IsExplicit = true;
}
else
arr.Add ("Clean");
diff --git a/mcs/class/System.XML/mobile_static_System.Xml.dll.sources b/mcs/class/System.XML/mobile_static_System.Xml.dll.sources
new file mode 100644
index 00000000000..b6630930f75
--- /dev/null
+++ b/mcs/class/System.XML/mobile_static_System.Xml.dll.sources
@@ -0,0 +1 @@
+#include mobile_System.Xml.dll.sources
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XContainer.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XContainer.cs
index f38458ca3b8..af5fd976403 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XContainer.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XContainer.cs
@@ -181,16 +181,20 @@ namespace System.Xml.Linq
public IEnumerable <XElement> Elements (XName name)
{
- foreach (XElement el in Elements ())
- if (el.Name == name)
+ foreach (XNode n in Nodes ()) {
+ XElement el = n as XElement;
+ if (el != null && el.Name == name)
yield return el;
+ }
}
public XElement Element (XName name)
{
- foreach (XElement el in Elements ())
- if (el.Name == name)
+ foreach (XNode n in Nodes ()) {
+ XElement el = n as XElement;
+ if (el != null && el.Name == name)
return el;
+ }
return null;
}
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
index 80ba33b6623..81dea5e4a43 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
@@ -382,7 +382,8 @@ namespace System.Xml.Linq
public XAttribute Attribute (XName name)
{
- foreach (XAttribute a in Attributes ())
+ XAttribute next;
+ for (XAttribute a = attr_first; a != null; a = a.NextAttribute)
if (a.Name == name)
return a;
return null;
@@ -760,8 +761,9 @@ namespace System.Xml.Linq
public void ReplaceAll (object content)
{
- RemoveNodes ();
- Add (content);
+ // it's waste of resource, but from bug #11298 it must save content
+ // snapshot first and then remove existing attributes.
+ ReplaceAll (XUtil.ExpandArray (content).ToArray ());
}
public void ReplaceAll (params object [] content)
@@ -772,8 +774,9 @@ namespace System.Xml.Linq
public void ReplaceAttributes (object content)
{
- RemoveAttributes ();
- Add (content);
+ // it's waste of resource, but from bug #11298 it must save content
+ // snapshot first and then remove existing attributes.
+ ReplaceAttributes (XUtil.ExpandArray (content).ToArray ());
}
public void ReplaceAttributes (params object [] content)
@@ -785,8 +788,9 @@ namespace System.Xml.Linq
public void SetElementValue (XName name, object value)
{
var element = Element (name);
- if (element == null && value != null) {
- Add (new XElement (name, value));
+ if (element == null) {
+ if (value != null)
+ Add (new XElement (name, value));
} else if (element != null && value == null) {
element.Remove ();
} else
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XName.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XName.cs
index 80d0e7b09cb..59bbceb4f92 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XName.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XName.cs
@@ -153,7 +153,7 @@ namespace System.Xml.Linq
public override string ToString ()
{
- if (ns == XNamespace.None)
+ if (Object.ReferenceEquals (ns, XNamespace.None))
return local;
return String.Concat ("{", ns.NamespaceName, "}", local);
}
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XNode.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XNode.cs
index c6bb881eac2..e98811ed434 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XNode.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XNode.cs
@@ -80,9 +80,10 @@ namespace System.Xml.Linq
public string ToString (SaveOptions options)
{
StringWriter sw = new StringWriter ();
- XmlWriterSettings s = new XmlWriterSettings ();
- s.ConformanceLevel = ConformanceLevel.Auto;
- s.Indent = options != SaveOptions.DisableFormatting;
+ XmlWriterSettings s = new XmlWriterSettings () {
+ ConformanceLevel = ConformanceLevel.Auto,
+ Indent = options != SaveOptions.DisableFormatting,
+ OmitXmlDeclaration = true };
XmlWriter xw = XmlWriter.Create (sw, s);
WriteTo (xw);
xw.Close ();
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XObject.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XObject.cs
index 8353b25d2b8..c620e4f5992 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XObject.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XObject.cs
@@ -165,42 +165,42 @@ namespace System.Xml.Linq
internal void OnAddingObject (object addedObject)
{
- OnChanging (addedObject, new XObjectChangeEventArgs (XObjectChange.Add));
+ OnChanging (addedObject, XObjectChangeEventArgs.Add);
}
internal void OnAddedObject (object addedObject)
{
- OnChanged (addedObject, new XObjectChangeEventArgs (XObjectChange.Add));
+ OnChanged (addedObject, XObjectChangeEventArgs.Add);
}
internal void OnNameChanging (object renamedObject)
{
- OnChanging (renamedObject, new XObjectChangeEventArgs (System.Xml.Linq.XObjectChange.Name));
+ OnChanging (renamedObject, XObjectChangeEventArgs.Name);
}
internal void OnNameChanged (object renamedObject)
{
- OnChanged (renamedObject, new XObjectChangeEventArgs (System.Xml.Linq.XObjectChange.Name));
+ OnChanged (renamedObject, XObjectChangeEventArgs.Name);
}
internal void OnRemovingObject (object removedObject)
{
- OnChanging (removedObject, new XObjectChangeEventArgs (XObjectChange.Remove));
+ OnChanging (removedObject, XObjectChangeEventArgs.Remove);
}
internal void OnRemovedObject (object removedObject)
{
- OnChanged (removedObject, new XObjectChangeEventArgs (XObjectChange.Remove));
+ OnChanged (removedObject, XObjectChangeEventArgs.Remove);
}
internal void OnValueChanging (object changedObject)
{
- OnChanging (changedObject, new XObjectChangeEventArgs (XObjectChange.Value));
+ OnChanging (changedObject, XObjectChangeEventArgs.Value);
}
internal void OnValueChanged (object changedObject)
{
- OnChanged (changedObject, new XObjectChangeEventArgs (XObjectChange.Value));
+ OnChanged (changedObject, XObjectChangeEventArgs.Value);
}
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XUtil.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XUtil.cs
index 69cb484b23e..debe2696823 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XUtil.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XUtil.cs
@@ -93,7 +93,7 @@ namespace System.Xml.Linq
throw new NotImplementedException ();
}
- public static IEnumerable ExpandArray (object o)
+ public static IEnumerable<object> ExpandArray (object o)
{
XNode n = o as XNode;
if (n != null)
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Schema/Extensions.cs b/mcs/class/System.Xml.Linq/System.Xml.Schema/Extensions.cs
index 83bee5fe7e8..7aa0bb9f009 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Schema/Extensions.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Schema/Extensions.cs
@@ -24,8 +24,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_2_1
-
using System;
using System.Xml;
using System.Xml.Linq;
@@ -109,5 +107,3 @@ namespace System.Xml.Schema
}
}
}
-
-#endif
diff --git a/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs b/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs
index 5a5f255094c..dd0b6a67835 100644
--- a/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs
+++ b/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs
@@ -2050,5 +2050,27 @@ namespace MonoTests.System.Xml.Linq
XElement newElement = new XElement(ns + "geoloc");
Assert.AreEqual ("<geoloc xmlns=\"http://jabber.org/protocol/geoloc\" />", newElement.ToString (), "#1");
}
+
+ [Test] // bug #10194
+ public void SetElementValueNullOnNonExistingElement ()
+ {
+ var xd = XDocument.Parse ("<foo />");
+ xd.Root.SetElementValue (XName.Get ("bar"), null);
+ }
+
+ [Test] // bug #11298
+ public void ReplaceAttributesIteratesContentsFirstThenRemove ()
+ {
+ var xmlString = "<Class Id='1' Name='' Cluster='' xmlns='urn:x' />";
+ var e = XDocument.Parse (xmlString).Root;
+ var attrs = e.Attributes ()
+ .Where (a => !a.IsNamespaceDeclaration)
+ .Select (a => a.Name.Namespace != XNamespace.None ?
+ new XAttribute (XName.Get(a.Name.LocalName), a.Value) : a);
+ e.ReplaceAttributes (attrs);
+ Assert.IsNotNull (e.Attribute ("Id"), "#1");
+ Assert.IsNotNull (e.Attribute ("Name"), "#2");
+ Assert.IsNotNull (e.Attribute ("Cluster"), "#3");
+ }
}
}
diff --git a/mcs/class/System.Xml.Serialization/AssemblyInfo.cs b/mcs/class/System.Xml.Serialization/AssemblyInfo.cs
index fb3bd006eb5..0a8d0121901 100644
--- a/mcs/class/System.Xml.Serialization/AssemblyInfo.cs
+++ b/mcs/class/System.Xml.Serialization/AssemblyInfo.cs
@@ -39,6 +39,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
[assembly: AssemblyDelaySign (true)]
-[assembly: AssemblyKeyFile ("../msfinal.pub")]
+[assembly: AssemblyKeyFile ("../ecma.pub")]
[assembly: ReferenceAssembly]
diff --git a/mcs/class/System/Makefile b/mcs/class/System/Makefile
index 4a3bd989644..3b25daa8977 100644
--- a/mcs/class/System/Makefile
+++ b/mcs/class/System/Makefile
@@ -36,7 +36,7 @@ LIB_MCS_FLAGS += -d:SECURITY_DEP
endif
endif
ifeq (monotouch, $(PROFILE))
-LIB_MCS_FLAGS += -d:FULL_AOT_RUNTIME -d:SECURITY_DEP
+LIB_MCS_FLAGS += -d:SECURITY_DEP
endif
EXTRA_DISTFILES = \
diff --git a/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs b/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
index 26039bdd79b..62b41de358d 100644
--- a/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
+++ b/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
@@ -395,6 +395,20 @@ namespace Mono.CSharp
args.AppendFormat("\"{0}\" ",source);
return args.ToString();
}
+
+ // Keep in sync with mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
+ const string ErrorRegexPattern = @"
+ ^
+ (\s*(?<file>[^\(]+) # filename (optional)
+ (\((?<line>\d*)(,(?<column>\d*[\+]*))?\))? # line+column (optional)
+ :\s+)?
+ (?<level>\w+) # error|warning
+ \s+
+ (?<number>[^:]*\d) # CS1234
+ :
+ \s*
+ (?<message>.*)$";
+
private static CompilerError CreateErrorFromString(string error_string)
{
if (error_string.StartsWith ("BETA"))
@@ -404,8 +418,7 @@ namespace Mono.CSharp
return null;
CompilerError error=new CompilerError();
- Regex reg = new Regex (@"^(\s*(?<file>.*)\((?<line>\d*)(,(?<column>\d*))?\)(:)?\s+)*(?<level>\w+)\s*(?<number>.*):\s(?<message>.*)",
- RegexOptions.Compiled | RegexOptions.ExplicitCapture);
+ Regex reg = new Regex (ErrorRegexPattern, RegexOptions.Compiled | RegexOptions.ExplicitCapture | RegexOptions.IgnorePatternWhitespace);
Match match=reg.Match(error_string);
if (!match.Success) {
// We had some sort of runtime crash
diff --git a/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs b/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs
index 0f8322efc76..de0f569d5c5 100644
--- a/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs
+++ b/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs
@@ -172,7 +172,28 @@ namespace Mono.CSharp
{
GenerateCompileUnitStart (compileUnit);
- GenerateGlobalNamespace (compileUnit);
+ List<CodeNamespaceImport> imports = null;
+ foreach (CodeNamespace codeNamespace in compileUnit.Namespaces) {
+ if (!string.IsNullOrEmpty (codeNamespace.Name))
+ continue;
+
+ if (codeNamespace.Imports.Count == 0)
+ continue;
+
+ if (imports == null)
+ imports = new List<CodeNamespaceImport> ();
+
+ foreach (CodeNamespaceImport i in codeNamespace.Imports)
+ imports.Add (i);
+ }
+
+ if (imports != null) {
+ imports.Sort ((a, b) => a.Namespace.CompareTo (b.Namespace));
+ foreach (var import in imports)
+ GenerateNamespaceImport (import);
+
+ Output.WriteLine ();
+ }
if (compileUnit.AssemblyCustomAttributes.Count > 0) {
OutputAttributes (compileUnit.AssemblyCustomAttributes,
@@ -180,26 +201,22 @@ namespace Mono.CSharp
Output.WriteLine ("");
}
- GenerateLocalNamespaces (compileUnit);
-
- GenerateCompileUnitEnd (compileUnit);
- }
+ CodeNamespaceImportCollection global_imports = null;
+ foreach (CodeNamespace codeNamespace in compileUnit.Namespaces) {
+ if (string.IsNullOrEmpty (codeNamespace.Name)) {
+ global_imports = codeNamespace.Imports;
+ codeNamespace.Imports = new CodeNamespaceImportCollection ();
+ }
- private void GenerateGlobalNamespace (CodeCompileUnit compileUnit) {
- CodeNamespace globalNamespace = null;
+ GenerateNamespace (codeNamespace);
- foreach (CodeNamespace codeNamespace in compileUnit.Namespaces)
- if (string.IsNullOrEmpty (codeNamespace.Name))
- globalNamespace = codeNamespace;
-
- if (globalNamespace != null)
- GenerateNamespace (globalNamespace);
- }
+ if (global_imports != null) {
+ codeNamespace.Imports = global_imports;
+ global_imports = null;
+ }
+ }
- private void GenerateLocalNamespaces (CodeCompileUnit compileUnit) {
- foreach (CodeNamespace codeNamespace in compileUnit.Namespaces)
- if (!string.IsNullOrEmpty (codeNamespace.Name))
- GenerateNamespace (codeNamespace);
+ GenerateCompileUnitEnd (compileUnit);
}
protected override void GenerateDefaultValueExpression (CodeDefaultValueExpression e)
diff --git a/mcs/class/System/System.CodeDom.Compiler/TempFileCollection.cs b/mcs/class/System/System.CodeDom.Compiler/TempFileCollection.cs
index da056d15336..80c30eece70 100644
--- a/mcs/class/System/System.CodeDom.Compiler/TempFileCollection.cs
+++ b/mcs/class/System/System.CodeDom.Compiler/TempFileCollection.cs
@@ -73,33 +73,36 @@ namespace System.CodeDom.Compiler {
// note: this property *cannot* change TempDir property
string temp = tempdir;
- if (temp.Length == 0)
- temp = GetOwnTempDir ();
+ if (temp.Length == 0) {
+ if (ownTempDir != null) {
+ temp = ownTempDir;
+ Directory.CreateDirectory (temp);
+ } else {
+ temp = CreateOwnTempDir ();
+ }
+ }
// Create a temporary file at the target directory. This ensures
// that the generated file name is unique.
- FileStream f = null;
- do {
+ int test_counter = 1000;
+ while (true) {
int num = rnd.Next ();
num++;
basepath = Path.Combine (temp, num.ToString("x"));
string path = basepath + ".tmp";
try {
- f = new FileStream (path, FileMode.CreateNew);
- }
- catch (System.IO.IOException) {
- f = null;
- continue;
- }
- catch {
- // avoid endless loop
+ using (var f = new FileStream (path, FileMode.CreateNew)) {
+ break;
+ }
+ } catch (IOException) {
+ if (test_counter-- > 0)
+ continue;
+
throw;
}
- } while (f == null);
-
- f.Close ();
-
+ }
+
// and you must have discovery access to the combined path
// note: the cache behaviour is tested in the CAS tests
if (SecurityManager.SecurityEnabled) {
@@ -110,12 +113,9 @@ namespace System.CodeDom.Compiler {
return(basepath);
}
}
-
- string GetOwnTempDir ()
- {
- if (ownTempDir != null)
- return ownTempDir;
+ string CreateOwnTempDir ()
+ {
// this call ensure the Environment permissions check
string basedir = Path.GetTempPath ();
@@ -245,9 +245,8 @@ namespace System.CodeDom.Compiler {
File.Delete (tmpFile);
basepath = null;
}
- if (allDeleted && ownTempDir != null) {
+ if (allDeleted && ownTempDir != null && filenames.Length > 0) {
Directory.Delete (ownTempDir, true);
- ownTempDir = null;
}
}
diff --git a/mcs/class/System/System.CodeDom/CodeNamespace.cs b/mcs/class/System/System.CodeDom/CodeNamespace.cs
index 8a709865b41..7940975eb21 100644
--- a/mcs/class/System/System.CodeDom/CodeNamespace.cs
+++ b/mcs/class/System/System.CodeDom/CodeNamespace.cs
@@ -80,6 +80,9 @@ namespace System.CodeDom
}
return imports;
}
+ internal set {
+ imports = value;
+ }
}
public string Name {
diff --git a/mcs/class/System/System.Collections.Concurrent/BlockingCollection.cs b/mcs/class/System/System.Collections.Concurrent/BlockingCollection.cs
index e5fb5ad7f59..cc7e04ecdd5 100644
--- a/mcs/class/System/System.Collections.Concurrent/BlockingCollection.cs
+++ b/mcs/class/System/System.Collections.Concurrent/BlockingCollection.cs
@@ -42,10 +42,17 @@ namespace System.Collections.Concurrent
const int spinCount = 5;
readonly IProducerConsumerCollection<T> underlyingColl;
- readonly int upperBound;
+ /* These events are used solely for the purpose of having an optimized sleep cycle when
+ * the BlockingCollection have to wait on an external event (Add or Remove for instance)
+ */
+ ManualResetEventSlim mreAdd = new ManualResetEventSlim (true);
+ ManualResetEventSlim mreRemove = new ManualResetEventSlim (true);
AtomicBoolean isComplete;
- long completeId;
+
+ readonly int upperBound;
+
+ int completeId;
/* The whole idea of the collection is to use these two long values in a transactional
* way to track and manage the actual data inside the underlying lock-free collection
@@ -54,14 +61,9 @@ namespace System.Collections.Concurrent
* They are manipulated with CAS and are guaranteed to increase over time and use
* of the instance thus preventing ABA problems.
*/
- long addId = long.MinValue;
- long removeId = long.MinValue;
+ int addId = int.MinValue;
+ int removeId = int.MinValue;
- /* These events are used solely for the purpose of having an optimized sleep cycle when
- * the BlockingCollection have to wait on an external event (Add or Remove for instance)
- */
- ManualResetEventSlim mreAdd = new ManualResetEventSlim (true);
- ManualResetEventSlim mreRemove = new ManualResetEventSlim (true);
/* For time based operations, we share this instance of Stopwatch and base calculation
on a time offset at each of these method call */
@@ -118,11 +120,12 @@ namespace System.Collections.Concurrent
do {
cancellationToken.ThrowIfCancellationRequested ();
- long cachedAddId = addId;
- long cachedRemoveId = removeId;
+ int cachedAddId = addId;
+ int cachedRemoveId = removeId;
+ int itemsIn = cachedAddId - cachedRemoveId;
// If needed, we check and wait that the collection isn't full
- if (upperBound != -1 && cachedAddId - cachedRemoveId > upperBound) {
+ if (upperBound != -1 && itemsIn > upperBound) {
if (millisecondsTimeout == 0)
return false;
@@ -207,8 +210,8 @@ namespace System.Collections.Concurrent
do {
cancellationToken.ThrowIfCancellationRequested ();
- long cachedRemoveId = removeId;
- long cachedAddId = addId;
+ int cachedRemoveId = removeId;
+ int cachedAddId = addId;
// Empty case
if (cachedRemoveId == cachedAddId) {
@@ -367,13 +370,19 @@ namespace System.Collections.Concurrent
{
item = default (T);
CheckArray (collections);
- int index = 0;
- foreach (var coll in collections) {
- try {
- item = coll.Take ();
- return index;
- } catch {}
- index++;
+ WaitHandle[] wait_table = null;
+ while (true) {
+ int index = 0;
+ for (int i = 0; i < collections.Length; ++i) {
+ if (collections [i].TryTake (out item))
+ return i;
+ }
+ if (wait_table == null) {
+ wait_table = new WaitHandle [collections.Length];
+ for (int i = 0; i < collections.Length; ++i)
+ wait_table [i] = collections [i].mreRemove.WaitHandle;
+ }
+ WaitHandle.WaitAny (wait_table);
}
return -1;
}
@@ -382,14 +391,24 @@ namespace System.Collections.Concurrent
{
item = default (T);
CheckArray (collections);
- int index = 0;
- foreach (var coll in collections) {
- try {
- item = coll.Take (cancellationToken);
- return index;
- } catch {}
- index++;
+ WaitHandle[] wait_table = null;
+ while (true) {
+ int index = 0;
+ for (int i = 0; i < collections.Length; ++i) {
+ if (collections [i].TryTake (out item))
+ return i;
+ }
+ cancellationToken.ThrowIfCancellationRequested ();
+ if (wait_table == null) {
+ wait_table = new WaitHandle [collections.Length + 1];
+ for (int i = 0; i < collections.Length; ++i)
+ wait_table [i] = collections [i].mreRemove.WaitHandle;
+ wait_table [collections.Length] = cancellationToken.WaitHandle;
+ }
+ WaitHandle.WaitAny (wait_table);
+ cancellationToken.ThrowIfCancellationRequested ();
}
+
return -1;
}
diff --git a/mcs/class/System/System.Collections.Concurrent/ConcurrentBag.cs b/mcs/class/System/System.Collections.Concurrent/ConcurrentBag.cs
index 5998c061ab0..5b4cbfcf1af 100644
--- a/mcs/class/System/System.Collections.Concurrent/ConcurrentBag.cs
+++ b/mcs/class/System/System.Collections.Concurrent/ConcurrentBag.cs
@@ -41,8 +41,8 @@ namespace System.Collections.Concurrent
[DebuggerTypeProxy (typeof (CollectionDebuggerView<>))]
public class ConcurrentBag<T> : IProducerConsumerCollection<T>, IEnumerable<T>, IEnumerable
{
- // We store hints in a long
- long hints;
+ // We store hints in an int
+ int hints;
int count;
// The container area is where bag are added foreach thread
@@ -153,19 +153,19 @@ namespace System.Collections.Concurrent
return;
var hs = hints;
// If cas failed then we don't retry
- Interlocked.CompareExchange (ref hints, (long)(((ulong)hs) << 4 | (uint)index), (long)hs);
+ Interlocked.CompareExchange (ref hints, (int)(((uint)hs) << 4 | (uint)index), (int)hs);
}
bool TryGetHint (out int index)
{
- /* Funny little thing to know, since hints is a long (because CAS has no ulong overload),
+ /* Funny little thing to know, since hints is signed (because CAS has no uint overload),
* a shift-right operation is an arithmetic shift which might set high-order right bits
* to 1 instead of 0 if the number turns negative.
*/
var hs = hints;
index = 0;
- if (Interlocked.CompareExchange (ref hints, (long)(((ulong)hs) >> 4), hs) == hs)
+ if (Interlocked.CompareExchange (ref hints, (int)(((uint)hs) >> 4), hs) == hs)
index = (int)(hs & 0xF);
return index > 0;
diff --git a/mcs/class/System/System.Collections.Generic/SortedList.cs b/mcs/class/System/System.Collections.Generic/SortedList.cs
index c1190b2ad26..2eaec862bda 100644
--- a/mcs/class/System/System.Collections.Generic/SortedList.cs
+++ b/mcs/class/System/System.Collections.Generic/SortedList.cs
@@ -629,7 +629,7 @@ namespace System.Collections.Generic
int right = len-1;
while (left <= right) {
- int guess = (left + right) >> 1;
+ int guess = left + ((right - left) >> 1);
int cmp = Compare (table[guess].Key, key);
if (cmp == 0) return guess;
diff --git a/mcs/class/System/System.Collections.ObjectModel/ObservableCollection.cs b/mcs/class/System/System.Collections.ObjectModel/ObservableCollection.cs
index 6c26e8795f6..339e63c9aa2 100644
--- a/mcs/class/System/System.Collections.ObjectModel/ObservableCollection.cs
+++ b/mcs/class/System/System.Collections.ObjectModel/ObservableCollection.cs
@@ -40,30 +40,33 @@ namespace System.Collections.ObjectModel
#endif
public class ObservableCollection<T> : Collection<T>, INotifyCollectionChanged, INotifyPropertyChanged {
[Serializable]
- sealed class Reentrant : IDisposable {
- private int count = 0;
+#if !MOBILE
+ [TypeForwardedFrom (Consts.WindowsBase_3_0)]
+#endif
+ sealed class SimpleMonitor : IDisposable {
+ private int _busyCount;
- public Reentrant()
+ public SimpleMonitor()
{
}
public void Enter()
{
- count++;
+ _busyCount++;
}
public void Dispose()
{
- count--;
+ _busyCount--;
}
public bool Busy
{
- get { return count > 0; }
+ get { return _busyCount > 0; }
}
}
- private Reentrant reentrant = new Reentrant ();
+ private SimpleMonitor _monitor = new SimpleMonitor ();
public ObservableCollection ()
{
@@ -83,7 +86,9 @@ namespace System.Collections.ObjectModel
{
}
+ [field:NonSerialized]
public virtual event NotifyCollectionChangedEventHandler CollectionChanged;
+ [field:NonSerialized]
protected virtual event PropertyChangedEventHandler PropertyChanged;
event PropertyChangedEventHandler INotifyPropertyChanged.PropertyChanged {
@@ -93,8 +98,8 @@ namespace System.Collections.ObjectModel
protected IDisposable BlockReentrancy ()
{
- reentrant.Enter ();
- return reentrant;
+ _monitor.Enter ();
+ return _monitor;
}
protected void CheckReentrancy ()
@@ -102,7 +107,7 @@ namespace System.Collections.ObjectModel
NotifyCollectionChangedEventHandler eh = CollectionChanged;
// Only have a problem if we have more than one event listener.
- if (reentrant.Busy && eh != null && eh.GetInvocationList ().Length > 1)
+ if (_monitor.Busy && eh != null && eh.GetInvocationList ().Length > 1)
throw new InvalidOperationException ("Cannot modify the collection while reentrancy is blocked.");
}
diff --git a/mcs/class/System/System.Configuration/SettingValueElement.cs b/mcs/class/System/System.Configuration/SettingValueElement.cs
index bf618659ce6..4c336dd0057 100644
--- a/mcs/class/System/System.Configuration/SettingValueElement.cs
+++ b/mcs/class/System/System.Configuration/SettingValueElement.cs
@@ -27,6 +27,7 @@
//
using System;
+using System.Reflection;
#if (XML_DEP)
using System.Xml;
#endif
@@ -112,7 +113,79 @@ namespace System.Configuration
#if (CONFIGURATION_DEP)
protected override void Unmerge (ConfigurationElement sourceElement, ConfigurationElement parentElement, ConfigurationSaveMode saveMode)
{
- throw new NotImplementedException ();
+ if (parentElement != null && sourceElement.GetType() != parentElement.GetType())
+ throw new ConfigurationErrorsException ("Can't unmerge two elements of different type");
+
+ bool isMinimalOrModified = saveMode == ConfigurationSaveMode.Minimal ||
+ saveMode == ConfigurationSaveMode.Modified;
+
+ foreach (PropertyInformation prop in sourceElement.ElementInformation.Properties)
+ {
+ if (prop.ValueOrigin == PropertyValueOrigin.Default)
+ continue;
+
+ PropertyInformation unmergedProp = ElementInformation.Properties [prop.Name];
+
+ object sourceValue = prop.Value;
+ if (parentElement == null || !HasValue (parentElement, prop.Name)) {
+ unmergedProp.Value = sourceValue;
+ continue;
+ }
+
+ if (sourceValue == null)
+ continue;
+
+ object parentValue = GetItem (parentElement, prop.Name);
+ if (!PropertyIsElement (prop)) {
+ if (!object.Equals (sourceValue, parentValue) ||
+ (saveMode == ConfigurationSaveMode.Full) ||
+ (saveMode == ConfigurationSaveMode.Modified && prop.ValueOrigin == PropertyValueOrigin.SetHere))
+ unmergedProp.Value = sourceValue;
+ continue;
+ }
+
+ var sourceElem = (ConfigurationElement) sourceValue;
+ if (isMinimalOrModified && !ElementIsModified (sourceElem))
+ continue;
+ if (parentValue == null) {
+ unmergedProp.Value = sourceValue;
+ continue;
+ }
+
+ var parentElem = (ConfigurationElement) parentValue;
+ ConfigurationElement copy = (ConfigurationElement) unmergedProp.Value;
+ ElementUnmerge (copy, sourceElem, parentElem, saveMode);
+ }
+ }
+
+ bool HasValue (ConfigurationElement element, string propName)
+ {
+ PropertyInformation info = element.ElementInformation.Properties [propName];
+ return info != null && info.ValueOrigin != PropertyValueOrigin.Default;
+ }
+
+ object GetItem (ConfigurationElement element, string property)
+ {
+ PropertyInformation pi = ElementInformation.Properties [property];
+ if (pi == null)
+ throw new InvalidOperationException ("Property '" + property + "' not found in configuration element");
+
+ return pi.Value;
+ }
+
+ bool PropertyIsElement (PropertyInformation prop)
+ {
+ return (typeof(ConfigurationElement).IsAssignableFrom (prop.Type));
+ }
+
+ bool ElementIsModified (ConfigurationElement element)
+ {
+ return (bool) element.GetType ().GetMethod ("IsModified", BindingFlags.NonPublic | BindingFlags.Instance).Invoke (element, new object [0]);
+ }
+
+ void ElementUnmerge (ConfigurationElement target, ConfigurationElement sourceElement, ConfigurationElement parentElement, ConfigurationSaveMode saveMode)
+ {
+ target.GetType ().GetMethod ("Unmerge", BindingFlags.NonPublic | BindingFlags.Instance).Invoke (target, new object [] {sourceElement, parentElement, saveMode});
}
#endif
}
diff --git a/mcs/class/System/System.Diagnostics/TraceImpl.cs b/mcs/class/System/System.Diagnostics/TraceImpl.cs
index 55a8362a551..dc45ae8d4ad 100644
--- a/mcs/class/System/System.Diagnostics/TraceImpl.cs
+++ b/mcs/class/System/System.Diagnostics/TraceImpl.cs
@@ -53,7 +53,7 @@ namespace System.Diagnostics {
}
#endif
- internal class TraceImpl {
+ static class TraceImpl {
#if !MOBILE
private static object initLock = new object ();
@@ -86,23 +86,21 @@ namespace System.Diagnostics {
}
#else
[ThreadStatic]
- private static int indentLevel = 0;
+ private static int indentLevel;
[ThreadStatic]
private static int indentSize;
#endif
- private TraceImpl ()
- {
- }
-
#if MOBILE
- static TraceImpl ()
- {
- listeners = new TraceListenerCollection (true);
- }
+ static TraceListenerCollection listeners = new TraceListenerCollection (true);
+#else
+ static TraceListenerCollection listeners;
#endif
+ static bool use_global_lock;
+ static CorrelationManager correlation_manager = new CorrelationManager ();
+
public static bool AutoFlush {
get {
InitOnce ();
@@ -146,8 +144,6 @@ namespace System.Diagnostics {
}
}
- private static TraceListenerCollection listeners;
-
public static TraceListenerCollection Listeners {
get {
InitOnce ();
@@ -162,9 +158,6 @@ namespace System.Diagnostics {
}
}
- static bool use_global_lock;
- static CorrelationManager correlation_manager = new CorrelationManager ();
-
public static CorrelationManager CorrelationManager {
get {
InitOnce ();
@@ -223,24 +216,18 @@ namespace System.Diagnostics {
#endif
}
- // FIXME: According to MSDN, this method should display a dialog box
- [MonoTODO]
public static void Assert (bool condition)
{
if (!condition)
- Fail (new StackTrace(true).ToString());
+ Fail ("");
}
- // FIXME: According to MSDN, this method should display a dialog box
- [MonoTODO]
public static void Assert (bool condition, string message)
{
if (!condition)
Fail (message);
}
- // FIXME: According to MSDN, this method should display a dialog box
- [MonoTODO]
public static void Assert (bool condition, string message,
string detailMessage)
{
diff --git a/mcs/class/System/System.Diagnostics/TraceListener.cs b/mcs/class/System/System.Diagnostics/TraceListener.cs
index f2d3c766105..7bb49150b5e 100644
--- a/mcs/class/System/System.Diagnostics/TraceListener.cs
+++ b/mcs/class/System/System.Diagnostics/TraceListener.cs
@@ -162,7 +162,7 @@ namespace System.Diagnostics {
public virtual void Fail (string message)
{
- Fail (message, "");
+ Fail (message, null);
}
public virtual void Fail (string message, string detailMessage)
@@ -170,8 +170,11 @@ namespace System.Diagnostics {
WriteLine ("---- DEBUG ASSERTION FAILED ----");
WriteLine ("---- Assert Short Message ----");
WriteLine (message);
- WriteLine ("---- Assert Long Message ----");
- WriteLine (detailMessage);
+ if (detailMessage != null) {
+ WriteLine ("---- Assert Long Message ----");
+ WriteLine (detailMessage);
+ }
+
WriteLine ("");
}
diff --git a/mcs/class/System/System.IO.Compression/CompressionLevel.cs b/mcs/class/System/System.IO.Compression/CompressionLevel.cs
index 7ea3a7a49f7..2242c19cf58 100644
--- a/mcs/class/System/System.IO.Compression/CompressionLevel.cs
+++ b/mcs/class/System/System.IO.Compression/CompressionLevel.cs
@@ -27,7 +27,7 @@
#if NET_4_5
namespace System.IO.Compression {
public enum CompressionLevel {
- Optional,
+ Optimal,
Fastest,
NoCompression
}
diff --git a/mcs/class/System/System.IO.Compression/DeflateStream.cs b/mcs/class/System/System.IO.Compression/DeflateStream.cs
index 00c92ef503c..02c0c9f6b02 100644
--- a/mcs/class/System/System.IO.Compression/DeflateStream.cs
+++ b/mcs/class/System/System.IO.Compression/DeflateStream.cs
@@ -5,8 +5,10 @@
// Authors:
// Christopher James Lahey <clahey@ximian.com>
// Gonzalo Paniagua Javier (gonzalo@novell.com)
+// Marek Safar (marek.safar@gmail.com)
//
// (c) Copyright 2004,2009 Novell, Inc. <http://www.novell.com>
+// Copyright (C) 2013 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -37,12 +39,10 @@ using System.Runtime.Remoting.Messaging;
using MonoTouch;
#endif
-namespace System.IO.Compression {
+namespace System.IO.Compression
+{
public class DeflateStream : Stream
{
- const int BufferSize = 4096;
- [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
- delegate int UnmanagedReadOrWrite (IntPtr buffer, int length, IntPtr data);
delegate int ReadMethod (byte[] array, int offset, int count);
delegate void WriteMethod (byte[] array, int offset, int count);
@@ -50,11 +50,7 @@ namespace System.IO.Compression {
CompressionMode mode;
bool leaveOpen;
bool disposed;
- UnmanagedReadOrWrite feeder; // This will be passed to unmanaged code and used there
- IntPtr z_stream;
- byte [] io_buffer;
-
- GCHandle data;
+ DeflateStreamNative native;
public DeflateStream (Stream compressedStream, CompressionMode mode) :
this (compressedStream, mode, false, false)
@@ -74,14 +70,10 @@ namespace System.IO.Compression {
if (mode != CompressionMode.Compress && mode != CompressionMode.Decompress)
throw new ArgumentException ("mode");
- this.data = GCHandle.Alloc (this);
this.base_stream = compressedStream;
- this.feeder = (mode == CompressionMode.Compress) ? new UnmanagedReadOrWrite (UnmanagedWrite) :
- new UnmanagedReadOrWrite (UnmanagedRead);
- this.z_stream = CreateZStream (mode, gzip, feeder, GCHandle.ToIntPtr (data));
- if (z_stream == IntPtr.Zero) {
- this.base_stream = null;
- this.feeder = null;
+
+ this.native = DeflateStreamNative.Create (compressedStream, mode, gzip);
+ if (this.native == null) {
throw new NotImplementedException ("Failed to initialize zlib. You probably have an old zlib installed. Version 1.2.0.4 or later is required.");
}
this.mode = mode;
@@ -106,109 +98,31 @@ namespace System.IO.Compression {
protected override void Dispose (bool disposing)
{
+ native.Dispose (disposing);
+
if (disposing && !disposed) {
disposed = true;
- IntPtr zz = z_stream;
- z_stream = IntPtr.Zero;
- int res = 0;
- if (zz != IntPtr.Zero)
- res = CloseZStream (zz); // This will Flush() the remaining output if any
- io_buffer = null;
if (!leaveOpen) {
Stream st = base_stream;
if (st != null)
st.Close ();
base_stream = null;
}
- CheckResult (res, "Dispose");
- }
-
- if (data.IsAllocated) {
- data.Free ();
- data = new GCHandle ();
}
base.Dispose (disposing);
}
-#if MONOTOUCH
- [MonoPInvokeCallback (typeof (UnmanagedReadOrWrite))]
-#endif
- static int UnmanagedRead (IntPtr buffer, int length, IntPtr data)
- {
- GCHandle s = GCHandle.FromIntPtr (data);
- var self = s.Target as DeflateStream;
- if (self == null)
- return -1;
- return self.UnmanagedRead (buffer, length);
- }
-
- int UnmanagedRead (IntPtr buffer, int length)
- {
- int total = 0;
- int n = 1;
- while (length > 0 && n > 0) {
- if (io_buffer == null)
- io_buffer = new byte [BufferSize];
-
- int count = Math.Min (length, io_buffer.Length);
- n = base_stream.Read (io_buffer, 0, count);
- if (n > 0) {
- Marshal.Copy (io_buffer, 0, buffer, n);
- unsafe {
- buffer = new IntPtr ((byte *) buffer.ToPointer () + n);
- }
- length -= n;
- total += n;
- }
- }
- return total;
- }
-
-#if MONOTOUCH
- [MonoPInvokeCallback (typeof (UnmanagedReadOrWrite))]
-#endif
- static int UnmanagedWrite (IntPtr buffer, int length, IntPtr data)
- {
- GCHandle s = GCHandle.FromIntPtr (data);
- var self = s.Target as DeflateStream;
- if (self == null)
- return -1;
- return self.UnmanagedWrite (buffer, length);
- }
-
- int UnmanagedWrite (IntPtr buffer, int length)
- {
- int total = 0;
- while (length > 0) {
- if (io_buffer == null)
- io_buffer = new byte [BufferSize];
-
- int count = Math.Min (length, io_buffer.Length);
- Marshal.Copy (buffer, io_buffer, 0, count);
- base_stream.Write (io_buffer, 0, count);
- unsafe {
- buffer = new IntPtr ((byte *) buffer.ToPointer () + count);
- }
- length -= count;
- total += count;
- }
- return total;
- }
-
unsafe int ReadInternal (byte[] array, int offset, int count)
{
if (count == 0)
return 0;
- int result = 0;
fixed (byte *b = array) {
IntPtr ptr = new IntPtr (b + offset);
- result = ReadZStream (z_stream, ptr, count);
+ return native.ReadZStream (ptr, count);
}
- CheckResult (result, "ReadInternal");
- return result;
}
public override int Read (byte[] dest, int dest_offset, int count)
@@ -235,12 +149,10 @@ namespace System.IO.Compression {
if (count == 0)
return;
- int result = 0;
fixed (byte *b = array) {
IntPtr ptr = new IntPtr (b + offset);
- result = WriteZStream (z_stream, ptr, count);
+ native.WriteZStream (ptr, count);
}
- CheckResult (result, "WriteInternal");
}
public override void Write (byte[] src, int src_offset, int count)
@@ -263,53 +175,13 @@ namespace System.IO.Compression {
WriteInternal (src, src_offset, count);
}
- static void CheckResult (int result, string where)
- {
- if (result >= 0)
- return;
-
- string error;
- switch (result) {
- case -1: // Z_ERRNO
- error = "Unknown error"; // Marshal.GetLastWin32() ?
- break;
- case -2: // Z_STREAM_ERROR
- error = "Internal error";
- break;
- case -3: // Z_DATA_ERROR
- error = "Corrupted data";
- break;
- case -4: // Z_MEM_ERROR
- error = "Not enough memory";
- break;
- case -5: // Z_BUF_ERROR
- error = "Internal error (no progress possible)";
- break;
- case -6: // Z_VERSION_ERROR
- error = "Invalid version";
- break;
- case -10:
- error = "Invalid argument(s)";
- break;
- case -11:
- error = "IO error";
- break;
- default:
- error = "Unknown error";
- break;
- }
-
- throw new IOException (error + " " + where);
- }
-
public override void Flush ()
{
if (disposed)
throw new ObjectDisposedException (GetType ().FullName);
if (CanWrite) {
- int result = Flush (z_stream);
- CheckResult (result, "Flush");
+ native.Flush ();
}
}
@@ -430,6 +302,188 @@ namespace System.IO.Compression {
get { throw new NotSupportedException(); }
set { throw new NotSupportedException(); }
}
+ }
+
+ class DeflateStreamNative
+ {
+ const int BufferSize = 4096;
+
+ [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
+ delegate int UnmanagedReadOrWrite (IntPtr buffer, int length, IntPtr data);
+
+ UnmanagedReadOrWrite feeder; // This will be passed to unmanaged code and used there
+
+ Stream base_stream;
+ IntPtr z_stream;
+ GCHandle data;
+ bool disposed;
+ byte [] io_buffer;
+
+ private DeflateStreamNative ()
+ {
+ }
+
+ public static DeflateStreamNative Create (Stream compressedStream, CompressionMode mode, bool gzip)
+ {
+ var dsn = new DeflateStreamNative ();
+ dsn.data = GCHandle.Alloc (dsn);
+ dsn.feeder = mode == CompressionMode.Compress ? new UnmanagedReadOrWrite (UnmanagedWrite) : new UnmanagedReadOrWrite (UnmanagedRead);
+ dsn.z_stream = CreateZStream (mode, gzip, dsn.feeder, GCHandle.ToIntPtr (dsn.data));
+ if (dsn.z_stream == IntPtr.Zero) {
+ dsn.Dispose (true);
+ return null;
+ }
+
+ dsn.base_stream = compressedStream;
+ return dsn;
+ }
+
+ ~DeflateStreamNative ()
+ {
+ Dispose (false);
+ }
+
+ public void Dispose (bool disposing)
+ {
+ if (disposing && !disposed) {
+ disposed = true;
+ GC.SuppressFinalize (this);
+
+ io_buffer = null;
+
+ IntPtr zz = z_stream;
+ z_stream = IntPtr.Zero;
+ if (zz != IntPtr.Zero)
+ CloseZStream (zz); // This will Flush() the remaining output if any
+ }
+
+ if (data.IsAllocated) {
+ data.Free ();
+ }
+ }
+
+ public void Flush ()
+ {
+ var res = Flush (z_stream);
+ CheckResult (res, "Flush");
+ }
+
+ public int ReadZStream (IntPtr buffer, int length)
+ {
+ var res = ReadZStream (z_stream, buffer, length);
+ CheckResult (res, "ReadInternal");
+ return res;
+ }
+
+ public void WriteZStream (IntPtr buffer, int length)
+ {
+ var res = WriteZStream (z_stream, buffer, length);
+ CheckResult (res, "WriteInternal");
+ }
+
+#if MONOTOUCH
+ [MonoPInvokeCallback (typeof (UnmanagedReadOrWrite))]
+#endif
+ static int UnmanagedRead (IntPtr buffer, int length, IntPtr data)
+ {
+ GCHandle s = GCHandle.FromIntPtr (data);
+ var self = s.Target as DeflateStreamNative;
+ if (self == null)
+ return -1;
+ return self.UnmanagedRead (buffer, length);
+ }
+
+ int UnmanagedRead (IntPtr buffer, int length)
+ {
+ int total = 0;
+ int n = 1;
+ while (length > 0 && n > 0) {
+ if (io_buffer == null)
+ io_buffer = new byte [BufferSize];
+
+ int count = Math.Min (length, io_buffer.Length);
+ n = base_stream.Read (io_buffer, 0, count);
+ if (n > 0) {
+ Marshal.Copy (io_buffer, 0, buffer, n);
+ unsafe {
+ buffer = new IntPtr ((byte *) buffer.ToPointer () + n);
+ }
+ length -= n;
+ total += n;
+ }
+ }
+ return total;
+ }
+
+#if MONOTOUCH
+ [MonoPInvokeCallback (typeof (UnmanagedReadOrWrite))]
+#endif
+ static int UnmanagedWrite (IntPtr buffer, int length, IntPtr data)
+ {
+ GCHandle s = GCHandle.FromIntPtr (data);
+ var self = s.Target as DeflateStreamNative;
+ if (self == null)
+ return -1;
+ return self.UnmanagedWrite (buffer, length);
+ }
+
+ int UnmanagedWrite (IntPtr buffer, int length)
+ {
+ int total = 0;
+ while (length > 0) {
+ if (io_buffer == null)
+ io_buffer = new byte [BufferSize];
+
+ int count = Math.Min (length, io_buffer.Length);
+ Marshal.Copy (buffer, io_buffer, 0, count);
+ base_stream.Write (io_buffer, 0, count);
+ unsafe {
+ buffer = new IntPtr ((byte *) buffer.ToPointer () + count);
+ }
+ length -= count;
+ total += count;
+ }
+ return total;
+ }
+
+ static void CheckResult (int result, string where)
+ {
+ if (result >= 0)
+ return;
+
+ string error;
+ switch (result) {
+ case -1: // Z_ERRNO
+ error = "Unknown error"; // Marshal.GetLastWin32() ?
+ break;
+ case -2: // Z_STREAM_ERROR
+ error = "Internal error";
+ break;
+ case -3: // Z_DATA_ERROR
+ error = "Corrupted data";
+ break;
+ case -4: // Z_MEM_ERROR
+ error = "Not enough memory";
+ break;
+ case -5: // Z_BUF_ERROR
+ error = "Internal error (no progress possible)";
+ break;
+ case -6: // Z_VERSION_ERROR
+ error = "Invalid version";
+ break;
+ case -10:
+ error = "Invalid argument(s)";
+ break;
+ case -11:
+ error = "IO error";
+ break;
+ default:
+ error = "Unknown error";
+ break;
+ }
+
+ throw new IOException (error + " " + where);
+ }
#if MONOTOUCH || MONODROID
const string LIBNAME = "__Internal";
diff --git a/mcs/class/System/System.Net.NetworkInformation/NetworkChange.cs b/mcs/class/System/System.Net.NetworkInformation/NetworkChange.cs
index c60954c949e..de9754e951d 100644
--- a/mcs/class/System/System.Net.NetworkInformation/NetworkChange.cs
+++ b/mcs/class/System/System.Net.NetworkInformation/NetworkChange.cs
@@ -2,8 +2,8 @@
// System.Net.NetworkInformation.NetworkChange
//
// Authors:
-// Gonzalo Paniagua Javier (gonzalo@novell.com)
-// Aaron Bockover (abock@xamarin.com)
+// Gonzalo Paniagua Javier (LinuxNetworkChange) (gonzalo@novell.com)
+// Aaron Bockover (MacNetworkChange) (abock@xamarin.com)
//
// Copyright (c) 2006,2011 Novell, Inc. (http://www.novell.com)
// Copyright (c) 2013 Xamarin, Inc. (http://www.xamarin.com)
@@ -15,10 +15,10 @@
// 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
@@ -28,137 +28,298 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System;
using System.Net.Sockets;
using System.Runtime.InteropServices;
using System.Threading;
+#if NETWORK_CHANGE_STANDALONE
+namespace NetworkInformation {
+
+ public class NetworkAvailabilityEventArgs : EventArgs
+ {
+ public bool IsAvailable { get; set; }
+
+ public NetworkAvailabilityEventArgs (bool available)
+ {
+ IsAvailable = available;
+ }
+ }
+
+ public delegate void NetworkAddressChangedEventHandler (object sender, EventArgs args);
+ public delegate void NetworkAvailabilityChangedEventHandler (object sender, NetworkAvailabilityEventArgs args);
+#else
namespace System.Net.NetworkInformation {
- internal interface INetworkChange {
+#endif
+
+ internal interface INetworkChange : IDisposable {
event NetworkAddressChangedEventHandler NetworkAddressChanged;
event NetworkAvailabilityChangedEventHandler NetworkAvailabilityChanged;
+ bool HasRegisteredEvents { get; }
}
public sealed class NetworkChange {
static INetworkChange networkChange;
- static NetworkChange ()
+ public static event NetworkAddressChangedEventHandler NetworkAddressChanged {
+ add {
+ lock (typeof (INetworkChange)) {
+ MaybeCreate ();
+ if (networkChange != null)
+ networkChange.NetworkAddressChanged += value;
+ }
+ }
+
+ remove {
+ lock (typeof (INetworkChange)) {
+ if (networkChange != null) {
+ networkChange.NetworkAddressChanged -= value;
+ MaybeDispose ();
+ }
+ }
+ }
+ }
+
+ public static event NetworkAvailabilityChangedEventHandler NetworkAvailabilityChanged {
+ add {
+ lock (typeof (INetworkChange)) {
+ MaybeCreate ();
+ if (networkChange != null)
+ networkChange.NetworkAvailabilityChanged += value;
+ }
+ }
+
+ remove {
+ lock (typeof (INetworkChange)) {
+ if (networkChange != null) {
+ networkChange.NetworkAvailabilityChanged -= value;
+ MaybeDispose ();
+ }
+ }
+ }
+ }
+
+ static void MaybeCreate ()
{
- if (MacNetworkChange.IsEnabled) {
+ if (networkChange != null)
+ return;
+
+ try {
networkChange = new MacNetworkChange ();
- } else {
+ } catch {
+#if !NETWORK_CHANGE_STANDALONE
networkChange = new LinuxNetworkChange ();
+#endif
}
}
- public static event NetworkAddressChangedEventHandler NetworkAddressChanged {
- add { networkChange.NetworkAddressChanged += value; }
- remove { networkChange.NetworkAddressChanged -= value; }
+ static void MaybeDispose ()
+ {
+ if (networkChange != null && networkChange.HasRegisteredEvents) {
+ networkChange.Dispose ();
+ networkChange = null;
+ }
}
+ }
- public static event NetworkAvailabilityChangedEventHandler NetworkAvailabilityChanged {
- add { networkChange.NetworkAvailabilityChanged += value; }
- remove { networkChange.NetworkAvailabilityChanged -= value; }
+ internal sealed class MacNetworkChange : INetworkChange
+ {
+ const string DL_LIB = "/usr/lib/libSystem.dylib";
+ const string CORE_SERVICES_LIB = "/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration";
+ const string CORE_FOUNDATION_LIB = "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation";
+
+ [UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)]
+ delegate void SCNetworkReachabilityCallback (IntPtr target, NetworkReachabilityFlags flags, IntPtr info);
+
+ [DllImport (DL_LIB)]
+ static extern IntPtr dlopen (string path, int mode);
+
+ [DllImport (DL_LIB)]
+ static extern IntPtr dlsym (IntPtr handle, string symbol);
+
+ [DllImport (DL_LIB)]
+ static extern int dlclose (IntPtr handle);
+
+ [DllImport (CORE_FOUNDATION_LIB)]
+ static extern void CFRelease (IntPtr handle);
+
+ [DllImport (CORE_FOUNDATION_LIB)]
+ static extern IntPtr CFRunLoopGetMain ();
+
+ [DllImport (CORE_SERVICES_LIB)]
+ static extern IntPtr SCNetworkReachabilityCreateWithAddress (IntPtr allocator, ref sockaddr_in sockaddr);
+
+ [DllImport (CORE_SERVICES_LIB)]
+ static extern bool SCNetworkReachabilityGetFlags (IntPtr reachability, out NetworkReachabilityFlags flags);
+
+ [DllImport (CORE_SERVICES_LIB)]
+ static extern bool SCNetworkReachabilitySetCallback (IntPtr reachability, SCNetworkReachabilityCallback callback, ref SCNetworkReachabilityContext context);
+
+ [DllImport (CORE_SERVICES_LIB)]
+ static extern bool SCNetworkReachabilityScheduleWithRunLoop (IntPtr reachability, IntPtr runLoop, IntPtr runLoopMode);
+
+ [DllImport (CORE_SERVICES_LIB)]
+ static extern bool SCNetworkReachabilityUnscheduleFromRunLoop (IntPtr reachability, IntPtr runLoop, IntPtr runLoopMode);
+
+ [StructLayout (LayoutKind.Explicit, Size = 28)]
+ struct sockaddr_in {
+ [FieldOffset (0)] public byte sin_len;
+ [FieldOffset (1)] public byte sin_family;
+
+ public static sockaddr_in Create ()
+ {
+ return new sockaddr_in {
+ sin_len = 28,
+ sin_family = 2 // AF_INET
+ };
+ }
}
- }
- internal sealed class MacNetworkChange : INetworkChange {
- public static bool IsEnabled {
- get { return mono_sc_reachability_enabled () != 0; }
+ [StructLayout (LayoutKind.Sequential)]
+ struct SCNetworkReachabilityContext {
+ public IntPtr version;
+ public IntPtr info;
+ public IntPtr retain;
+ public IntPtr release;
+ public IntPtr copyDescription;
+ }
+
+ [Flags]
+ enum NetworkReachabilityFlags {
+ None = 0,
+ TransientConnection = 1 << 0,
+ Reachable = 1 << 1,
+ ConnectionRequired = 1 << 2,
+ ConnectionOnTraffic = 1 << 3,
+ InterventionRequired = 1 << 4,
+ ConnectionOnDemand = 1 << 5,
+ IsLocalAddress = 1 << 16,
+ IsDirect = 1 << 17,
+ IsWWAN = 1 << 18,
+ ConnectionAutomatic = ConnectionOnTraffic
}
+ IntPtr handle;
+ IntPtr runLoopMode;
+ SCNetworkReachabilityCallback callback;
+ bool scheduledWithRunLoop;
+ NetworkReachabilityFlags flags;
+
event NetworkAddressChangedEventHandler networkAddressChanged;
event NetworkAvailabilityChangedEventHandler networkAvailabilityChanged;
public event NetworkAddressChangedEventHandler NetworkAddressChanged {
add {
- if (value != null) {
- MaybeInitialize ();
- networkAddressChanged += value;
- value (null, EventArgs.Empty);
- }
+ value (null, EventArgs.Empty);
+ networkAddressChanged += value;
}
- remove {
- networkAddressChanged -= value;
- MaybeDispose ();
- }
+ remove { networkAddressChanged -= value; }
}
public event NetworkAvailabilityChangedEventHandler NetworkAvailabilityChanged {
add {
- if (value != null) {
- MaybeInitialize ();
- networkAvailabilityChanged += value;
- var available = handle != IntPtr.Zero && mono_sc_reachability_is_available (handle) != 0;
- value (null, new NetworkAvailabilityEventArgs (available));
- }
+ value (null, new NetworkAvailabilityEventArgs (IsAvailable));
+ networkAvailabilityChanged += value;
}
- remove {
- networkAvailabilityChanged -= value;
- MaybeDispose ();
+ remove { networkAvailabilityChanged -= value; }
+ }
+
+ bool IsAvailable {
+ get {
+ return (flags & NetworkReachabilityFlags.Reachable) != 0 &&
+ (flags & NetworkReachabilityFlags.ConnectionRequired) == 0;
}
}
- IntPtr handle;
- MonoSCReachabilityCallback callback;
+ public bool HasRegisteredEvents {
+ get { return networkAddressChanged != null || networkAvailabilityChanged != null; }
+ }
- void Callback (int available)
+ public MacNetworkChange ()
{
- var addressChanged = networkAddressChanged;
- if (addressChanged != null) {
- addressChanged (null, EventArgs.Empty);
- }
+ var sockaddr = sockaddr_in.Create ();
+ handle = SCNetworkReachabilityCreateWithAddress (IntPtr.Zero, ref sockaddr);
+ if (handle == IntPtr.Zero)
+ throw new Exception ("SCNetworkReachabilityCreateWithAddress returned NULL");
- var availabilityChanged = networkAvailabilityChanged;
- if (availabilityChanged != null) {
- availabilityChanged (null, new NetworkAvailabilityEventArgs (available != 0));
- }
+ callback = new SCNetworkReachabilityCallback (HandleCallback);
+ var info = new SCNetworkReachabilityContext {
+ info = GCHandle.ToIntPtr (GCHandle.Alloc (this))
+ };
+
+ SCNetworkReachabilitySetCallback (handle, callback, ref info);
+
+ scheduledWithRunLoop =
+ LoadRunLoopMode () &&
+ SCNetworkReachabilityScheduleWithRunLoop (handle, CFRunLoopGetMain (), runLoopMode);
+
+ SCNetworkReachabilityGetFlags (handle, out flags);
}
- void MaybeInitialize ()
+ bool LoadRunLoopMode ()
{
- lock (this) {
- if (handle == IntPtr.Zero) {
- callback = new MonoSCReachabilityCallback (Callback);
- handle = mono_sc_reachability_new (callback);
+ var cfLibHandle = dlopen (CORE_FOUNDATION_LIB, 0);
+ if (cfLibHandle == IntPtr.Zero)
+ return false;
+
+ try {
+ runLoopMode = dlsym (cfLibHandle, "kCFRunLoopDefaultMode");
+ if (runLoopMode != IntPtr.Zero) {
+ runLoopMode = Marshal.ReadIntPtr (runLoopMode);
+ return runLoopMode != IntPtr.Zero;
}
+ } finally {
+ dlclose (cfLibHandle);
}
+
+ return false;
}
- void MaybeDispose ()
+ public void Dispose ()
{
lock (this) {
- var addressChanged = networkAddressChanged;
- var availabilityChanged = networkAvailabilityChanged;
- if (handle != IntPtr.Zero && addressChanged == null && availabilityChanged == null) {
- mono_sc_reachability_free (handle);
- handle = IntPtr.Zero;
- }
+ if (handle == IntPtr.Zero)
+ return;
+
+ if (scheduledWithRunLoop)
+ SCNetworkReachabilityUnscheduleFromRunLoop (handle, CFRunLoopGetMain (), runLoopMode);
+
+ CFRelease (handle);
+ handle = IntPtr.Zero;
+ callback = null;
+ flags = NetworkReachabilityFlags.None;
+ scheduledWithRunLoop = false;
}
}
-#if MONOTOUCH || MONODROID
- const string LIBNAME = "__Internal";
-#else
- const string LIBNAME = "MonoPosixHelper";
+#if MONOTOUCH
+ [MonoTouch.MonoPInvokeCallback (typeof (SCNetworkReachabilityCallback))]
#endif
+ static void HandleCallback (IntPtr reachability, NetworkReachabilityFlags flags, IntPtr info)
+ {
+ if (info == IntPtr.Zero)
+ return;
- delegate void MonoSCReachabilityCallback (int available);
-
- [DllImport (LIBNAME)]
- static extern int mono_sc_reachability_enabled ();
+ var instance = GCHandle.FromIntPtr (info).Target as MacNetworkChange;
+ if (instance == null || instance.flags == flags)
+ return;
- [DllImport (LIBNAME)]
- static extern IntPtr mono_sc_reachability_new (MonoSCReachabilityCallback callback);
+ instance.flags = flags;
- [DllImport (LIBNAME)]
- static extern void mono_sc_reachability_free (IntPtr handle);
+ var addressChanged = instance.networkAddressChanged;
+ if (addressChanged != null)
+ addressChanged (null, EventArgs.Empty);
- [DllImport (LIBNAME)]
- static extern int mono_sc_reachability_is_available (IntPtr handle);
+ var availabilityChanged = instance.networkAvailabilityChanged;
+ if (availabilityChanged != null)
+ availabilityChanged (null, new NetworkAvailabilityEventArgs (instance.IsAvailable));
+ }
}
+#if !NETWORK_CHANGE_STANDALONE
+
internal sealed class LinuxNetworkChange : INetworkChange {
[Flags]
enum EventType {
@@ -185,6 +346,14 @@ namespace System.Net.NetworkInformation {
remove { Unregister (value); }
}
+ public bool HasRegisteredEvents {
+ get { return AddressChanged != null || AvailabilityChanged != null; }
+ }
+
+ public void Dispose ()
+ {
+ }
+
//internal Socket (AddressFamily family, SocketType type, ProtocolType proto, IntPtr sock)
bool EnsureSocket ()
@@ -321,5 +490,7 @@ namespace System.Net.NetworkInformation {
[DllImport (LIBNAME, CallingConvention=CallingConvention.Cdecl)]
static extern IntPtr CloseNLSocket (IntPtr sock);
}
-}
+#endif
+
+}
diff --git a/mcs/class/System/System.Net.Sockets/Socket_2_1.cs b/mcs/class/System/System.Net.Sockets/Socket_2_1.cs
index 05b1ff31f54..11a7eda8a45 100644
--- a/mcs/class/System/System.Net.Sockets/Socket_2_1.cs
+++ b/mcs/class/System/System.Net.Sockets/Socket_2_1.cs
@@ -752,16 +752,33 @@ namespace System.Net.Sockets {
}
if (ipv6Supported == -1) {
+ // We need to put a try/catch around ConfigurationManager methods as will always throw an exception
+ // when run in a mono embedded application. This occurs as embedded applications do not have a setup
+ // for application config. The exception is not thrown when called from a normal .NET application.
+ //
+ // We, then, need to guard calls to the ConfigurationManager. If the config is not found or throws an
+ // exception, will fall through to the existing Socket / API directly below in the code.
+ //
+ // Also note that catching ConfigurationErrorsException specifically would require library dependency
+ // System.Configuration, and wanted to avoid that.
#if !NET_2_1
#if CONFIGURATION_DEP
- SettingsSection config;
- config = (SettingsSection) System.Configuration.ConfigurationManager.GetSection ("system.net/settings");
- if (config != null)
- ipv6Supported = config.Ipv6.Enabled ? -1 : 0;
+ try {
+ SettingsSection config;
+ config = (SettingsSection) System.Configuration.ConfigurationManager.GetSection ("system.net/settings");
+ if (config != null)
+ ipv6Supported = config.Ipv6.Enabled ? -1 : 0;
+ } catch {
+ ipv6Supported = -1;
+ }
#else
- NetConfig config = System.Configuration.ConfigurationSettings.GetConfig("system.net/settings") as NetConfig;
- if (config != null)
- ipv6Supported = config.ipv6Enabled ? -1 : 0;
+ try {
+ NetConfig config = System.Configuration.ConfigurationSettings.GetConfig("system.net/settings") as NetConfig;
+ if (config != null)
+ ipv6Supported = config.ipv6Enabled ? -1 : 0;
+ } catch {
+ ipv6Supported = -1;
+ }
#endif
#endif
if (ipv6Supported != 0) {
diff --git a/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs b/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs
index f04cb3c0543..3778c740538 100644
--- a/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs
+++ b/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs
@@ -1,10 +1,12 @@
//
// ClientWebSocket.cs
//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
+// Authors:
+// Jérémie Laval <jeremie dot laval at xamarin dot com>
//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+// Copyright 2013 Xamarin Inc (http://www.xamarin.com).
+//
+// Lightly inspired from WebSocket4Net distributed under the Apache License 2.0
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -27,71 +29,327 @@
#if NET_4_5
using System;
+using System.Net;
+using System.Net.Sockets;
+using System.Security.Principal;
+using System.Security.Cryptography.X509Certificates;
+using System.Runtime.CompilerServices;
+using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
+using System.Globalization;
+using System.Text;
+using System.Security.Cryptography;
namespace System.Net.WebSockets
{
- [MonoTODO]
- public class ClientWebSocket : WebSocket
+ public class ClientWebSocket : WebSocket, IDisposable
{
- public ClientWebSocketOptions Options {
- get { throw new NotImplementedException (); }
+ const string Magic = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
+ const string VersionTag = "13";
+
+ ClientWebSocketOptions options;
+ WebSocketState state;
+ string subProtocol;
+
+ HttpWebRequest req;
+ WebConnection connection;
+ Socket underlyingSocket;
+
+ Random random = new Random ();
+
+ const int HeaderMaxLength = 14;
+ byte[] headerBuffer;
+ byte[] sendBuffer;
+
+ public ClientWebSocket ()
+ {
+ options = new ClientWebSocketOptions ();
+ state = WebSocketState.None;
+ headerBuffer = new byte[HeaderMaxLength];
}
- public Task ConnectAsync (Uri uri, CancellationToken cancellationToken)
+ public override void Dispose ()
{
- throw new NotImplementedException ();
+ if (connection != null)
+ connection.Close (false);
}
- #region implemented abstract members of WebSocket
+ [MonoTODO]
public override void Abort ()
{
throw new NotImplementedException ();
}
- public override Task CloseAsync (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
+
+ public ClientWebSocketOptions Options {
+ get {
+ return options;
+ }
+ }
+
+ public override WebSocketState State {
+ get {
+ return state;
+ }
+ }
+
+ public override WebSocketCloseStatus? CloseStatus {
+ get {
+ if (state != WebSocketState.Closed)
+ return (WebSocketCloseStatus?)null;
+ return WebSocketCloseStatus.Empty;
+ }
+ }
+
+ public override string CloseStatusDescription {
+ get {
+ return null;
+ }
+ }
+
+ public override string SubProtocol {
+ get {
+ return subProtocol;
+ }
+ }
+
+ public async Task ConnectAsync (Uri uri, CancellationToken cancellationToken)
{
- throw new NotImplementedException ();
+ state = WebSocketState.Connecting;
+ var httpUri = new UriBuilder (uri);
+ if (uri.Scheme == "wss")
+ httpUri.Scheme = "https";
+ else
+ httpUri.Scheme = "http";
+ req = (HttpWebRequest)WebRequest.Create (httpUri.Uri);
+ req.ReuseConnection = true;
+ if (options.Cookies != null)
+ req.CookieContainer = options.Cookies;
+
+ if (options.CustomRequestHeaders.Count > 0) {
+ foreach (var header in options.CustomRequestHeaders)
+ req.Headers[header.Key] = header.Value;
+ }
+
+ var secKey = Convert.ToBase64String (Encoding.ASCII.GetBytes (Guid.NewGuid ().ToString ().Substring (0, 16)));
+ string expectedAccept = Convert.ToBase64String (SHA1.Create ().ComputeHash (Encoding.ASCII.GetBytes (secKey + Magic)));
+
+ req.Headers["Upgrade"] = "WebSocket";
+ req.Headers["Sec-WebSocket-Version"] = VersionTag;
+ req.Headers["Sec-WebSocket-Key"] = secKey;
+ req.Headers["Sec-WebSocket-Origin"] = uri.Host;
+ if (options.SubProtocols.Count > 0)
+ req.Headers["Sec-WebSocket-Protocol"] = string.Join (",", options.SubProtocols);
+
+ if (options.Credentials != null)
+ req.Credentials = options.Credentials;
+ if (options.ClientCertificates != null)
+ req.ClientCertificates = options.ClientCertificates;
+ if (options.Proxy != null)
+ req.Proxy = options.Proxy;
+ req.UseDefaultCredentials = options.UseDefaultCredentials;
+ req.Connection = "Upgrade";
+
+ HttpWebResponse resp = null;
+ try {
+ resp = (HttpWebResponse)(await req.GetResponseAsync ().ConfigureAwait (false));
+ } catch (Exception e) {
+ throw new WebSocketException (WebSocketError.Success, e);
+ }
+
+ connection = req.StoredConnection;
+ underlyingSocket = connection.socket;
+
+ if (resp.StatusCode != HttpStatusCode.SwitchingProtocols)
+ throw new WebSocketException ("The server returned status code '" + (int)resp.StatusCode + "' when status code '101' was expected");
+ if (!string.Equals (resp.Headers["Upgrade"], "WebSocket", StringComparison.OrdinalIgnoreCase)
+ || !string.Equals (resp.Headers["Connection"], "Upgrade", StringComparison.OrdinalIgnoreCase)
+ || !string.Equals (resp.Headers["Sec-WebSocket-Accept"], expectedAccept))
+ throw new WebSocketException ("HTTP header error during handshake");
+ if (resp.Headers["Sec-WebSocket-Protocol"] != null) {
+ if (!options.SubProtocols.Contains (resp.Headers["Sec-WebSocket-Protocol"]))
+ throw new WebSocketException (WebSocketError.UnsupportedProtocol);
+ subProtocol = resp.Headers["Sec-WebSocket-Protocol"];
+ }
+
+ state = WebSocketState.Open;
}
- public override Task CloseOutputAsync (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
+
+ public override Task SendAsync (ArraySegment<byte> buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken)
{
- throw new NotImplementedException ();
+ EnsureWebSocketConnected ();
+ ValidateArraySegment (buffer);
+ if (connection == null)
+ throw new WebSocketException (WebSocketError.Faulted);
+ var count = Math.Max (options.SendBufferSize, buffer.Count) + HeaderMaxLength;
+ if (sendBuffer == null || sendBuffer.Length != count)
+ sendBuffer = new byte[count];
+ return Task.Run (() => {
+ EnsureWebSocketState (WebSocketState.Open, WebSocketState.CloseReceived);
+ var maskOffset = WriteHeader (messageType, buffer, endOfMessage);
+
+ if (buffer.Count > 0)
+ MaskData (buffer, maskOffset);
+ //underlyingSocket.Send (headerBuffer, 0, maskOffset + 4, SocketFlags.None);
+ var headerLength = maskOffset + 4;
+ Array.Copy (headerBuffer, sendBuffer, headerLength);
+ underlyingSocket.Send (sendBuffer, 0, buffer.Count + headerLength, SocketFlags.None);
+ });
}
+
public override Task<WebSocketReceiveResult> ReceiveAsync (ArraySegment<byte> buffer, CancellationToken cancellationToken)
{
- throw new NotImplementedException ();
+ EnsureWebSocketConnected ();
+ ValidateArraySegment (buffer);
+ return Task.Run (() => {
+ EnsureWebSocketState (WebSocketState.Open, WebSocketState.CloseSent);
+ // First read the two first bytes to know what we are doing next
+ connection.Read (req, headerBuffer, 0, 2);
+ var isLast = (headerBuffer[0] >> 7) > 0;
+ var isMasked = (headerBuffer[1] >> 7) > 0;
+ int mask = 0;
+ var type = (WebSocketMessageType)(headerBuffer[0] & 0xF);
+ long length = headerBuffer[1] & 0x7F;
+ int offset = 0;
+ if (length == 126) {
+ offset = 2;
+ connection.Read (req, headerBuffer, 2, offset);
+ length = (headerBuffer[2] << 8) | headerBuffer[3];
+ } else if (length == 127) {
+ offset = 8;
+ connection.Read (req, headerBuffer, 2, offset);
+ length = 0;
+ for (int i = 2; i <= 9; i++)
+ length = (length << 8) | headerBuffer[i];
+ }
+
+ if (isMasked) {
+ connection.Read (req, headerBuffer, 2 + offset, 4);
+ for (int i = 0; i < 4; i++) {
+ var pos = i + offset + 2;
+ mask = (mask << 8) | headerBuffer[pos];
+ }
+ }
+
+ if (type == WebSocketMessageType.Close) {
+ state = WebSocketState.Closed;
+ var tmpBuffer = new byte[length];
+ connection.Read (req, tmpBuffer, 0, tmpBuffer.Length);
+ var closeStatus = (WebSocketCloseStatus)(tmpBuffer[0] << 8 | tmpBuffer[1]);
+ var closeDesc = tmpBuffer.Length > 2 ? Encoding.UTF8.GetString (tmpBuffer, 2, tmpBuffer.Length - 2) : string.Empty;
+ return new WebSocketReceiveResult ((int)length, type, isLast, closeStatus, closeDesc);
+ } else {
+ var readLength = (int)(buffer.Count < length ? buffer.Count : length);
+ connection.Read (req, buffer.Array, buffer.Offset, readLength);
+
+ return new WebSocketReceiveResult ((int)length, type, isLast);
+ }
+ });
}
- public override Task SendAsync (ArraySegment<byte> buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken)
+
+ // The damn difference between those two methods is that CloseAsync will wait for server acknowledgement before completing
+ // while CloseOutputAsync will send the close packet and simply complete.
+
+ public async override Task CloseAsync (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
{
- throw new NotImplementedException ();
+ EnsureWebSocketConnected ();
+ await SendCloseFrame (closeStatus, statusDescription, cancellationToken).ConfigureAwait (false);
+ state = WebSocketState.CloseSent;
+ // TODO: figure what's exceptions are thrown if the server returns something faulty here
+ await ReceiveAsync (new ArraySegment<byte> (new byte[0]), cancellationToken).ConfigureAwait (false);
+ state = WebSocketState.Closed;
}
- public override void Dispose ()
+
+ public async override Task CloseOutputAsync (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
{
- throw new NotImplementedException ();
+ EnsureWebSocketConnected ();
+ await SendCloseFrame (closeStatus, statusDescription, cancellationToken).ConfigureAwait (false);
+ state = WebSocketState.CloseSent;
}
- public override WebSocketCloseStatus? CloseStatus {
- get {
- throw new NotImplementedException ();
- }
+
+ async Task SendCloseFrame (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
+ {
+ var statusDescBuffer = string.IsNullOrEmpty (statusDescription) ? new byte[2] : new byte[2 + Encoding.UTF8.GetByteCount (statusDescription)];
+ statusDescBuffer[0] = (byte)(((ushort)closeStatus) >> 8);
+ statusDescBuffer[1] = (byte)(((ushort)closeStatus) & 0xFF);
+ if (!string.IsNullOrEmpty (statusDescription))
+ Encoding.UTF8.GetBytes (statusDescription, 0, statusDescription.Length, statusDescBuffer, 2);
+ await SendAsync (new ArraySegment<byte> (statusDescBuffer), WebSocketMessageType.Close, true, cancellationToken).ConfigureAwait (false);
}
- public override string CloseStatusDescription {
- get {
- throw new NotImplementedException ();
+
+ int WriteHeader (WebSocketMessageType type, ArraySegment<byte> buffer, bool endOfMessage)
+ {
+ var opCode = (byte)type;
+ var length = buffer.Count;
+
+ headerBuffer[0] = (byte)(opCode | (endOfMessage ? 0 : 0x80));
+ if (length < 126) {
+ headerBuffer[1] = (byte)length;
+ } else if (length <= ushort.MaxValue) {
+ headerBuffer[1] = (byte)126;
+ headerBuffer[2] = (byte)(length / 256);
+ headerBuffer[3] = (byte)(length % 256);
+ } else {
+ headerBuffer[1] = (byte)127;
+
+ int left = length;
+ int unit = 256;
+
+ for (int i = 9; i > 1; i--) {
+ headerBuffer[i] = (byte)(left % unit);
+ left = left / unit;
+ }
}
+
+ var l = Math.Max (0, headerBuffer[1] - 125);
+ var maskOffset = 2 + l * l * 2;
+ GenerateMask (headerBuffer, maskOffset);
+
+ // Since we are client only, we always mask the payload
+ headerBuffer[1] |= 0x80;
+
+ return maskOffset;
}
- public override WebSocketState State {
- get {
- throw new NotImplementedException ();
- }
+
+ void GenerateMask (byte[] mask, int offset)
+ {
+ mask[offset + 0] = (byte)random.Next (0, 255);
+ mask[offset + 1] = (byte)random.Next (0, 255);
+ mask[offset + 2] = (byte)random.Next (0, 255);
+ mask[offset + 3] = (byte)random.Next (0, 255);
}
- public override string SubProtocol {
- get {
- throw new NotImplementedException ();
- }
+
+ void MaskData (ArraySegment<byte> buffer, int maskOffset)
+ {
+ var sendBufferOffset = maskOffset + 4;
+ for (var i = 0; i < buffer.Count; i++)
+ sendBuffer[i + sendBufferOffset] = (byte)(buffer.Array[buffer.Offset + i] ^ headerBuffer[maskOffset + (i % 4)]);
+ }
+
+ void EnsureWebSocketConnected ()
+ {
+ if (state < WebSocketState.Open)
+ throw new InvalidOperationException ("The WebSocket is not connected");
+ }
+
+ void EnsureWebSocketState (params WebSocketState[] validStates)
+ {
+ foreach (var validState in validStates)
+ if (state == validState)
+ return;
+ throw new WebSocketException ("The WebSocket is in an invalid state ('" + state + "') for this operation. Valid states are: " + string.Join (", ", validStates));
+ }
+
+ void ValidateArraySegment (ArraySegment<byte> segment)
+ {
+ if (segment.Array == null)
+ throw new ArgumentNullException ("buffer.Array");
+ if (segment.Offset < 0)
+ throw new ArgumentOutOfRangeException ("buffer.Offset");
+ if (segment.Offset + segment.Count > segment.Array.Length)
+ throw new ArgumentOutOfRangeException ("buffer.Count");
}
- #endregion
}
}
#endif
-
diff --git a/mcs/class/System/System.Net.WebSockets/ClientWebSocketOptions.cs b/mcs/class/System/System.Net.WebSockets/ClientWebSocketOptions.cs
index a1d617cbadb..586752d7f67 100644
--- a/mcs/class/System/System.Net.WebSockets/ClientWebSocketOptions.cs
+++ b/mcs/class/System/System.Net.WebSockets/ClientWebSocketOptions.cs
@@ -33,11 +33,15 @@ using System.Net;
using System.Security.Principal;
using System.Security.Cryptography.X509Certificates;
using System.Runtime.CompilerServices;
+using System.Collections.Generic;
namespace System.Net.WebSockets
{
public sealed class ClientWebSocketOptions
{
+ List<string> subprotocols = new List<string> ();
+ Dictionary<string, string> customRequestHeaders = new Dictionary<string, string> ();
+
public X509CertificateCollection ClientCertificates { get; set; }
public CookieContainer Cookies { get; set; }
@@ -50,28 +54,53 @@ namespace System.Net.WebSockets
public bool UseDefaultCredentials { get; set; }
- [MonoTODO]
+ internal IList<string> SubProtocols {
+ get {
+ return subprotocols.AsReadOnly ();
+ }
+ }
+
+ internal Dictionary<string, string> CustomRequestHeaders {
+ get {
+ return customRequestHeaders;
+ }
+ }
+
+ internal int ReceiveBufferSize {
+ get;
+ private set;
+ }
+
+ internal ArraySegment<byte> CustomReceiveBuffer {
+ get;
+ private set;
+ }
+
+ internal int SendBufferSize {
+ get;
+ private set;
+ }
+
public void AddSubProtocol (string subProtocol)
{
- throw new NotImplementedException ();
+ subprotocols.Add (subProtocol);
}
- [MonoTODO]
public void SetBuffer (int receiveBufferSize, int sendBufferSize)
{
- throw new NotImplementedException ();
+ SetBuffer (receiveBufferSize, sendBufferSize, new ArraySegment<byte> ());
}
- [MonoTODO]
public void SetBuffer (int receiveBufferSize, int sendBufferSize, ArraySegment<byte> buffer)
{
- throw new NotImplementedException ();
+ ReceiveBufferSize = receiveBufferSize;
+ SendBufferSize = sendBufferSize;
+ CustomReceiveBuffer = buffer;
}
- [MonoTODO]
public void SetRequestHeader (string headerName, string headerValue)
{
- throw new NotImplementedException ();
+ customRequestHeaders[headerName] = headerValue;
}
}
}
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketException.cs b/mcs/class/System/System.Net.WebSockets/WebSocketException.cs
index b4980174f6b..e617ab38b0b 100644
--- a/mcs/class/System/System.Net.WebSockets/WebSocketException.cs
+++ b/mcs/class/System/System.Net.WebSockets/WebSocketException.cs
@@ -36,72 +36,68 @@ namespace System.Net.WebSockets
{
public sealed class WebSocketException : Win32Exception
{
- public WebSocketException ()
+ const string DefaultMessage = "Generic WebSocket exception";
+
+ public WebSocketException () : this (WebSocketError.Success, -1, DefaultMessage, null)
{
}
- public WebSocketException (int nativeError) : base (nativeError)
+ public WebSocketException (int nativeError) : this (WebSocketError.Success, nativeError, DefaultMessage, null)
{
}
- public WebSocketException (string message) : base (message)
+ public WebSocketException (string message) : this (WebSocketError.Success, -1, message, null)
{
}
- public WebSocketException (WebSocketError error)
+ public WebSocketException (WebSocketError error) : this (error, -1, DefaultMessage, null)
{
- WebSocketErrorCode = error;
}
- public WebSocketException (int nativeError, Exception innerException)
+ public WebSocketException (int nativeError, Exception innerException) : this (WebSocketError.Success, nativeError, DefaultMessage, innerException)
{
}
- public WebSocketException (int nativeError, string message) : base (nativeError, message)
+ public WebSocketException (int nativeError, string message) : this (WebSocketError.Success, nativeError, message, null)
{
}
- public WebSocketException (string message, Exception innerException) : base (message, innerException)
+ public WebSocketException (string message, Exception innerException) : this (WebSocketError.Success, -1, message, innerException)
{
}
- public WebSocketException (WebSocketError error, Exception innerException)
+ public WebSocketException (WebSocketError error, Exception innerException) : this (error, -1, DefaultMessage, innerException)
{
- WebSocketErrorCode = error;
+
}
- public WebSocketException (WebSocketError error, int nativeError) : base (nativeError)
+ public WebSocketException (WebSocketError error, int nativeError) : this (error, nativeError, DefaultMessage, null)
{
- WebSocketErrorCode = error;
}
- public WebSocketException (WebSocketError error, string message) : base (message)
+ public WebSocketException (WebSocketError error, string message) : this (error, -1, message, null)
{
- WebSocketErrorCode = error;
}
- public WebSocketException (WebSocketError error, int nativeError, Exception innerException) : base (nativeError)
+ public WebSocketException (WebSocketError error, int nativeError, Exception innerException) : this (error, nativeError, DefaultMessage, innerException)
{
- WebSocketErrorCode = error;
}
- public WebSocketException (WebSocketError error, int nativeError, string message) : base (nativeError, message)
+ public WebSocketException (WebSocketError error, int nativeError, string message) : this (error, nativeError, message, null)
{
- WebSocketErrorCode = error;
}
- public WebSocketException (WebSocketError error, string message, Exception innerException)
+ public WebSocketException (WebSocketError error, string message, Exception innerException) : this (error, -1, message, innerException)
{
- WebSocketErrorCode = error;
}
- public WebSocketException (WebSocketError error, int nativeError, string message, Exception innerException) : base (nativeError, message)
+ public WebSocketException (WebSocketError error, int nativeError, string message, Exception innerException) : base (message, innerException)
{
WebSocketErrorCode = error;
}
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs b/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs
index 18e2d9ecbe8..50cbc003c0f 100644
--- a/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs
+++ b/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs
@@ -35,9 +35,9 @@ namespace System.Net.WebSockets
{
public enum WebSocketMessageType
{
- Text,
- Binary,
- Close
+ Text = 1,
+ Binary = 2,
+ Close = 8
}
}
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketReceiveResult.cs b/mcs/class/System/System.Net.WebSockets/WebSocketReceiveResult.cs
index e237344e466..af97ebcdca9 100644
--- a/mcs/class/System/System.Net.WebSockets/WebSocketReceiveResult.cs
+++ b/mcs/class/System/System.Net.WebSockets/WebSocketReceiveResult.cs
@@ -36,20 +36,22 @@ namespace System.Net.WebSockets
{
public class WebSocketReceiveResult
{
- [MonoTODO]
public WebSocketReceiveResult (int count, WebSocketMessageType messageType, bool endOfMessage)
+ : this (count, messageType, endOfMessage, null, null)
{
- throw new NotImplementedException ();
}
- [MonoTODO]
public WebSocketReceiveResult (int count,
WebSocketMessageType messageType,
bool endOfMessage,
WebSocketCloseStatus? closeStatus,
string closeStatusDescription)
{
- throw new NotImplementedException ();
+ MessageType = messageType;
+ CloseStatus = closeStatus;
+ CloseStatusDescription = closeStatusDescription;
+ Count = count;
+ EndOfMessage = endOfMessage;
}
public WebSocketCloseStatus? CloseStatus {
diff --git a/mcs/class/System/System.Net/FtpWebRequest.cs b/mcs/class/System/System.Net/FtpWebRequest.cs
index edb0441b723..3354b2a8097 100644
--- a/mcs/class/System/System.Net/FtpWebRequest.cs
+++ b/mcs/class/System/System.Net/FtpWebRequest.cs
@@ -549,7 +549,12 @@ namespace System.Net
if (local_path [0] == '/')
local_path = local_path.Substring (1);
- Uri initial = new Uri ("ftp://dummy-host" + initial_path);
+ UriBuilder initialBuilder = new UriBuilder () {
+ Scheme = "ftp",
+ Host = "dummy-host",
+ Path = initial_path,
+ };
+ Uri initial = initialBuilder.Uri;
result = new Uri (initial, local_path).LocalPath;
}
diff --git a/mcs/class/System/System.Net/HttpStatusCode.cs b/mcs/class/System/System.Net/HttpStatusCode.cs
index f6b72e03253..fcc3e26d701 100644
--- a/mcs/class/System/System.Net/HttpStatusCode.cs
+++ b/mcs/class/System/System.Net/HttpStatusCode.cs
@@ -73,6 +73,9 @@ namespace System.Net {
UnsupportedMediaType = 415,
RequestedRangeNotSatisfiable = 416,
ExpectationFailed = 417,
+#if NET_4_5
+ UpgradeRequired = 426,
+#endif
InternalServerError = 500,
NotImplemented = 501,
BadGateway = 502,
diff --git a/mcs/class/System/System.Net/HttpWebRequest.cs b/mcs/class/System/System.Net/HttpWebRequest.cs
index 84d59f68025..c3c4772b5aa 100644
--- a/mcs/class/System/System.Net/HttpWebRequest.cs
+++ b/mcs/class/System/System.Net/HttpWebRequest.cs
@@ -1163,7 +1163,9 @@ namespace System.Net
bool spoint10 = (proto_version == null || proto_version == HttpVersion.Version10);
if (keepAlive && (version == HttpVersion.Version10 || spoint10)) {
- webHeaders.RemoveAndAdd (connectionHeader, "keep-alive");
+ if (webHeaders[connectionHeader] == null
+ || webHeaders[connectionHeader].IndexOf ("keep-alive", StringComparison.OrdinalIgnoreCase) == -1)
+ webHeaders.RemoveAndAdd (connectionHeader, "keep-alive");
} else if (!keepAlive && version == HttpVersion.Version11) {
webHeaders.RemoveAndAdd (connectionHeader, "close");
}
@@ -1605,6 +1607,13 @@ namespace System.Net
throw throwMe;
}
+
+ internal bool ReuseConnection {
+ get;
+ set;
+ }
+
+ internal WebConnection StoredConnection;
}
}
diff --git a/mcs/class/System/System.Net/HttpWebResponse.cs b/mcs/class/System/System.Net/HttpWebResponse.cs
index 0cb3cd8c852..2b756a97bd1 100644
--- a/mcs/class/System/System.Net/HttpWebResponse.cs
+++ b/mcs/class/System/System.Net/HttpWebResponse.cs
@@ -277,7 +277,7 @@ namespace System.Net
CheckDisposed ();
if (stream == null)
return Stream.Null;
- if (0 == String.Compare (method, "HEAD", true)) // see par 4.3 & 9.4
+ if (string.Equals (method, "HEAD", StringComparison.OrdinalIgnoreCase)) // see par 4.3 & 9.4
return Stream.Null;
return stream;
@@ -319,7 +319,6 @@ namespace System.Net
void IDisposable.Dispose ()
{
Dispose (true);
- GC.SuppressFinalize (this);
}
#if NET_4_0
diff --git a/mcs/class/System/System.Net/ListenerAsyncResult.cs b/mcs/class/System/System.Net/ListenerAsyncResult.cs
index 1738ce07ee1..88f75e88a99 100644
--- a/mcs/class/System/System.Net/ListenerAsyncResult.cs
+++ b/mcs/class/System/System.Net/ListenerAsyncResult.cs
@@ -117,6 +117,8 @@ namespace System.Net {
}
} else {
completed = true;
+ this.synch = false;
+
if (handle != null)
handle.Set ();
diff --git a/mcs/class/System/System.Net/MacProxy.cs b/mcs/class/System/System.Net/MacProxy.cs
index a21cf97c658..b6300b9428e 100644
--- a/mcs/class/System/System.Net/MacProxy.cs
+++ b/mcs/class/System/System.Net/MacProxy.cs
@@ -607,12 +607,13 @@ namespace System.Net
#endif
[DllImport (CFNetworkLibrary)]
- // CFArrayRef CFNetworkCopyProxiesForAutoConfigurationScript (CFStringRef proxyAutoConfigurationScript, CFURLRef targetURL);
- extern static IntPtr CFNetworkCopyProxiesForAutoConfigurationScript (IntPtr proxyAutoConfigurationScript, IntPtr targetURL);
+ // CFArrayRef CFNetworkCopyProxiesForAutoConfigurationScript (CFStringRef proxyAutoConfigurationScript, CFURLRef targetURL, CFErrorRef* error);
+ extern static IntPtr CFNetworkCopyProxiesForAutoConfigurationScript (IntPtr proxyAutoConfigurationScript, IntPtr targetURL, out IntPtr error);
static CFArray CopyProxiesForAutoConfigurationScript (IntPtr proxyAutoConfigurationScript, CFUrl targetURL)
{
- IntPtr native = CFNetworkCopyProxiesForAutoConfigurationScript (proxyAutoConfigurationScript, targetURL.Handle);
+ IntPtr err = IntPtr.Zero;
+ IntPtr native = CFNetworkCopyProxiesForAutoConfigurationScript (proxyAutoConfigurationScript, targetURL.Handle, out err);
if (native == IntPtr.Zero)
return null;
diff --git a/mcs/class/System/System.Net/WebConnection.cs b/mcs/class/System/System.Net/WebConnection.cs
index 7f09859cb5e..2033fe9b79f 100644
--- a/mcs/class/System/System.Net/WebConnection.cs
+++ b/mcs/class/System/System.Net/WebConnection.cs
@@ -62,7 +62,7 @@ namespace System.Net
{
ServicePoint sPoint;
Stream nstream;
- Socket socket;
+ internal Socket socket;
object socketLock = new object ();
WebExceptionStatus status;
WaitCallback initConn;
@@ -750,6 +750,8 @@ namespace System.Net
{
HttpWebRequest request = (HttpWebRequest) state;
request.WebConnection = this;
+ if (request.ReuseConnection)
+ request.StoredConnection = this;
if (request.Aborted)
return;
@@ -1164,10 +1166,10 @@ namespace System.Net
// if SSL is in use then check for TrustFailure
if (ssl) {
#if SECURITY_DEP && MONOTOUCH
- HttpsClientStream https = (nstream as HttpsClientStream);
+ HttpsClientStream https = (s as HttpsClientStream);
if (https.TrustFailure) {
#else
- if ((bool) piTrustFailure.GetValue (nstream, null)) {
+ if ((bool) piTrustFailure.GetValue (s , null)) {
#endif
wes = WebExceptionStatus.TrustFailure;
msg = "Trust failure";
@@ -1183,6 +1185,11 @@ namespace System.Net
internal void Close (bool sendNext)
{
lock (this) {
+ if (Data != null && Data.request != null && Data.request.ReuseConnection) {
+ Data.request.ReuseConnection = false;
+ return;
+ }
+
if (nstream != null) {
try {
nstream.Close ();
diff --git a/mcs/class/System/System.Net/WebRequest.cs b/mcs/class/System/System.Net/WebRequest.cs
index 5b0cd421c1d..987b7cc1094 100644
--- a/mcs/class/System/System.Net/WebRequest.cs
+++ b/mcs/class/System/System.Net/WebRequest.cs
@@ -58,24 +58,17 @@ namespace System.Net
static HybridDictionary prefixes = new HybridDictionary ();
static bool isDefaultWebProxySet;
static IWebProxy defaultWebProxy;
-
-#if !NET_2_1
static RequestCachePolicy defaultCachePolicy;
-#endif
- // Constructors
-
+
static WebRequest ()
{
-#if NET_2_1
+#if MOBILE
IWebRequestCreate http = new HttpRequestCreator ();
RegisterPrefix ("http", http);
RegisterPrefix ("https", http);
- #if MOBILE
RegisterPrefix ("file", new FileWebRequestCreator ());
RegisterPrefix ("ftp", new FtpRequestCreator ());
- #endif
#else
- defaultCachePolicy = new HttpRequestCachePolicy (HttpRequestCacheLevel.NoCacheNoStore);
#if CONFIGURATION_DEP
object cfg = ConfigurationManager.GetSection ("system.net/webRequestModules");
WebRequestModulesSection s = cfg as WebRequestModulesSection;
@@ -137,7 +130,6 @@ namespace System.Net
set { throw GetMustImplement (); }
}
-#if !NET_2_1
[MonoTODO ("Implement the caching system. Currently always returns a policy with the NoCacheNoStore level")]
public virtual RequestCachePolicy CachePolicy
{
@@ -146,14 +138,14 @@ namespace System.Net
}
}
- public static RequestCachePolicy DefaultCachePolicy
- {
- get { return defaultCachePolicy; }
+ public static RequestCachePolicy DefaultCachePolicy {
+ get {
+ return defaultCachePolicy ?? (defaultCachePolicy = new HttpRequestCachePolicy (HttpRequestCacheLevel.NoCacheNoStore));
+ }
set {
throw GetMustImplement ();
}
}
-#endif
public virtual WebHeaderCollection Headers {
get { throw GetMustImplement (); }
@@ -335,6 +327,12 @@ namespace System.Net
#if MONOTOUCH
return CFNetwork.GetDefaultProxy ();
#else
+#if MONODROID
+ // Return the system web proxy. This only works for ICS+.
+ var androidProxy = AndroidPlatform.GetDefaultProxy ();
+ if (androidProxy != null)
+ return androidProxy;
+#endif
#if !NET_2_1
if (IsWindows ()) {
int iProxyEnable = (int)Microsoft.Win32.Registry.GetValue ("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", "ProxyEnable", 0);
diff --git a/mcs/class/System/System.Text.RegularExpressions/Regex.cs b/mcs/class/System/System.Text.RegularExpressions/Regex.cs
index f8c7de81348..9307a632bce 100644
--- a/mcs/class/System/System.Text.RegularExpressions/Regex.cs
+++ b/mcs/class/System/System.Text.RegularExpressions/Regex.cs
@@ -272,6 +272,8 @@ namespace System.Text.RegularExpressions {
{
return Split (input, pattern, options);
}
+
+ public static readonly TimeSpan InfiniteMatchTimeout = TimeSpan.FromMilliseconds (-1);
#endif
static void validate_options (RegexOptions options)
diff --git a/mcs/class/System/System/AndroidPlatform.cs b/mcs/class/System/System/AndroidPlatform.cs
index bcc30bd186c..338a92b6396 100644
--- a/mcs/class/System/System/AndroidPlatform.cs
+++ b/mcs/class/System/System/AndroidPlatform.cs
@@ -31,6 +31,7 @@ extern alias MonoSecurity;
#if MONODROID
using System;
+using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
#if SECURITY_DEP
@@ -45,12 +46,13 @@ namespace System {
static readonly Converter<MSX.X509CertificateCollection, bool> trustEvaluateSsl;
static readonly Func<MSX.X509CertificateCollection, object, X509Certificate2, X509Chain, SslPolicyErrors, bool> trustEvaluateSsl2;
#endif // SECURITY_DEP
+ static readonly Func<IWebProxy> getDefaultProxy;
static AndroidPlatform ()
{
-#if SECURITY_DEP
var t = Type.GetType ("Android.Runtime.AndroidEnvironment, Mono.Android", throwOnError:true);
+#if SECURITY_DEP
trustEvaluateSsl2 = (Func<MSX.X509CertificateCollection, object, X509Certificate2, X509Chain, SslPolicyErrors, bool>)
Delegate.CreateDelegate (
typeof (Func<MSX.X509CertificateCollection, object, X509Certificate2, X509Chain, SslPolicyErrors, bool>),
@@ -66,6 +68,10 @@ namespace System {
ignoreCase:false,
throwOnBindFailure:true);
#endif // SECURITY_DEP
+ getDefaultProxy = (Func<IWebProxy>)Delegate.CreateDelegate (
+ typeof (Func<IWebProxy>), t, "GetDefaultProxy",
+ ignoreCase:false,
+ throwOnBindFailure:true);
}
#if SECURITY_DEP
@@ -76,6 +82,11 @@ namespace System {
return trustEvaluateSsl (collection);
}
#endif // SECURITY_DEP
+
+ internal static IWebProxy GetDefaultProxy ()
+ {
+ return getDefaultProxy ();
+ }
}
}
#endif // MONODROID
diff --git a/mcs/class/System/System/UriComponents.cs b/mcs/class/System/System/UriComponents.cs
index 03a8553dba6..b20e6dcab2e 100644
--- a/mcs/class/System/System/UriComponents.cs
+++ b/mcs/class/System/System/UriComponents.cs
@@ -39,6 +39,9 @@ namespace System {
Query = 32,
Fragment = 64,
StrongPort = 128,
+#if NET_4_5
+ NormalizedHost = 256,
+#endif
KeepDelimiter = 0x40000000,
HostAndPort = Host | StrongPort,
diff --git a/mcs/class/System/System_test.dll.sources b/mcs/class/System/System_test.dll.sources
index a306d52be40..33f8326b2d6 100644
--- a/mcs/class/System/System_test.dll.sources
+++ b/mcs/class/System/System_test.dll.sources
@@ -499,3 +499,4 @@ System.Collections.Concurrent/BlockingCollectionTests.cs
System.Collections.Concurrent/ConcurrentBagTests.cs
System.Collections.Concurrent/CollectionStressTestHelper.cs
System.Collections.Concurrent/ParallelTestHelper.cs
+System.Net.WebSockets/ClientWebSocketTest.cs
diff --git a/mcs/class/System/Test/Microsoft.CSharp/CSharpCodeProviderTest.cs b/mcs/class/System/Test/Microsoft.CSharp/CSharpCodeProviderTest.cs
index f34bcca6d6a..fe60d4e5a86 100644
--- a/mcs/class/System/Test/Microsoft.CSharp/CSharpCodeProviderTest.cs
+++ b/mcs/class/System/Test/Microsoft.CSharp/CSharpCodeProviderTest.cs
@@ -360,6 +360,49 @@ namespace MonoTests.Microsoft.CSharp
}
[Test]
+ public void CompileFromSource_InMemory_Twice ()
+ {
+ CompilerParameters options = new CompilerParameters ();
+ options.GenerateExecutable = false;
+ options.GenerateInMemory = true;
+
+ ICodeCompiler compiler = _codeProvider.CreateCompiler ();
+
+ var src_1 = "class X { ";
+
+ CompilerResults results_1 = compiler.CompileAssemblyFromSource (options, src_1);
+ var output_1 = options.OutputAssembly;
+
+ var src_2 = "class X { }";
+
+ CompilerResults results_2 = compiler.CompileAssemblyFromSource (options, src_2);
+ var output_2 = options.OutputAssembly;
+
+ // verify compilation was successful
+ AssertCompileResults (results_2, true);
+
+ Assert.AreEqual (output_1, output_2, "#1");
+ }
+
+
+ [Test]
+ public void CompileFromSource_InMemory_With_Extra_Delete ()
+ {
+ CompilerParameters options = new CompilerParameters ();
+ options.GenerateExecutable = false;
+ options.GenerateInMemory = true;
+
+ ICodeCompiler compiler = _codeProvider.CreateCompiler ();
+
+ var src_1 = "class X { ";
+
+ compiler.CompileAssemblyFromSource (options, src_1);
+
+ options.TempFiles.Delete ();
+ options.TempFiles.Delete ();
+ }
+
+ [Test]
public void CompileFromSourceBatch_InMemory ()
{
// create a file in temp directory to ensure that compiler is not removing
diff --git a/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromCompileUnitTest.cs b/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromCompileUnitTest.cs
index c9eea9c165b..02e3dc71c0e 100644
--- a/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromCompileUnitTest.cs
+++ b/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromCompileUnitTest.cs
@@ -181,24 +181,45 @@ namespace MonoTests.Microsoft.CSharp
[Test]
public void AttributeAndGlobalNamespaceWithImportTest ()
{
- var import = new CodeNamespaceImport ("Z");
- AddGlobalNamespaceWithImport (codeUnit, import);
- AddAssemblyAttribute (codeUnit, "A");
-
- Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
- "using Z;{0}{0}[assembly: A()]{0}{0}", NewLine), Generate ());
- }
-
- private static void AddGlobalNamespaceWithImport (CodeCompileUnit codeUnit, CodeNamespaceImport import) {
CodeNamespace ns = new CodeNamespace ();
- ns.Imports.Add (import);
+ ns.Imports.Add (new CodeNamespaceImport ("Z"));
+ ns.Imports.Add (new CodeNamespaceImport ("A"));
codeUnit.Namespaces.Add (ns);
- }
- private static void AddAssemblyAttribute (CodeCompileUnit codeUnit, string attributeName) {
CodeAttributeDeclaration attrDec = new CodeAttributeDeclaration ();
- attrDec.Name = attributeName;
+ attrDec.Name = "A";
codeUnit.AssemblyCustomAttributes.Add (attrDec);
+
+ Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+ "using A;{0}using Z;{0}{0}[assembly: A()]{0}{0}{0}", NewLine), Generate ());
+ }
+
+ [Test]
+ public void GlobalAttributeBeforeType ()
+ {
+ StringWriter writer = new StringWriter ();
+ writer.NewLine = NewLine;
+
+ codeUnit = new CodeCompileUnit () {
+ AssemblyCustomAttributes = {
+ new CodeAttributeDeclaration (
+ new CodeTypeReference (typeof (CLSCompliantAttribute)),
+ new CodeAttributeArgument (new CodePrimitiveExpression (false))),
+ },
+ Namespaces = {
+ new CodeNamespace () {
+ Types = {
+ new CodeTypeDeclaration ("Resources"),
+ },
+ }
+ },
+ };
+
+ generator.GenerateCodeFromCompileUnit (codeUnit, writer, options);
+ writer.Close ();
+
+ Assert.AreEqual (string.Format (CultureInfo.InvariantCulture,
+ "[assembly: System.CLSCompliantAttribute(false)]{0}{0}{0}{0}public class Resources {{{0}}}{0}", NewLine), Generate ());
}
}
}
diff --git a/mcs/class/System/Test/System.Collections.Concurrent/BlockingCollectionTests.cs b/mcs/class/System/Test/System.Collections.Concurrent/BlockingCollectionTests.cs
index 0098e2de927..9f0e9b0190d 100644
--- a/mcs/class/System/Test/System.Collections.Concurrent/BlockingCollectionTests.cs
+++ b/mcs/class/System/Test/System.Collections.Concurrent/BlockingCollectionTests.cs
@@ -27,6 +27,7 @@ using System;
using System.Threading;
using System.Collections.Concurrent;
using System.Collections.Generic;
+using System.Threading.Tasks;
using NUnit.Framework;
@@ -192,6 +193,60 @@ namespace MonoTests.System.Collections.Concurrent
Assert.IsNull (o);
Assert.IsFalse (success);
}
+
+ [Test]
+ public void TakeAnyFromSecondCollection ()
+ {
+ var a = new BlockingCollection<string> ();
+ var b = new BlockingCollection<string> ();
+ var arr = new [] { a, b };
+ string res = null;
+
+ Task<int> t = Task.Factory.StartNew (() => BlockingCollection<string>.TakeFromAny (arr, out res));
+ a.Add ("foo");
+ Assert.AreEqual (0, t.Result, "#1");
+ Assert.AreEqual ("foo", res, "#2");
+
+ t = Task.Factory.StartNew (() => BlockingCollection<string>.TakeFromAny (arr, out res));
+ b.Add ("bar");
+ Assert.AreEqual (1, t.Result, "#3");
+ Assert.AreEqual ("bar", res, "#4");
+ }
+
+ [Test]
+ public void TakeAnyCancellable ()
+ {
+ var a = new BlockingCollection<string> ();
+ var b = new BlockingCollection<string> ();
+ var arr = new [] { a, b };
+ var cts = new CancellationTokenSource ();
+ string res = null;
+
+ Task<int> t = Task.Factory.StartNew (() => BlockingCollection<string>.TakeFromAny (arr, out res, cts.Token));
+ Thread.Sleep (100);
+ a.Add ("foo");
+ Assert.AreEqual (0, t.Result, "#1");
+ Assert.AreEqual ("foo", res, "#2");
+
+ t = Task.Factory.StartNew (() => BlockingCollection<string>.TakeFromAny (arr, out res, cts.Token));
+ Thread.Sleep (100);
+ b.Add ("bar");
+ Assert.AreEqual (1, t.Result, "#3");
+ Assert.AreEqual ("bar", res, "#4");
+
+ t = Task.Factory.StartNew (() => {
+ try {
+ return BlockingCollection<string>.TakeFromAny (arr, out res, cts.Token);
+ } catch (OperationCanceledException WE_GOT_CANCELED) {
+ res = "canceled";
+ return -10;
+ }
+ });
+
+ cts.Cancel ();
+ Assert.AreEqual (-10, t.Result, "#5");
+ Assert.AreEqual ("canceled", res, "#6");
+ }
}
}
#endif
diff --git a/mcs/class/System/Test/System.IO.Compression/GzipStreamTest.cs b/mcs/class/System/Test/System.IO.Compression/GzipStreamTest.cs
index 6193222fe88..d59d607e59d 100644
--- a/mcs/class/System/Test/System.IO.Compression/GzipStreamTest.cs
+++ b/mcs/class/System/Test/System.IO.Compression/GzipStreamTest.cs
@@ -8,8 +8,6 @@
// (C) 2004 Novell, Inc. <http://www.novell.com>
//
-#if NET_2_0
-
using NUnit.Framework;
using System;
using System.IO;
@@ -277,6 +275,22 @@ namespace MonoTests.System.IO.Compression
decompress.Dispose ();
}
+ [Test]
+ public void DisposeOrderTest ()
+ {
+ var fs = new MemoryStream();
+ GZipStream compressed = new GZipStream(fs, CompressionMode.Compress);
+ byte[] buffer = new byte[1024];
+ compressed.Write(buffer, 0, buffer.Length);
+ compressed.Close();
+
+ try {
+ fs.WriteByte(2);
+ Assert.Fail ();
+ } catch (ObjectDisposedException) {
+ }
+ }
+
static byte [] compressed_data = {
0x1f, 0x8b, 0x08, 0x08, 0x70, 0xbb, 0x5d, 0x41, 0x00,
0x03, 0x74, 0x65, 0x73, 0x74, 0x00, 0xf3, 0x48, 0xcd,
@@ -285,4 +299,3 @@ namespace MonoTests.System.IO.Compression
}
}
-#endif
diff --git a/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs b/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs
index 6fa403c6075..710b4982c11 100644
--- a/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs
+++ b/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs
@@ -1051,16 +1051,21 @@ namespace MonoTests.System.Net.Sockets {
[Test]
public void Available ()
{
- UdpClient client = new UdpClient (1238);
- IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 1238);
- byte[] bytes = new byte[] {10, 11, 12, 13};
-
- client.Send (bytes, bytes.Length, ep);
- int avail = client.Available;
-
- Assert.AreEqual (bytes.Length, avail, "Available #1");
+ using (UdpClient client = new UdpClient (1238)) {
+ IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 1238);
+ byte[] bytes = new byte[] {10, 11, 12, 13};
+
+ int res = client.Send (bytes, bytes.Length, ep);
+ Assert.AreEqual (bytes.Length, res, "Send");
+
+ // that might happen too quickly, data sent and not yet received/available
+ Thread.Sleep (100);
+ int avail = client.Available;
+
+ Assert.AreEqual (bytes.Length, avail, "Available #1");
- client.Close ();
+ client.Close ();
+ }
}
[Test]
diff --git a/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs b/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs
new file mode 100644
index 00000000000..3666003a3fd
--- /dev/null
+++ b/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs
@@ -0,0 +1,242 @@
+#if NET_4_5 && !MOBILE
+using System;
+using System.Net;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using System.Net.WebSockets;
+using System.Reflection;
+using System.Text;
+
+using NUnit.Framework;
+
+
+namespace MonoTests.System.Net.WebSockets
+{
+ [TestFixture]
+ public class ClientWebSocketTest
+ {
+ const string EchoServerUrl = "ws://echo.websocket.org";
+ const int Port = 42123;
+ HttpListener listener;
+ ClientWebSocket socket;
+ MethodInfo headerSetMethod;
+
+ [SetUp]
+ public void Setup ()
+ {
+ listener = new HttpListener ();
+ listener.Prefixes.Add ("http://localhost:" + Port + "/");
+ listener.Start ();
+ socket = new ClientWebSocket ();
+ }
+
+ [TearDown]
+ public void Teardown ()
+ {
+ if (listener != null) {
+ listener.Stop ();
+ listener = null;
+ }
+ if (socket != null) {
+ if (socket.State == WebSocketState.Open)
+ socket.CloseAsync (WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None).Wait ();
+ socket.Dispose ();
+ socket = null;
+ }
+ }
+
+ [Test]
+ public void ServerHandshakeReturnCrapStatusCodeTest ()
+ {
+ HandleHttpRequestAsync ((req, resp) => resp.StatusCode = 418);
+ try {
+ socket.ConnectAsync (new Uri ("ws://localhost:" + Port), CancellationToken.None).Wait ();
+ } catch (AggregateException e) {
+ AssertWebSocketException (e, WebSocketError.Success, typeof (WebException));
+ return;
+ }
+ Assert.Fail ("Should have thrown");
+ }
+
+ [Test]
+ public void ServerHandshakeReturnWrongUpgradeHeader ()
+ {
+ HandleHttpRequestAsync ((req, resp) => {
+ resp.StatusCode = 101;
+ resp.Headers["Upgrade"] = "gtfo";
+ });
+ try {
+ socket.ConnectAsync (new Uri ("ws://localhost:" + Port), CancellationToken.None).Wait ();
+ } catch (AggregateException e) {
+ AssertWebSocketException (e, WebSocketError.Success);
+ return;
+ }
+ Assert.Fail ("Should have thrown");
+ }
+
+ [Test]
+ public void ServerHandshakeReturnWrongConnectionHeader ()
+ {
+ HandleHttpRequestAsync ((req, resp) => {
+ resp.StatusCode = 101;
+ resp.Headers["Upgrade"] = "websocket";
+ // Mono http request doesn't like the forcing, test still valid since the default connection header value is empty
+ //ForceSetHeader (resp.Headers, "Connection", "Foo");
+ });
+ try {
+ socket.ConnectAsync (new Uri ("ws://localhost:" + Port), CancellationToken.None).Wait ();
+ } catch (AggregateException e) {
+ AssertWebSocketException (e, WebSocketError.Success);
+ return;
+ }
+ Assert.Fail ("Should have thrown");
+ }
+
+ [Test]
+ public void EchoTest ()
+ {
+ const string Payload = "This is a websocket test";
+
+ Assert.AreEqual (WebSocketState.None, socket.State);
+ socket.ConnectAsync (new Uri (EchoServerUrl), CancellationToken.None).Wait ();
+ Assert.AreEqual (WebSocketState.Open, socket.State);
+
+ var sendBuffer = Encoding.ASCII.GetBytes (Payload);
+ socket.SendAsync (new ArraySegment<byte> (sendBuffer), WebSocketMessageType.Text, true, CancellationToken.None).Wait ();
+
+ var receiveBuffer = new byte[Payload.Length];
+ var resp = socket.ReceiveAsync (new ArraySegment<byte> (receiveBuffer), CancellationToken.None).Result;
+
+ Assert.AreEqual (Payload.Length, resp.Count);
+ Assert.IsTrue (resp.EndOfMessage);
+ Assert.AreEqual (WebSocketMessageType.Text, resp.MessageType);
+ Assert.AreEqual (Payload, Encoding.ASCII.GetString (receiveBuffer, 0, resp.Count));
+
+ socket.CloseAsync (WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None).Wait ();
+ Assert.AreEqual (WebSocketState.Closed, socket.State);
+ }
+
+ [Test]
+ public void CloseOutputAsyncTest ()
+ {
+ socket.ConnectAsync (new Uri (EchoServerUrl), CancellationToken.None).Wait ();
+ Assert.AreEqual (WebSocketState.Open, socket.State);
+
+ socket.CloseOutputAsync (WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None).Wait ();
+ Assert.AreEqual (WebSocketState.CloseSent, socket.State);
+
+ var resp = socket.ReceiveAsync (new ArraySegment<byte> (new byte[0]), CancellationToken.None).Result;
+ Assert.AreEqual (WebSocketState.Closed, socket.State);
+ Assert.AreEqual (WebSocketMessageType.Close, resp.MessageType);
+ Assert.AreEqual (WebSocketCloseStatus.NormalClosure, resp.CloseStatus);
+ Assert.AreEqual (string.Empty, resp.CloseStatusDescription);
+ }
+
+ [Test]
+ public void CloseAsyncTest ()
+ {
+ socket.ConnectAsync (new Uri (EchoServerUrl), CancellationToken.None).Wait ();
+ Assert.AreEqual (WebSocketState.Open, socket.State);
+
+ socket.CloseAsync (WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None).Wait ();
+ Assert.AreEqual (WebSocketState.Closed, socket.State);
+ }
+
+ [Test, ExpectedException (typeof (InvalidOperationException))]
+ public void SendAsyncArgTest_NotConnected ()
+ {
+ socket.SendAsync (new ArraySegment<byte> (new byte[0]), WebSocketMessageType.Text, true, CancellationToken.None);
+ }
+
+ [Test, ExpectedException (typeof (ArgumentNullException))]
+ public void SendAsyncArgTest_NoArray ()
+ {
+ socket.ConnectAsync (new Uri (EchoServerUrl), CancellationToken.None).Wait ();
+ socket.SendAsync (new ArraySegment<byte> (), WebSocketMessageType.Text, true, CancellationToken.None);
+ }
+
+ [Test, ExpectedException (typeof (InvalidOperationException))]
+ public void ReceiveAsyncArgTest_NotConnected ()
+ {
+ socket.ReceiveAsync (new ArraySegment<byte> (new byte[0]), CancellationToken.None);
+ }
+
+ [Test, ExpectedException (typeof (ArgumentNullException))]
+ public void ReceiveAsyncArgTest_NoArray ()
+ {
+ socket.ConnectAsync (new Uri (EchoServerUrl), CancellationToken.None).Wait ();
+ socket.ReceiveAsync (new ArraySegment<byte> (), CancellationToken.None);
+ }
+
+ [Test]
+ public void ReceiveAsyncWrongState_Closed ()
+ {
+ try {
+ socket.ConnectAsync (new Uri (EchoServerUrl), CancellationToken.None).Wait ();
+ socket.CloseAsync (WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None).Wait ();
+ socket.ReceiveAsync (new ArraySegment<byte> (new byte[0]), CancellationToken.None).Wait ();
+ } catch (AggregateException e) {
+ AssertWebSocketException (e, WebSocketError.Success);
+ return;
+ }
+ Assert.Fail ("Should have thrown");
+ }
+
+ [Test]
+ public void SendAsyncWrongState_Closed ()
+ {
+ try {
+ socket.ConnectAsync (new Uri (EchoServerUrl), CancellationToken.None).Wait ();
+ socket.CloseAsync (WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None).Wait ();
+ socket.SendAsync (new ArraySegment<byte> (new byte[0]), WebSocketMessageType.Text, true, CancellationToken.None).Wait ();
+ } catch (AggregateException e) {
+ AssertWebSocketException (e, WebSocketError.Success);
+ return;
+ }
+ Assert.Fail ("Should have thrown");
+ }
+
+ [Test]
+ public void SendAsyncWrongState_CloseSent ()
+ {
+ try {
+ socket.ConnectAsync (new Uri (EchoServerUrl), CancellationToken.None).Wait ();
+ socket.CloseOutputAsync (WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None).Wait ();
+ socket.SendAsync (new ArraySegment<byte> (new byte[0]), WebSocketMessageType.Text, true, CancellationToken.None).Wait ();
+ } catch (AggregateException e) {
+ AssertWebSocketException (e, WebSocketError.Success);
+ return;
+ }
+ Assert.Fail ("Should have thrown");
+ }
+
+ async Task HandleHttpRequestAsync (Action<HttpListenerRequest, HttpListenerResponse> handler)
+ {
+ var ctx = await listener.GetContextAsync ();
+ handler (ctx.Request, ctx.Response);
+ ctx.Response.Close ();
+ }
+
+ void AssertWebSocketException (AggregateException e, WebSocketError error, Type inner = null)
+ {
+ var wsEx = e.InnerException as WebSocketException;
+ Console.WriteLine (e.InnerException.ToString ());
+ Assert.IsNotNull (wsEx, "Not a websocketexception");
+ Assert.AreEqual (error, wsEx.WebSocketErrorCode);
+ if (inner != null) {
+ Assert.IsNotNull (wsEx.InnerException);
+ Assert.IsInstanceOfType (inner, wsEx.InnerException);
+ }
+ }
+
+ void ForceSetHeader (WebHeaderCollection headers, string name, string value)
+ {
+ if (headerSetMethod == null)
+ headerSetMethod = typeof (WebHeaderCollection).GetMethod ("AddValue", BindingFlags.NonPublic);
+ headerSetMethod.Invoke (headers, new[] { name, value });
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/System/Test/System.Net/DnsTest.cs b/mcs/class/System/Test/System.Net/DnsTest.cs
index 611df7bf514..44797640651 100644
--- a/mcs/class/System/Test/System.Net/DnsTest.cs
+++ b/mcs/class/System/Test/System.Net/DnsTest.cs
@@ -32,7 +32,7 @@ namespace MonoTests.System.Net
site1Dot = "96.126.105.110",
site2Name = "info.diku.dk",
site2Dot = "130.225.96.4",
- noneExistingSite = "www.unlikely.novell.com";
+ noneExistingSite = "unlikely.xamarin.com";
private uint site1IP = 1852407392, site2IP = 2195808260; // Big-Endian
[Test]
diff --git a/mcs/class/System/Test/System.Net/FtpWebRequestTest.cs b/mcs/class/System/Test/System.Net/FtpWebRequestTest.cs
index 7c05b4224d0..2fc05090ef4 100644
--- a/mcs/class/System/Test/System.Net/FtpWebRequestTest.cs
+++ b/mcs/class/System/Test/System.Net/FtpWebRequestTest.cs
@@ -203,7 +203,11 @@ namespace MonoTests.System.Net
[Test]
public void DownloadFile1 ()
{
- ServerDownload sp = new ServerDownload ();
+ DownloadFile (new ServerDownload ());
+ }
+
+ void DownloadFile (ServerDownload sp)
+ {
sp.Start ();
string uri = String.Format ("ftp://{0}:{1}/file.txt", sp.IPAddress, sp.Port);
try {
@@ -229,6 +233,14 @@ namespace MonoTests.System.Net
}
[Test]
+ public void DownloadFile2 ()
+ {
+ // Some embedded FTP servers in Industrial Automation Hardware report
+ // the PWD using backslashes, but allow forward slashes for CWD.
+ DownloadFile (new ServerDownload (@"\Users\someuser", "/Users/someuser/"));
+ }
+
+ [Test]
public void DeleteFile1 ()
{
ServerDeleteFile sp = new ServerDeleteFile ();
@@ -377,6 +389,20 @@ namespace MonoTests.System.Net
}
class ServerDownload : FtpServer {
+
+ string Pwd, Cwd;
+
+ public ServerDownload ()
+ : this (null, null)
+ {
+ }
+
+ public ServerDownload (string pwd, string cwd)
+ {
+ Pwd = pwd ?? "/home/someuser";
+ Cwd = cwd ?? "/home/someuser/";
+ }
+
protected override void Run ()
{
Socket client = control.Accept ();
@@ -388,7 +414,7 @@ namespace MonoTests.System.Net
return;
}
- if (!DoInitialDialog (writer, reader, "/home/someuser", "/home/someuser/")) {
+ if (!DoInitialDialog (writer, reader, Pwd, Cwd)) {
client.Close ();
return;
}
diff --git a/mcs/class/System/mobile_System.dll.sources b/mcs/class/System/mobile_System.dll.sources
index 8b5c7462669..0b17914cef9 100644
--- a/mcs/class/System/mobile_System.dll.sources
+++ b/mcs/class/System/mobile_System.dll.sources
@@ -20,6 +20,8 @@ System.Collections.Specialized/HybridDictionary.cs
System.Collections.Specialized/ListDictionary.cs
System.Collections.Specialized/NameObjectCollectionBase.cs
System.Collections.Specialized/NameValueCollection.cs
+System.Collections.Specialized/IOrderedDictionary.cs
+System.Collections.Specialized/OrderedDictionary.cs
System.Collections.Specialized/ProcessStringDictionary.cs
System.Collections.Specialized/StringCollection.cs
System.Collections.Specialized/StringDictionary.cs
diff --git a/mcs/class/System/mobile_static_System.dll.sources b/mcs/class/System/mobile_static_System.dll.sources
new file mode 100644
index 00000000000..7bb9316feb5
--- /dev/null
+++ b/mcs/class/System/mobile_static_System.dll.sources
@@ -0,0 +1,76 @@
+#include mobile_System.dll.sources
+MonoTouch/MonoPInvokeCallbackAttribute.cs
+../Mono.Security/Mono.Security.Authenticode/PrivateKey.cs
+../Mono.Security/Mono.Security.Cryptography/MD5SHA1.cs
+../Mono.Security/Mono.Security.Cryptography/TlsHMAC.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/ChallengeResponse.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/ChallengeResponse2.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/MessageBase.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/NtlmAuthLevel.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/NtlmFlags.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/Type1Message.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/Type2Message.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/Type3Message.cs
+../Mono.Security/Mono.Security.Protocol.Tls/Alert.cs
+../Mono.Security/Mono.Security.Protocol.Tls/CipherAlgorithmType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs
+../Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteCollection.cs
+../Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteFactory.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ClientContext.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ClientRecordProtocol.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ClientSessionCache.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ContentType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/Context.cs
+../Mono.Security/Mono.Security.Protocol.Tls/DebugHelper.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ExchangeAlgorithmType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/HandshakeState.cs
+../Mono.Security/Mono.Security.Protocol.Tls/HashAlgorithmType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs
+../Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs
+../Mono.Security/Mono.Security.Protocol.Tls/RSASslSignatureDeformatter.cs
+../Mono.Security/Mono.Security.Protocol.Tls/RSASslSignatureFormatter.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SecurityCompressionType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SecurityParameters.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SecurityProtocolType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ServerContext.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ServerRecordProtocol.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SslCipherSuite.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SslHandshakeHash.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SslStreamBase.cs
+../Mono.Security/Mono.Security.Protocol.Tls/TlsCipherSuite.cs
+../Mono.Security/Mono.Security.Protocol.Tls/TlsClientSettings.cs
+../Mono.Security/Mono.Security.Protocol.Tls/TlsException.cs
+../Mono.Security/Mono.Security.Protocol.Tls/TlsServerSettings.cs
+../Mono.Security/Mono.Security.Protocol.Tls/TlsStream.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake/ClientCertificateType.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake/HandshakeMessage.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake/HandshakeType.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificate.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificateVerify.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientFinished.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientHello.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientKeyExchange.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificateRequest.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerFinished.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerHello.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerHelloDone.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerKeyExchange.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientCertificate.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientCertificateVerify.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientFinished.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientHello.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientKeyExchange.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerCertificate.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerCertificateRequest.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerFinished.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerHello.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerHelloDone.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerKeyExchange.cs
+../Mono.Security/Mono.Security.X509.Extensions/AuthorityKeyIdentifierExtension.cs
+../Mono.Security/Mono.Security.X509.Extensions/ExtendedKeyUsageExtension.cs
+../Mono.Security/Mono.Security.X509.Extensions/GeneralNames.cs
+../Mono.Security/Mono.Security.X509.Extensions/NetscapeCertTypeExtension.cs
+../Mono.Security/Mono.Security.X509.Extensions/SubjectAltNameExtension.cs
diff --git a/mcs/class/WindowsBase/System.Collections.ObjectModel/ObservableCollection.cs b/mcs/class/WindowsBase/System.Collections.ObjectModel/ObservableCollection.cs
index 1ea166cd9ac..2ec5f3be0b4 100644
--- a/mcs/class/WindowsBase/System.Collections.ObjectModel/ObservableCollection.cs
+++ b/mcs/class/WindowsBase/System.Collections.ObjectModel/ObservableCollection.cs
@@ -42,31 +42,31 @@ namespace System.Collections.ObjectModel
{
[Serializable]
public class ObservableCollection<T> : Collection<T>, INotifyCollectionChanged, INotifyPropertyChanged {
-
- private class Reentrant : IDisposable {
- private int count = 0;
+ [Serializable]
+ sealed class SimpleMonitor : IDisposable {
+ private int _busyCount;
- public Reentrant()
+ public SimpleMonitor()
{
}
public void Enter()
{
- count++;
+ _busyCount++;
}
public void Dispose()
{
- count--;
+ _busyCount--;
}
public bool Busy
{
- get { return count > 0; }
+ get { return _busyCount > 0; }
}
}
- private Reentrant reentrant = new Reentrant ();
+ private SimpleMonitor _monitor = new SimpleMonitor ();
public ObservableCollection()
{
@@ -86,7 +86,9 @@ namespace System.Collections.ObjectModel
{
}
+ [field:NonSerialized]
public virtual event NotifyCollectionChangedEventHandler CollectionChanged;
+ [field:NonSerialized]
protected virtual event PropertyChangedEventHandler PropertyChanged;
event PropertyChangedEventHandler INotifyPropertyChanged.PropertyChanged {
@@ -96,8 +98,8 @@ namespace System.Collections.ObjectModel
protected IDisposable BlockReentrancy ()
{
- reentrant.Enter ();
- return reentrant;
+ _monitor.Enter ();
+ return _monitor;
}
protected void CheckReentrancy ()
@@ -105,7 +107,7 @@ namespace System.Collections.ObjectModel
NotifyCollectionChangedEventHandler eh = CollectionChanged;
// Only have a problem if we have more than one event listener.
- if (reentrant.Busy && eh != null && eh.GetInvocationList ().Length > 1)
+ if (_monitor.Busy && eh != null && eh.GetInvocationList ().Length > 1)
throw new InvalidOperationException ("Cannot modify the collection while reentrancy is blocked.");
}
diff --git a/mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs b/mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs
index 9160f30bbe6..8e02384f58f 100644
--- a/mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs
+++ b/mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs
@@ -237,7 +237,7 @@ namespace System.IO.Packaging {
{
while (true)
{
- string s = relationshipId.ToString ();
+ string s = "Re" + relationshipId.ToString ();
if (!RelationshipExists (s))
return s;
relationshipId ++;
@@ -262,4 +262,4 @@ namespace System.IO.Packaging {
Package.WriteRelationships (Relationships, s);
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/build-rx-dll-sources.sh b/mcs/class/build-rx-dll-sources.sh
index 6c68aa2025a..2b3026c2ce7 100644
--- a/mcs/class/build-rx-dll-sources.sh
+++ b/mcs/class/build-rx-dll-sources.sh
@@ -10,10 +10,23 @@ using System.Xml.XPath;
var template_android = File.ReadAllText ("project_template_android.txt");
var template_ios = File.ReadAllText ("project_template_ios.txt");
-var guids_android = new string [] { "4fa878dc-6e88-43c4-b37b-8c1151cec56f", "fef62c23-10cd-4def-a5ae-54a8b309e970", "d263c126-9d3c-4299-a0c1-f25c703d07c9", "ec704077-ea31-4852-ad24-6732244174c0", "9360e845-d79d-4288-9100-63a80fad2bf0", "00dc3654-e373-4e3f-80fe-109f795adf1f", "e662282b-4341-4f86-aaaa-a942335b47fb", "a153a379-670c-42c2-9018-fc0d933a4f7f", "b29d45a6-0b8c-49c5-82a2-457e4d3cbc33", "3a3b5e76-029f-46b0-9ccf-fefe06eb61e7", "cb2ab716-bfcb-43bc-a03b-a3bda427746c", "73c5260f-8972-4e7c-822b-1a3a0358fa0b" };
-var guids_ios = new string [] { "6f2675f5-fcc7-4a28-9dc3-657b4613dcc5", "a67f34b5-75c1-4319-a93e-93df87e728a4", "79a43ceb-1a18-49ea-aac4-b72b9c90bf5a", "0a977063-0796-4cd4-84b8-aedb2d648b26", "b41cb61a-dca0-4539-8f99-7b3499e18e6d", "24f995bd-7075-489c-b7a5-7fde08c304b6", "894021ec-14fb-430a-8572-bea9569ae435", "92857c8e-0e83-4d02-a831-8af3fed43336", "912e14a2-7bdf-4600-8d55-e8c4f33a2063", "0f6c2933-8d0c-41e6-9f77-e8714ab8c4ab", "47d85a91-e8e2-4088-bf5a-68a161754d48", "45377009-1425-47fc-985e-05f98022f9e3" };
+var guids_android = new string [] {
+// Ix
+"5F7F40B6-19D3-48C7-8E15-AE1F976F60E1", "065F2411-7610-4AD6-9513-A1EFFCE576C0",
+"C4037060-1692-4423-B29E-76F3A74A72A5",
+// Rx
+"4fa878dc-6e88-43c4-b37b-8c1151cec56f", "fef62c23-10cd-4def-a5ae-54a8b309e970", "d263c126-9d3c-4299-a0c1-f25c703d07c9", "ec704077-ea31-4852-ad24-6732244174c0", "9360e845-d79d-4288-9100-63a80fad2bf0", "00dc3654-e373-4e3f-80fe-109f795adf1f", "e662282b-4341-4f86-aaaa-a942335b47fb", "a153a379-670c-42c2-9018-fc0d933a4f7f", "b29d45a6-0b8c-49c5-82a2-457e4d3cbc33", "3a3b5e76-029f-46b0-9ccf-fefe06eb61e7", "cb2ab716-bfcb-43bc-a03b-a3bda427746c", "73c5260f-8972-4e7c-822b-1a3a0358fa0b" };
+var guids_ios = new string [] {
+// Ix
+"AD6FCBE9-0F6A-4F27-8147-17AB1C8799A2", "220AD2F1-FEE9-4514-8F36-6BE37F0AAD7F",
+"4779C7FF-6969-4715-9389-DF6C43655D6F",
+// Rx
+"6f2675f5-fcc7-4a28-9dc3-657b4613dcc5", "a67f34b5-75c1-4319-a93e-93df87e728a4", "79a43ceb-1a18-49ea-aac4-b72b9c90bf5a", "0a977063-0796-4cd4-84b8-aedb2d648b26", "b41cb61a-dca0-4539-8f99-7b3499e18e6d", "24f995bd-7075-489c-b7a5-7fde08c304b6", "894021ec-14fb-430a-8572-bea9569ae435", "92857c8e-0e83-4d02-a831-8af3fed43336", "912e14a2-7bdf-4600-8d55-e8c4f33a2063", "0f6c2933-8d0c-41e6-9f77-e8714ab8c4ab", "47d85a91-e8e2-4088-bf5a-68a161754d48", "45377009-1425-47fc-985e-05f98022f9e3" };
var asses = new string [] {
+ "System.Interactive",
+ "System.Interactive.Async",
+ "System.Interactive.Providers",
"System.Reactive.Interfaces",
"System.Reactive.Core",
"System.Reactive.PlatformServices",
@@ -45,20 +58,28 @@ var blacklist = new string [] {
"ObservableConcurrencyTest.cs",
};
-var dstAndroid = "../../external/rx/Rx/NET/Source/Rx_Xamarin/android";
-var dstIOS = "../../external/rx/Rx/NET/Source/Rx_Xamarin/iOS";
-
int guid_idx = 0;
foreach (var ass in asses) {
+ var ix = ass.Contains ("Interactive");
+
+ var dstAndroid = ix ? "../../external/rx/Ix/NET/Ix_Xamarin/android" :
+ "../../external/rx/Rx/NET/Source/Rx_Xamarin/android";
+ var dstIOS = ix ? "../../external/rx/Ix/NET/Ix_Xamarin/iOS" :
+ "../../external/rx/Rx/NET/Source/Rx_Xamarin/iOS";
+
+
var monoass = ass == "Microsoft.Reactive.Testing" ?
"Mono.Reactive.Testing" : ass;
- var basePath = "../../external/rx/Rx/NET/Source";
+ var basePath = ix ? "../../external/rx/Ix/NET" :
+ "../../external/rx/Rx/NET/Source";
var csproj = Path.Combine (basePath, ass, ass + ".csproj");
var pathPrefix = ass == "Tests.System.Reactive" ? "../" : "";
- var android_dir = Path.GetFullPath (Path.Combine (csproj, "..", "..", "Rx_Xamarin", "android", "rx", monoass));
- var ios_dir = Path.GetFullPath (Path.Combine (csproj, "..", "..", "Rx_Xamarin", "iOS", "rx", monoass));
+ var category = ix ? "Ix_Xamarin" : "Rx_Xamarin";
+ var category2 = ix ? "ix" : "rx";
+ var android_dir = Path.GetFullPath (Path.Combine (csproj, "..", "..", category, "android", category2, monoass));
+ var ios_dir = Path.GetFullPath (Path.Combine (csproj, "..", "..", category, "iOS", category2, monoass));
var android_proj = Path.Combine (android_dir, "android_" + monoass + ".csproj");
var ios_proj = Path.Combine (ios_dir, "ios_" + monoass + ".csproj");
if (!Directory.Exists (android_dir))
diff --git a/mcs/class/corlib/Makefile b/mcs/class/corlib/Makefile
index dd231d58479..3000f81971b 100644
--- a/mcs/class/corlib/Makefile
+++ b/mcs/class/corlib/Makefile
@@ -106,13 +106,18 @@ $(TEST_RESX_RESOURCES) $(TEST_RESX_RESOURCES_SATELITE): %.resources: %.resx
TEST_RESOURCES = $(TEST_RESX_RESOURCES) $(TEST_RESX_RESOURCES_SATELITE)
-$(test_lib): $(TEST_RESOURCES) satellite-assemblies
+satellite_assembly1 = es-ES/$(patsubst %.dll,%.resources.dll,$(test_lib))
+satellite_assembly2 = nn-NO/$(patsubst %.dll,%.resources.dll,$(test_lib))
-satellite-assemblies:
+$(test_lib): $(TEST_RESOURCES) $(satellite_assembly1) $(satellite_assembly2)
+
+$(satellite_assembly1): Test/resources/culture-es-ES.cs Test/resources/Resources.es-ES.resources
@mkdir -p es-ES
- $(CSCOMPILE) -target:library -r:$(corlib) Test/resources/culture-es-ES.cs -resource:Test/resources/Resources.es-ES.resources -out:es-ES/$(patsubst %.dll,%.Resources.dll,$(test_lib))
+ $(CSCOMPILE) -target:library -r:$(corlib) Test/resources/culture-es-ES.cs -resource:Test/resources/Resources.es-ES.resources -out:$@
+
+$(satellite_assembly2): Test/resources/culture-nn-NO.cs Test/resources/Resources.nn-NO.resources
@mkdir -p nn-NO
- $(CSCOMPILE) -target:library -r:$(corlib) Test/resources/culture-nn-NO.cs -resource:Test/resources/Resources.nn-NO.resources -out:nn-NO/$(patsubst %.dll,%.Resources.dll,$(test_lib))
+ $(CSCOMPILE) -target:library -r:$(corlib) Test/resources/culture-nn-NO.cs -resource:Test/resources/Resources.nn-NO.resources -out:$@
vtsdir = Test/System.Runtime.Serialization.Formatters.Binary/VersionTolerantSerialization
vtslibs = \
@@ -135,7 +140,9 @@ $(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe: $(vtsdir)/Bina
$(vtsdir)/BinarySerializationOverVersions.cs -out:$@
@cp $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll $(vtsdir)/$(PROFILE)_TestLib
-# Need to define MONO_PATH to an absolute dir since the test is ran from a subdir
+# Need to define TEST_MONO_PATH to an absolute dir since the test is ran from a subdir
+TEST_MONO_PATH=$(PWD)/../lib/$(PROFILE)
+
run-test-vts: test-vts
@echo Running vts tests...
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) -noshadow \
diff --git a/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs b/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs
index 6d5c07d12d4..1cb4c39eacd 100644
--- a/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs
+++ b/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs
@@ -328,8 +328,9 @@ namespace Microsoft.Win32 {
try {
using (StreamWriter writer = new StreamWriter (path, false, Encoding.ASCII))
writer.WriteLine (btime.ToString ());
- } catch (Exception e) {
- Console.Error.WriteLine ("While saving registry data at {0}: {1}", path, e);
+ } catch (Exception) {
+ /* This can happen when a user process tries to write to MachineStore */
+ //Console.Error.WriteLine ("While saving registry data at {0}: {1}", path, e);
}
}
diff --git a/mcs/class/corlib/System.Collections.Generic/List.cs b/mcs/class/corlib/System.Collections.Generic/List.cs
index 17056a1b21c..9af2e9d2053 100644
--- a/mcs/class/corlib/System.Collections.Generic/List.cs
+++ b/mcs/class/corlib/System.Collections.Generic/List.cs
@@ -116,6 +116,18 @@ namespace System.Collections.Generic {
throw new ArgumentException ("index and count exceed length of list");
}
+ void CheckRangeOutOfRange (int idx, int count)
+ {
+ if (idx < 0)
+ throw new ArgumentOutOfRangeException ("index");
+
+ if (count < 0)
+ throw new ArgumentOutOfRangeException ("count");
+
+ if ((uint) idx + (uint) count > (uint) _size)
+ throw new ArgumentOutOfRangeException ("index and count exceed length of list");
+ }
+
void AddCollection (ICollection <T> collection)
{
int collectionCount = collection.Count;
@@ -212,14 +224,27 @@ namespace System.Collections.Generic {
public bool Exists (Predicate <T> match)
{
CheckMatch(match);
- return GetIndex(0, _size, match) != -1;
+
+ for (int i = 0; i < _size; i++) {
+ var item = _items [i];
+ if (match (item))
+ return true;
+ }
+
+ return false;
}
public T Find (Predicate <T> match)
{
CheckMatch(match);
- int i = GetIndex(0, _size, match);
- return (i != -1) ? _items [i] : default (T);
+
+ for (int i = 0; i < _size; i++) {
+ var item = _items [i];
+ if (match (item))
+ return item;
+ }
+
+ return default (T);
}
static void CheckMatch (Predicate <T> match)
@@ -296,68 +321,56 @@ namespace System.Collections.Generic {
public int FindIndex (Predicate <T> match)
{
CheckMatch (match);
- return GetIndex (0, _size, match);
+ return Array.GetIndex (_items, 0, _size, match);
}
public int FindIndex (int startIndex, Predicate <T> match)
{
CheckMatch (match);
- CheckIndex (startIndex);
- return GetIndex (startIndex, _size - startIndex, match);
+ CheckStartIndex (startIndex);
+ return Array.GetIndex (_items, startIndex, _size - startIndex, match);
}
public int FindIndex (int startIndex, int count, Predicate <T> match)
{
CheckMatch (match);
- CheckRange (startIndex, count);
- return GetIndex (startIndex, count, match);
- }
- int GetIndex (int startIndex, int count, Predicate <T> match)
- {
- int end = startIndex + count;
- for (int i = startIndex; i < end; i ++)
- if (match (_items [i]))
- return i;
-
- return -1;
+ CheckRangeOutOfRange (startIndex, count);
+ return Array.GetIndex (_items, startIndex, count, match);
}
public T FindLast (Predicate <T> match)
{
CheckMatch (match);
- int i = GetLastIndex (0, _size, match);
+ int i = Array.GetLastIndex (_items, 0, _size, match);
return i == -1 ? default (T) : this [i];
}
public int FindLastIndex (Predicate <T> match)
{
CheckMatch (match);
- return GetLastIndex (0, _size, match);
+ return Array.GetLastIndex (_items, 0, _size, match);
}
public int FindLastIndex (int startIndex, Predicate <T> match)
{
CheckMatch (match);
- CheckIndex (startIndex);
- return GetLastIndex (0, startIndex + 1, match);
+ CheckStartIndex (startIndex);
+ return Array.GetLastIndex (_items, 0, startIndex + 1, match);
}
public int FindLastIndex (int startIndex, int count, Predicate <T> match)
{
CheckMatch (match);
- int start = startIndex - count + 1;
- CheckRange (start, count);
- return GetLastIndex (start, count, match);
- }
+ CheckStartIndex (startIndex);
+
+ if (count < 0)
+ throw new ArgumentOutOfRangeException ("count");
- int GetLastIndex (int startIndex, int count, Predicate <T> match)
- {
- // unlike FindLastIndex, takes regular params for search range
- for (int i = startIndex + count; i != startIndex;)
- if (match (_items [--i]))
- return i;
- return -1;
+ if (startIndex - count + 1 < 0)
+ throw new ArgumentOutOfRangeException ("count must refer to a location within the collection");
+
+ return Array.GetLastIndex (_items, startIndex - count + 1, count, match);
}
-
+
public void ForEach (Action <T> action)
{
if (action == null)
@@ -423,6 +436,12 @@ namespace System.Collections.Generic {
if (index < 0 || (uint) index > (uint) _size)
throw new ArgumentOutOfRangeException ("index");
}
+
+ void CheckStartIndex (int index)
+ {
+ if (index < 0 || (uint) index > (uint) _size)
+ throw new ArgumentOutOfRangeException ("startIndex");
+ }
public void Insert (int index, T item)
{
diff --git a/mcs/class/corlib/System.Collections.ObjectModel/Collection.cs b/mcs/class/corlib/System.Collections.ObjectModel/Collection.cs
index 6a57a75acba..c5f09e7ab2a 100644
--- a/mcs/class/corlib/System.Collections.ObjectModel/Collection.cs
+++ b/mcs/class/corlib/System.Collections.ObjectModel/Collection.cs
@@ -54,7 +54,8 @@ namespace System.Collections.ObjectModel
#endif
{
IList <T> items;
- [field:NonSerializedAttribute()]
+
+ [NonSerialized]
object syncRoot;
public Collection ()
@@ -65,12 +66,12 @@ namespace System.Collections.ObjectModel
items = l;
}
- public Collection (IList <T> items)
+ public Collection (IList <T> list)
{
- if (items == null)
- throw new ArgumentNullException ("items");
- this.items = items;
- ICollection l = items as ICollection;
+ if (list == null)
+ throw new ArgumentNullException ("list");
+ this.items = list;
+ ICollection l = list as ICollection;
syncRoot = (l != null) ? l.SyncRoot : new object ();
}
diff --git a/mcs/class/corlib/System.Collections/CollectionBase.cs b/mcs/class/corlib/System.Collections/CollectionBase.cs
index 75817380b13..d3f6a40ea95 100644
--- a/mcs/class/corlib/System.Collections/CollectionBase.cs
+++ b/mcs/class/corlib/System.Collections/CollectionBase.cs
@@ -37,6 +37,8 @@ namespace System.Collections {
[ComVisible(true)]
[Serializable]
+ [System.Diagnostics.DebuggerDisplay ("Count={Count}")]
+ [System.Diagnostics.DebuggerTypeProxy (typeof (CollectionDebuggerView))]
#if INSIDE_CORLIB
public
#else
diff --git a/mcs/class/corlib/System.Collections/StructuralComparisons.cs b/mcs/class/corlib/System.Collections/StructuralComparisons.cs
index d738574dc41..9ce2574ebb1 100644
--- a/mcs/class/corlib/System.Collections/StructuralComparisons.cs
+++ b/mcs/class/corlib/System.Collections/StructuralComparisons.cs
@@ -45,7 +45,7 @@ namespace System.Collections
int IEqualityComparer.GetHashCode (object obj)
{
- var comparer = obj as IEqualityComparer;
+ var comparer = obj as IStructuralEquatable;
if (comparer != null)
return comparer.GetHashCode (this);
@@ -54,7 +54,7 @@ namespace System.Collections
bool IEqualityComparer.Equals (object x, object y)
{
- var comparer = x as IEqualityComparer;
+ var comparer = x as IStructuralEquatable;
if (comparer != null)
return comparer.Equals (y, this);
diff --git a/mcs/class/corlib/System.Globalization/CultureInfo.cs b/mcs/class/corlib/System.Globalization/CultureInfo.cs
index 8b740044e34..f93cac39337 100644
--- a/mcs/class/corlib/System.Globalization/CultureInfo.cs
+++ b/mcs/class/corlib/System.Globalization/CultureInfo.cs
@@ -1004,7 +1004,7 @@ namespace System.Globalization
Type type = Type.GetType (name, false);
if (type == null)
- throw new NotSupportedException ("Calendar not found, if the linker is enabled make sure to preserve this type: " + name);
+ return CreateCalendar (1 << CalendarTypeBits); // return invariant calandar if not found
return (Calendar) Activator.CreateInstance (type);
}
diff --git a/mcs/class/corlib/System.IO/FileStream.cs b/mcs/class/corlib/System.IO/FileStream.cs
index 98416dfa82f..62be3c834f4 100644
--- a/mcs/class/corlib/System.IO/FileStream.cs
+++ b/mcs/class/corlib/System.IO/FileStream.cs
@@ -699,11 +699,14 @@ namespace System.IO
MemoryStream ms = new MemoryStream ();
FlushBuffer (ms);
ms.Write (array, offset, numBytes);
+
+ // Set arguments to new compounded buffer
offset = 0;
- numBytes = (int) ms.Length;
+ array = ms.ToArray ();
+ numBytes = array.Length;
}
- WriteDelegate w = new WriteDelegate (WriteInternal);
+ WriteDelegate w = WriteInternal;
return w.BeginInvoke (array, offset, numBytes, userCallback, stateObject);
}
diff --git a/mcs/class/corlib/System.IO/Path.cs b/mcs/class/corlib/System.IO/Path.cs
index 3eeb79195bd..a1a6d121301 100644
--- a/mcs/class/corlib/System.IO/Path.cs
+++ b/mcs/class/corlib/System.IO/Path.cs
@@ -289,9 +289,8 @@ namespace System.IO {
return fullpath;
}
- [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
// http://msdn.microsoft.com/en-us/library/windows/desktop/aa364963%28v=vs.85%29.aspx
- // http://www.codeproject.com/Tips/223321/Win32-API-GetFullPathName
+ [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
private static extern int GetFullPathName(string path, int numBufferChars, StringBuilder buffer, ref IntPtr lpFilePartOrNull);
internal static string GetFullPathName(string path)
diff --git a/mcs/class/corlib/System.IO/Stream.cs b/mcs/class/corlib/System.IO/Stream.cs
index fecea2d8b77..d718e1fb05b 100644
--- a/mcs/class/corlib/System.IO/Stream.cs
+++ b/mcs/class/corlib/System.IO/Stream.cs
@@ -303,7 +303,7 @@ namespace System.IO
async Task CopyToAsync (Stream destination, byte[] buffer, CancellationToken cancellationToken)
{
int nread;
- while ((nread = await ReadAsync (buffer, 0, buffer.Length).ConfigureAwait (false)) != 0)
+ while ((nread = await ReadAsync (buffer, 0, buffer.Length, cancellationToken).ConfigureAwait (false)) != 0)
await destination.WriteAsync (buffer, 0, nread, cancellationToken).ConfigureAwait (false);
}
diff --git a/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
index f9222cf88f2..aa0f78a235c 100644
--- a/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
@@ -127,7 +127,7 @@ namespace System.Reflection.Emit {
ParameterInfo [] retval = new ParameterInfo [parameters.Length];
for (int i = 0; i < parameters.Length; i++)
- retval [i] = new ParameterInfo (pinfo == null ? null
+ retval [i] = ParameterInfo.New (pinfo == null ? null
: pinfo [i + 1], parameters [i], this, i + 1);
return retval;
diff --git a/mcs/class/corlib/System.Reflection.Emit/ConstructorOnTypeBuilderInst.cs b/mcs/class/corlib/System.Reflection.Emit/ConstructorOnTypeBuilderInst.cs
index 1f7b30dbce5..161e45ce767 100644
--- a/mcs/class/corlib/System.Reflection.Emit/ConstructorOnTypeBuilderInst.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/ConstructorOnTypeBuilderInst.cs
@@ -115,14 +115,14 @@ namespace System.Reflection.Emit
res = new ParameterInfo [cbuilder.parameters.Length];
for (int i = 0; i < cbuilder.parameters.Length; i++) {
Type type = instantiation.InflateType (cbuilder.parameters [i]);
- res [i] = new ParameterInfo (cbuilder.pinfo == null ? null : cbuilder.pinfo [i], type, this, i + 1);
+ res [i] = ParameterInfo.New (cbuilder.pinfo == null ? null : cbuilder.pinfo [i], type, this, i + 1);
}
} else {
ParameterInfo[] parms = cb.GetParameters ();
res = new ParameterInfo [parms.Length];
for (int i = 0; i < parms.Length; i++) {
Type type = instantiation.InflateType (parms [i].ParameterType);
- res [i] = new ParameterInfo (parms [i], type, this, i + 1);
+ res [i] = ParameterInfo.New (parms [i], type, this, i + 1);
}
}
return res;
diff --git a/mcs/class/corlib/System.Reflection.Emit/DynamicILInfo.cs b/mcs/class/corlib/System.Reflection.Emit/DynamicILInfo.cs
index c086c63bd15..a3be40abcae 100644
--- a/mcs/class/corlib/System.Reflection.Emit/DynamicILInfo.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/DynamicILInfo.cs
@@ -67,7 +67,7 @@ namespace System.Reflection.Emit {
}
public int GetTokenFor (RuntimeMethodHandle method) {
- MethodInfo mi = (MethodInfo)MethodBase.GetMethodFromHandle (method);
+ MethodBase mi = MethodBase.GetMethodFromHandle (method);
return this.method.GetILGenerator ().TokenGenerator.GetToken (mi, false);
}
diff --git a/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs b/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs
index b4915cced04..358601cb819 100644
--- a/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs
@@ -263,7 +263,7 @@ namespace System.Reflection.Emit {
ParameterInfo[] retval = new ParameterInfo [parameters.Length];
for (int i = 0; i < parameters.Length; i++) {
- retval [i] = new ParameterInfo (pinfo == null ? null : pinfo [i + 1], parameters [i], this, i + 1);
+ retval [i] = ParameterInfo.New (pinfo == null ? null : pinfo [i + 1], parameters [i], this, i + 1);
}
return retval;
}
@@ -449,7 +449,7 @@ namespace System.Reflection.Emit {
return m.AddRef (str);
}
- public int GetToken (MethodInfo method, Type[] opt_param_types) {
+ public int GetToken (MethodBase method, Type[] opt_param_types) {
throw new InvalidOperationException ();
}
diff --git a/mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs
index 50a67447377..240bc7297e7 100644
--- a/mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs
@@ -43,7 +43,14 @@ namespace System.Reflection.Emit {
[ComVisible (true)]
[ComDefaultInterface (typeof (_EnumBuilder))]
[ClassInterface (ClassInterfaceType.None)]
- public sealed class EnumBuilder : Type, _EnumBuilder {
+ public sealed class EnumBuilder :
+#if NET_4_5
+ TypeInfo
+#else
+ Type
+#endif
+ , _EnumBuilder
+ {
private TypeBuilder _tb;
private FieldBuilder _underlyingField;
private Type _underlyingType;
@@ -418,6 +425,18 @@ namespace System.Reflection.Emit {
return false;
}
}
+
+#if NET_4_5
+ public override bool IsConstructedGenericType {
+ get { return false; }
+ }
+
+ public override bool IsAssignableFrom (TypeInfo typeInfo)
+ {
+ return base.IsAssignableFrom (typeInfo);
+ }
+#endif
+
}
}
#endif
diff --git a/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs
index 696ec9cef3a..a4cfc9ca4fd 100644
--- a/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs
@@ -42,7 +42,12 @@ namespace System.Reflection.Emit
{
[ComVisible (true)]
[StructLayout (LayoutKind.Sequential)]
- public sealed class GenericTypeParameterBuilder : Type
+ public sealed class GenericTypeParameterBuilder :
+#if NET_4_5
+ TypeInfo
+#else
+ Type
+#endif
{
#region Sync with reflection.h
private TypeBuilder tbuilder;
diff --git a/mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs b/mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs
index b939ab6cffe..bc8b2538378 100644
--- a/mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs
@@ -180,7 +180,7 @@ namespace System.Reflection.Emit {
int GetToken (MemberInfo member, bool create_open_instance);
- int GetToken (MethodInfo method, Type[] opt_param_types);
+ int GetToken (MethodBase method, Type[] opt_param_types);
int GetToken (SignatureHelper helper);
}
diff --git a/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
index 2ea94ea5253..d5f8c1407b5 100644
--- a/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
@@ -230,7 +230,7 @@ namespace System.Reflection.Emit
ParameterInfo[] retval = new ParameterInfo [parameters.Length];
for (int i = 0; i < parameters.Length; i++) {
- retval [i] = new ParameterInfo (pinfo == null ? null : pinfo [i + 1], parameters [i], this, i + 1);
+ retval [i] = ParameterInfo.New (pinfo == null ? null : pinfo [i + 1], parameters [i], this, i + 1);
}
return retval;
}
diff --git a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
index c3dd1f08bd0..eab1cd0b8c9 100644
--- a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
@@ -656,7 +656,7 @@ namespace System.Reflection.Emit {
private static extern int getToken (ModuleBuilder mb, object obj, bool create_open_instance);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- private static extern int getMethodToken (ModuleBuilder mb, MethodInfo method,
+ private static extern int getMethodToken (ModuleBuilder mb, MethodBase method,
Type[] opt_param_types);
internal int GetToken (string str)
@@ -678,7 +678,7 @@ namespace System.Reflection.Emit {
return getToken (this, member, create_open_instance);
}
- internal int GetToken (MethodInfo method, Type[] opt_param_types) {
+ internal int GetToken (MethodBase method, Type[] opt_param_types) {
return getMethodToken (this, method, opt_param_types);
}
@@ -981,7 +981,7 @@ namespace System.Reflection.Emit {
return mb.GetToken (member, create_open_instance);
}
- public int GetToken (MethodInfo method, Type[] opt_param_types) {
+ public int GetToken (MethodBase method, Type[] opt_param_types) {
return mb.GetToken (method, opt_param_types);
}
diff --git a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
index 882d125442d..578a7ab0576 100644
--- a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
@@ -50,7 +50,13 @@ namespace System.Reflection.Emit
[ComDefaultInterface (typeof (_TypeBuilder))]
[ClassInterface (ClassInterfaceType.None)]
[StructLayout (LayoutKind.Sequential)]
- public sealed class TypeBuilder : Type, _TypeBuilder
+ public sealed class TypeBuilder :
+#if NET_4_5
+ TypeInfo
+#else
+ Type
+#endif
+ , _TypeBuilder
{
#pragma warning disable 169
#region Sync with reflection.h
@@ -1927,6 +1933,17 @@ namespace System.Reflection.Emit
return false;
}
}
+
+#if NET_4_5
+ public override bool IsConstructedGenericType {
+ get { return false; }
+ }
+
+ public override bool IsAssignableFrom (TypeInfo typeInfo)
+ {
+ return base.IsAssignableFrom (typeInfo);
+ }
+#endif
}
}
#endif
diff --git a/mcs/class/corlib/System.Reflection/AssemblyName.cs b/mcs/class/corlib/System.Reflection/AssemblyName.cs
index 5436dc663af..ad9696aaf06 100644
--- a/mcs/class/corlib/System.Reflection/AssemblyName.cs
+++ b/mcs/class/corlib/System.Reflection/AssemblyName.cs
@@ -323,16 +323,16 @@ namespace System.Reflection {
return token;
}
- [MonoTODO]
public static bool ReferenceMatchesDefinition (AssemblyName reference, AssemblyName definition)
{
if (reference == null)
throw new ArgumentNullException ("reference");
if (definition == null)
throw new ArgumentNullException ("definition");
- if (reference.Name != definition.Name)
- return false;
- throw new NotImplementedException ();
+
+ // we only compare the simple assembly name to be consistent with MS .NET,
+ // which is the result of a bug in their implementation (see https://connect.microsoft.com/VisualStudio/feedback/details/752902)
+ return string.Equals (reference.Name, definition.Name, StringComparison.OrdinalIgnoreCase);
}
public void SetPublicKey (byte[] publicKey)
diff --git a/mcs/class/corlib/System.Reflection/Binder.cs b/mcs/class/corlib/System.Reflection/Binder.cs
index 5bdc14633c0..7c0f829a380 100644
--- a/mcs/class/corlib/System.Reflection/Binder.cs
+++ b/mcs/class/corlib/System.Reflection/Binder.cs
@@ -32,6 +32,7 @@
using System.Globalization;
using System.Runtime.InteropServices;
+using System.Collections.Generic;
namespace System.Reflection
{
@@ -400,12 +401,12 @@ namespace System.Reflection
if (i < names.Length)
continue;
- selected = SelectMethod (bindingAttr, new MethodBase [] { m }, newTypes, newModifiers, true, args);
+ selected = SelectMethod (bindingAttr, new MethodBase [] { m }, newTypes, newModifiers, true, ref args);
if (selected != null)
break;
}
} else {
- selected = SelectMethod (bindingAttr, match, types, modifiers, true, args);
+ selected = SelectMethod (bindingAttr, match, types, modifiers, true, ref args);
}
state = null;
@@ -618,11 +619,11 @@ namespace System.Reflection
public override MethodBase SelectMethod (BindingFlags bindingAttr, MethodBase [] match, Type [] types, ParameterModifier [] modifiers)
{
- return SelectMethod (bindingAttr, match, types, modifiers,
- false, null);
+ object[] args = null;
+ return SelectMethod (bindingAttr, match, types, modifiers, false, ref args);
}
- MethodBase SelectMethod (BindingFlags bindingAttr, MethodBase[] match, Type[] types, ParameterModifier[] modifiers, bool allowByRefMatch, object[] arguments)
+ MethodBase SelectMethod (BindingFlags bindingAttr, MethodBase[] match, Type[] types, ParameterModifier[] modifiers, bool allowByRefMatch, ref object[] arguments)
{
MethodBase m;
int i, j;
@@ -685,22 +686,57 @@ namespace System.Reflection
return null;
MethodBase result = null;
+ ParameterInfo[] result_pi = null;
for (i = 0; i < match.Length; ++i) {
m = match [i];
- ParameterInfo[] args = m.GetParametersInternal ();
- if (args.Length != types.Length)
- continue;
- if (!check_arguments (types, args, allowByRefMatch))
+ var pi = m.GetParametersInternal ();
+ var full_pi = pi;
+ if (pi.Length != types.Length) {
+ if ((bindingAttr & BindingFlags.OptionalParamBinding) == 0)
+ continue;
+
+ List<ParameterInfo> pi_reduced = null;
+ for (var ii = pi.Length - 1; ii >= 0; --ii) {
+ if ((pi [ii].Attributes & ParameterAttributes.HasDefault) == 0)
+ break;
+
+ if (pi_reduced == null) {
+ pi_reduced = new List<ParameterInfo> (pi);
+ }
+
+ pi_reduced.RemoveAt (ii);
+ }
+
+ if (pi_reduced == null || pi_reduced.Count != types.Length)
+ continue;
+
+ pi = pi_reduced.ToArray ();
+ }
+
+ if (!check_arguments (types, pi, allowByRefMatch))
continue;
- if (result != null)
+ if (result != null) {
result = GetBetterMethod (result, m, types);
- else
- result = m;
+ if (result != m)
+ continue;
+ }
+
+ result = m;
+ result_pi = full_pi;
}
- if (result != null || arguments == null || types.Length != arguments.Length)
+ if (result != null) {
+ i = arguments == null ? 0 : arguments.Length;
+ Array.Resize (ref arguments, result_pi.Length);
+ for (; i < arguments.Length; ++i)
+ arguments [i] = result_pi [i].DefaultValue;
+
return result;
+ }
+
+ if (arguments == null || types.Length != arguments.Length)
+ return null;
// Xamarin-5278: try with parameters that are COM objects
// REVIEW: do we also need to implement best method match?
diff --git a/mcs/class/corlib/System.Reflection/IntrospectionExtensions.cs b/mcs/class/corlib/System.Reflection/IntrospectionExtensions.cs
index 28736617336..7f7cd76b9c5 100644
--- a/mcs/class/corlib/System.Reflection/IntrospectionExtensions.cs
+++ b/mcs/class/corlib/System.Reflection/IntrospectionExtensions.cs
@@ -4,7 +4,7 @@
// Authors:
// Marek Safar <marek.safar@gmail.com>
//
-// Copyright 2011 Xamarin Inc.
+// Copyright (C) 2013 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -34,7 +34,12 @@ namespace System.Reflection
{
public static TypeInfo GetTypeInfo (this Type type)
{
- return new TypeDelegator (type);
+ if (type == null)
+ throw new ArgumentNullException ("type");
+
+ // This is odd but that's what .net does
+ var reflectable = (IReflectableType) type;
+ return reflectable.GetTypeInfo ();
}
}
}
diff --git a/mcs/class/corlib/System.Reflection/MonoGenericClass.cs b/mcs/class/corlib/System.Reflection/MonoGenericClass.cs
index ad5e9436fee..c053a4bbfc3 100644
--- a/mcs/class/corlib/System.Reflection/MonoGenericClass.cs
+++ b/mcs/class/corlib/System.Reflection/MonoGenericClass.cs
@@ -50,7 +50,12 @@ namespace System.Reflection
* depends on them.
*/
[StructLayout (LayoutKind.Sequential)]
- internal class MonoGenericClass : Type
+ sealed class MonoGenericClass :
+#if NET_4_5
+ TypeInfo
+#else
+ Type
+#endif
{
#region Keep in sync with object-internals.h
#pragma warning disable 649
diff --git a/mcs/class/corlib/System.Reflection/MonoMethod.cs b/mcs/class/corlib/System.Reflection/MonoMethod.cs
index 0b0cd4c6fb4..68dd9fb8873 100644
--- a/mcs/class/corlib/System.Reflection/MonoMethod.cs
+++ b/mcs/class/corlib/System.Reflection/MonoMethod.cs
@@ -105,7 +105,7 @@ namespace System.Reflection {
static internal ParameterInfo GetReturnParameterInfo (MonoMethod method)
{
- return new ParameterInfo (GetReturnType (method.mhandle), method, get_retval_marshal (method.mhandle));
+ return ParameterInfo.New (GetReturnType (method.mhandle), method, get_retval_marshal (method.mhandle));
}
};
@@ -322,15 +322,10 @@ namespace System.Reflection {
return attrs;
}
- static bool ShouldPrintFullName (Type type) {
- return type.IsGenericType || (type.IsClass && (!type.IsPointer ||
- (!type.GetElementType ().IsPrimitive && !type.GetElementType ().IsNested)));
- }
-
public override string ToString () {
StringBuilder sb = new StringBuilder ();
Type retType = ReturnType;
- if (ShouldPrintFullName (retType))
+ if (Type.ShouldPrintFullName (retType))
sb.Append (retType.ToString ());
else
sb.Append (retType.Name);
@@ -347,21 +342,10 @@ namespace System.Reflection {
sb.Append ("]");
}
sb.Append ("(");
- ParameterInfo[] p = GetParametersInternal ();
- for (int i = 0; i < p.Length; ++i) {
- if (i > 0)
- sb.Append (", ");
- Type pt = p[i].ParameterType;
- bool byref = pt.IsByRef;
- if (byref)
- pt = pt.GetElementType ();
- if (ShouldPrintFullName (pt))
- sb.Append (pt.ToString ());
- else
- sb.Append (pt.Name);
- if (byref)
- sb.Append (" ByRef");
- }
+
+ var p = GetParametersInternal ();
+ ParameterInfo.FormatParameters (sb, p);
+
if ((CallingConvention & CallingConventions.VarArgs) != 0) {
if (p.Length > 0)
sb.Append (", ");
diff --git a/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs b/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs
new file mode 100644
index 00000000000..327166e4488
--- /dev/null
+++ b/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs
@@ -0,0 +1,240 @@
+// System.Reflection.ParameterInfo
+//
+// Authors:
+// Sean MacIsaac (macisaac@ximian.com)
+// Marek Safar (marek.safar@gmail.com)
+//
+// (C) 2001 Ximian, Inc.
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
+// Copyright 2013 Xamarin, Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if !FULL_AOT_RUNTIME
+using System.Reflection.Emit;
+#endif
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Collections.Generic;
+using System.Text;
+
+namespace System.Reflection
+{
+#if NET_4_0
+ [ComVisible (true)]
+ [ComDefaultInterfaceAttribute (typeof (_ParameterInfo))]
+ [Serializable]
+ [ClassInterfaceAttribute (ClassInterfaceType.None)]
+ [StructLayout (LayoutKind.Sequential)]
+ class MonoParameterInfo : ParameterInfo {
+#else
+ public partial class ParameterInfo {
+#endif
+
+#if !FULL_AOT_RUNTIME
+#if NET_4_0
+ internal MonoParameterInfo (ParameterBuilder pb, Type type, MemberInfo member, int position) {
+#else
+ internal ParameterInfo (ParameterBuilder pb, Type type, MemberInfo member, int position) {
+#endif
+ this.ClassImpl = type;
+ this.MemberImpl = member;
+ if (pb != null) {
+ this.NameImpl = pb.Name;
+ this.PositionImpl = pb.Position - 1; // ParameterInfo.Position is zero-based
+ this.AttrsImpl = (ParameterAttributes) pb.Attributes;
+ } else {
+ this.NameImpl = null;
+ this.PositionImpl = position - 1;
+ this.AttrsImpl = ParameterAttributes.None;
+ }
+ }
+#endif
+
+ /*FIXME this constructor looks very broken in the position parameter*/
+#if NET_4_0
+ internal MonoParameterInfo (ParameterInfo pinfo, Type type, MemberInfo member, int position) {
+#else
+ internal ParameterInfo (ParameterInfo pinfo, Type type, MemberInfo member, int position) {
+#endif
+ this.ClassImpl = type;
+ this.MemberImpl = member;
+ if (pinfo != null) {
+ this.NameImpl = pinfo.Name;
+ this.PositionImpl = pinfo.Position - 1; // ParameterInfo.Position is zero-based
+ this.AttrsImpl = (ParameterAttributes) pinfo.Attributes;
+ } else {
+ this.NameImpl = null;
+ this.PositionImpl = position - 1;
+ this.AttrsImpl = ParameterAttributes.None;
+ }
+ }
+
+#if NET_4_0
+ internal MonoParameterInfo (ParameterInfo pinfo, MemberInfo member) {
+#else
+ internal ParameterInfo (ParameterInfo pinfo, MemberInfo member) {
+#endif
+ this.ClassImpl = pinfo.ParameterType;
+ this.MemberImpl = member;
+ this.NameImpl = pinfo.Name;
+ this.PositionImpl = pinfo.Position;
+ this.AttrsImpl = pinfo.Attributes;
+ this.DefaultValueImpl = pinfo.GetDefaultValueImpl ();
+ //this.parent = pinfo;
+ }
+
+ /* to build a ParameterInfo for the return type of a method */
+#if NET_4_0
+ internal MonoParameterInfo (Type type, MemberInfo member, MarshalAsAttribute marshalAs) {
+#else
+ internal ParameterInfo (Type type, MemberInfo member, MarshalAsAttribute marshalAs) {
+#endif
+ this.ClassImpl = type;
+ this.MemberImpl = member;
+ this.NameImpl = "";
+ this.PositionImpl = -1; // since parameter positions are zero-based, return type pos is -1
+ this.AttrsImpl = ParameterAttributes.Retval;
+ this.marshalAs = marshalAs;
+ }
+
+#if NET_4_0
+ public override
+#else
+ public virtual
+#endif
+ object DefaultValue {
+ get {
+ if (ClassImpl == typeof (Decimal)) {
+ /* default values for decimals are encoded using a custom attribute */
+ DecimalConstantAttribute[] attrs = (DecimalConstantAttribute[])GetCustomAttributes (typeof (DecimalConstantAttribute), false);
+ if (attrs.Length > 0)
+ return attrs [0].Value;
+ } else if (ClassImpl == typeof (DateTime)) {
+ /* default values for DateTime are encoded using a custom attribute */
+ DateTimeConstantAttribute[] attrs = (DateTimeConstantAttribute[])GetCustomAttributes (typeof (DateTimeConstantAttribute), false);
+ if (attrs.Length > 0)
+ return new DateTime (attrs [0].Ticks);
+ }
+ return DefaultValueImpl;
+ }
+ }
+
+#if NET_4_0
+ public override
+#else
+ public
+#endif
+ object RawDefaultValue {
+ get {
+ /*FIXME right now DefaultValue doesn't throw for reflection-only assemblies. Change this once the former is fixed.*/
+ return DefaultValue;
+ }
+ }
+
+ public
+#if NET_4_0
+ override
+#endif
+ int MetadataToken {
+ get {
+ if (MemberImpl is PropertyInfo) {
+ PropertyInfo prop = (PropertyInfo)MemberImpl;
+ MethodInfo mi = prop.GetGetMethod (true);
+ if (mi == null)
+ mi = prop.GetSetMethod (true);
+
+ return mi.GetParametersInternal () [PositionImpl].MetadataToken;
+ } else if (MemberImpl is MethodBase) {
+ return GetMetadataToken ();
+ }
+ throw new ArgumentException ("Can't produce MetadataToken for member of type " + MemberImpl.GetType ());
+ }
+ }
+
+
+ public
+#if NET_4_0
+ override
+#else
+ virtual
+#endif
+ object[] GetCustomAttributes (bool inherit)
+ {
+ return MonoCustomAttrs.GetCustomAttributes (this, inherit);
+ }
+
+ public
+#if NET_4_0
+ override
+#else
+ virtual
+#endif
+ object[] GetCustomAttributes (Type attributeType, bool inherit)
+ {
+ return MonoCustomAttrs.GetCustomAttributes (this, attributeType, inherit);
+ }
+
+
+ public
+#if NET_4_0
+ override
+#else
+ virtual
+#endif
+ bool IsDefined( Type attributeType, bool inherit) {
+ return MonoCustomAttrs.IsDefined (this, attributeType, inherit);
+ }
+
+#if NET_4_0
+ public override IList<CustomAttributeData> GetCustomAttributesData () {
+ return CustomAttributeData.GetCustomAttributes (this);
+ }
+#endif
+
+
+ public
+#if NET_4_0
+ override
+#else
+ virtual
+#endif
+ Type[] GetOptionalCustomModifiers () {
+ Type[] types = GetTypeModifiers (true);
+ if (types == null)
+ return Type.EmptyTypes;
+ return types;
+ }
+
+ public
+#if NET_4_0
+ override
+#else
+ virtual
+#endif
+ Type[] GetRequiredCustomModifiers () {
+ Type[] types = GetTypeModifiers (false);
+ if (types == null)
+ return Type.EmptyTypes;
+ return types;
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Reflection/MonoProperty.cs b/mcs/class/corlib/System.Reflection/MonoProperty.cs
index 9760c197006..24dcf8b7470 100644
--- a/mcs/class/corlib/System.Reflection/MonoProperty.cs
+++ b/mcs/class/corlib/System.Reflection/MonoProperty.cs
@@ -1,13 +1,14 @@
//
-// System.Reflection/MonoProperty.cs
-// The class used to represent Properties from the mono runtime.
+// MonoProperty.cs: The class used to represent Properties from the mono runtime.
//
-// Author:
+// Authors:
// Paolo Molaro (lupus@ximian.com)
// Patrik Torstensson (patrik.torstensson@labs2.com)
+// Marek Safar (marek.safar@gmail.com)
//
// (C) 2001 Ximian, Inc. http://www.ximian.com
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
+// Copyright 2013 Xamarin, Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -35,6 +36,7 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
+using System.Text;
namespace System.Reflection {
@@ -177,24 +179,25 @@ namespace System.Reflection {
return null;
}
- public override ParameterInfo[] GetIndexParameters()
+ public override ParameterInfo[] GetIndexParameters ()
{
CachePropertyInfo (PInfo.GetMethod | PInfo.SetMethod);
- ParameterInfo[] res;
+ ParameterInfo[] src;
+ int length;
if (info.get_method != null) {
- res = info.get_method.GetParameters ();
+ src = info.get_method.GetParametersInternal ();
+ length = src.Length;
} else if (info.set_method != null) {
- ParameterInfo[] src = info.set_method.GetParametersInternal ();
- res = new ParameterInfo [src.Length - 1];
- Array.Copy (src, res, res.Length);
+ src = info.set_method.GetParametersInternal ();
+ length = src.Length - 1;
} else
return EmptyArray<ParameterInfo>.Value;
- for (int i = 0; i < res.Length; ++i) {
- ParameterInfo pinfo = res [i];
- res [i] = new ParameterInfo (pinfo, this);
+ var dest = new ParameterInfo [length];
+ for (int i = 0; i < length; ++i) {
+ dest [i] = ParameterInfo.New (src [i], this);
}
- return res;
+ return dest;
}
public override MethodInfo GetSetMethod (bool nonPublic)
@@ -296,7 +299,7 @@ namespace System.Reflection {
{
if (index == null || index.Length == 0) {
/*FIXME we should check if the number of arguments matches the expected one, otherwise the error message will be pretty criptic.*/
-#if !MONOTOUCH
+#if !FULL_AOT_RUNTIME
if (cached_getter == null) {
MethodInfo method = GetGetMethod (true);
if (!DeclaringType.IsValueType && !method.ContainsGenericParameters) { //FIXME find a way to build an invoke delegate for value types.
@@ -363,8 +366,27 @@ namespace System.Reflection {
method.Invoke (obj, invokeAttr, binder, parms, culture);
}
- public override string ToString () {
- return PropertyType.ToString () + " " + Name;
+ public override string ToString ()
+ {
+ var sb = new StringBuilder ();
+
+ Type retType = PropertyType;
+ if (Type.ShouldPrintFullName (retType))
+ sb.Append (retType.ToString ());
+ else
+ sb.Append (retType.Name);
+
+ sb.Append (" ");
+ sb.Append (Name);
+
+ var pi = GetIndexParameters ();
+ if (pi.Length > 0) {
+ sb.Append (" [");
+ ParameterInfo.FormatParameters (sb, pi);
+ sb.Append ("]");
+ }
+
+ return sb.ToString ();
}
public override Type[] GetOptionalCustomModifiers () {
diff --git a/mcs/class/corlib/System.Reflection/ParameterInfo.cs b/mcs/class/corlib/System.Reflection/ParameterInfo.cs
index f62ef54f19e..890dffd3b2f 100644
--- a/mcs/class/corlib/System.Reflection/ParameterInfo.cs
+++ b/mcs/class/corlib/System.Reflection/ParameterInfo.cs
@@ -1,9 +1,12 @@
// System.Reflection.ParameterInfo
//
-// Sean MacIsaac (macisaac@ximian.com)
+// Authors:
+// Sean MacIsaac (macisaac@ximian.com)
+// Marek Safar (marek.safar@gmail.com)
//
// (C) 2001 Ximian, Inc.
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
+// Copyright 2013 Xamarin, Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -31,6 +34,7 @@ using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Collections.Generic;
+using System.Text;
namespace System.Reflection
{
@@ -40,9 +44,9 @@ namespace System.Reflection
[ClassInterfaceAttribute (ClassInterfaceType.None)]
[StructLayout (LayoutKind.Sequential)]
#if MOBILE
- public class ParameterInfo : ICustomAttributeProvider {
+ public partial class ParameterInfo : ICustomAttributeProvider {
#else
- public class ParameterInfo : ICustomAttributeProvider, _ParameterInfo {
+ public partial class ParameterInfo : ICustomAttributeProvider, _ParameterInfo {
#endif
protected Type ClassImpl;
@@ -51,61 +55,11 @@ namespace System.Reflection
protected string NameImpl;
protected int PositionImpl;
protected ParameterAttributes AttrsImpl;
- private MarshalAsAttribute marshalAs;
+ internal MarshalAsAttribute marshalAs;
protected ParameterInfo () {
}
-#if !FULL_AOT_RUNTIME
- internal ParameterInfo (ParameterBuilder pb, Type type, MemberInfo member, int position) {
- this.ClassImpl = type;
- this.MemberImpl = member;
- if (pb != null) {
- this.NameImpl = pb.Name;
- this.PositionImpl = pb.Position - 1; // ParameterInfo.Position is zero-based
- this.AttrsImpl = (ParameterAttributes) pb.Attributes;
- } else {
- this.NameImpl = null;
- this.PositionImpl = position - 1;
- this.AttrsImpl = ParameterAttributes.None;
- }
- }
-#endif
-
- /*FIXME this constructor looks very broken in the position parameter*/
- internal ParameterInfo (ParameterInfo pinfo, Type type, MemberInfo member, int position) {
- this.ClassImpl = type;
- this.MemberImpl = member;
- if (pinfo != null) {
- this.NameImpl = pinfo.Name;
- this.PositionImpl = pinfo.Position - 1; // ParameterInfo.Position is zero-based
- this.AttrsImpl = (ParameterAttributes) pinfo.Attributes;
- } else {
- this.NameImpl = null;
- this.PositionImpl = position - 1;
- this.AttrsImpl = ParameterAttributes.None;
- }
- }
-
- internal ParameterInfo (ParameterInfo pinfo, MemberInfo member) {
- this.ClassImpl = pinfo.ParameterType;
- this.MemberImpl = member;
- this.NameImpl = pinfo.Name;
- this.PositionImpl = pinfo.Position;
- this.AttrsImpl = pinfo.Attributes;
- //this.parent = pinfo;
- }
-
- /* to build a ParameterInfo for the return type of a method */
- internal ParameterInfo (Type type, MemberInfo member, MarshalAsAttribute marshalAs) {
- this.ClassImpl = type;
- this.MemberImpl = member;
- this.NameImpl = "";
- this.PositionImpl = -1; // since parameter positions are zero-based, return type pos is -1
- this.AttrsImpl = ParameterAttributes.Retval;
- this.marshalAs = marshalAs;
- }
-
public override string ToString() {
Type elementType = ClassImpl;
while (elementType.HasElementType) {
@@ -124,28 +78,33 @@ namespace System.Reflection
return result;
}
+ internal static void FormatParameters (StringBuilder sb, ParameterInfo[] p)
+ {
+ for (int i = 0; i < p.Length; ++i) {
+ if (i > 0)
+ sb.Append (", ");
+
+ Type pt = p[i].ParameterType;
+ bool byref = pt.IsByRef;
+ if (byref)
+ pt = pt.GetElementType ();
+
+ if (Type.ShouldPrintFullName (pt))
+ sb.Append (pt.ToString ());
+ else
+ sb.Append (pt.Name);
+
+ if (byref)
+ sb.Append (" ByRef");
+ }
+ }
+
public virtual Type ParameterType {
get {return ClassImpl;}
}
public virtual ParameterAttributes Attributes {
get {return AttrsImpl;}
}
- public virtual object DefaultValue {
- get {
- if (ClassImpl == typeof (Decimal)) {
- /* default values for decimals are encoded using a custom attribute */
- DecimalConstantAttribute[] attrs = (DecimalConstantAttribute[])GetCustomAttributes (typeof (DecimalConstantAttribute), false);
- if (attrs.Length > 0)
- return attrs [0].Value;
- } else if (ClassImpl == typeof (DateTime)) {
- /* default values for DateTime are encoded using a custom attribute */
- DateTimeConstantAttribute[] attrs = (DateTimeConstantAttribute[])GetCustomAttributes (typeof (DateTimeConstantAttribute), false);
- if (attrs.Length > 0)
- return new DateTime (attrs [0].Ticks);
- }
- return DefaultValueImpl;
- }
- }
public bool IsIn {
get {
@@ -190,41 +149,7 @@ namespace System.Reflection
}
[MethodImplAttribute (MethodImplOptions.InternalCall)]
- extern int GetMetadataToken ();
-
- public
-#if NET_4_0
- virtual
-#endif
- int MetadataToken {
- get {
- if (MemberImpl is PropertyInfo) {
- PropertyInfo prop = (PropertyInfo)MemberImpl;
- MethodInfo mi = prop.GetGetMethod (true);
- if (mi == null)
- mi = prop.GetSetMethod (true);
-
- return mi.GetParametersInternal () [PositionImpl].MetadataToken;
- } else if (MemberImpl is MethodBase) {
- return GetMetadataToken ();
- }
- throw new ArgumentException ("Can't produce MetadataToken for member of type " + MemberImpl.GetType ());
- }
- }
-
- public virtual object[] GetCustomAttributes (bool inherit)
- {
- return MonoCustomAttrs.GetCustomAttributes (this, inherit);
- }
-
- public virtual object[] GetCustomAttributes (Type attributeType, bool inherit)
- {
- return MonoCustomAttrs.GetCustomAttributes (this, attributeType, inherit);
- }
-
- public virtual bool IsDefined( Type attributeType, bool inherit) {
- return MonoCustomAttrs.IsDefined (this, attributeType, inherit);
- }
+ internal extern int GetMetadataToken ();
internal object[] GetPseudoCustomAttributes () {
int count = 0;
@@ -257,40 +182,19 @@ namespace System.Reflection
}
[MethodImplAttribute (MethodImplOptions.InternalCall)]
- extern Type[] GetTypeModifiers (bool optional);
+ internal extern Type[] GetTypeModifiers (bool optional);
- public virtual Type[] GetOptionalCustomModifiers () {
- Type[] types = GetTypeModifiers (true);
- if (types == null)
- return Type.EmptyTypes;
- return types;
- }
-
- public virtual Type[] GetRequiredCustomModifiers () {
- Type[] types = GetTypeModifiers (false);
- if (types == null)
- return Type.EmptyTypes;
- return types;
- }
-
- public virtual object RawDefaultValue {
- get {
- /*FIXME right now DefaultValue doesn't throw for reflection-only assemblies. Change this once the former is fixed.*/
- return DefaultValue;
- }
- }
-
-#if NET_4_0
- public virtual IList<CustomAttributeData> GetCustomAttributesData () {
- return CustomAttributeData.GetCustomAttributes (this);
+ internal object GetDefaultValueImpl ()
+ {
+ return DefaultValueImpl;
}
-#endif
#if NET_4_5
public virtual IEnumerable<CustomAttributeData> CustomAttributes {
get { return GetCustomAttributesData (); }
}
+ [MonoTODO]
public virtual bool HasDefaultValue {
get { throw new NotImplementedException (); }
}
@@ -319,5 +223,82 @@ namespace System.Reflection
}
#endif
+#if NET_4_0
+ public virtual object DefaultValue {
+ get { throw new NotImplementedException (); }
+ }
+
+ public virtual object RawDefaultValue {
+ get { throw new NotImplementedException (); }
+ }
+
+ public virtual int MetadataToken {
+ get { return 0x8000000; }
+ }
+
+ public virtual object[] GetCustomAttributes (bool inherit)
+ {
+ return new object [0];
+ }
+
+ public virtual object[] GetCustomAttributes (Type attributeType, bool inherit)
+ {
+ return new object [0];
+ }
+
+ public virtual bool IsDefined( Type attributeType, bool inherit) {
+ return false;
+ }
+
+ public virtual Type[] GetRequiredCustomModifiers () {
+ return new Type [0];
+ }
+
+ public virtual Type[] GetOptionalCustomModifiers () {
+ return new Type [0];
+ }
+
+ public virtual IList<CustomAttributeData> GetCustomAttributesData () {
+ throw new NotImplementedException ();
+ }
+#endif
+
+#if !FULL_AOT_RUNTIME
+ internal static ParameterInfo New (ParameterBuilder pb, Type type, MemberInfo member, int position)
+ {
+#if NET_4_0
+ return new MonoParameterInfo (pb, type, member, position);
+#else
+ return new ParameterInfo (pb, type, member, position);
+#endif
+ }
+#endif
+
+ internal static ParameterInfo New (ParameterInfo pinfo, Type type, MemberInfo member, int position)
+ {
+#if NET_4_0
+ return new MonoParameterInfo (pinfo, type, member, position);
+#else
+ return new ParameterInfo (pinfo, type, member, position);
+#endif
+ }
+
+ internal static ParameterInfo New (ParameterInfo pinfo, MemberInfo member)
+ {
+#if NET_4_0
+ return new MonoParameterInfo (pinfo, member);
+#else
+ return new ParameterInfo (pinfo, member);
+#endif
+ }
+
+ internal static ParameterInfo New (Type type, MemberInfo member, MarshalAsAttribute marshalAs)
+ {
+#if NET_4_0
+ return new MonoParameterInfo (type, member, marshalAs);
+#else
+ return new ParameterInfo (type, member, marshalAs);
+#endif
+ }
}
}
diff --git a/mcs/class/corlib/System.Reflection/RuntimeReflectionExtensions.cs b/mcs/class/corlib/System.Reflection/RuntimeReflectionExtensions.cs
index c20453d4455..d3284fb0d78 100644
--- a/mcs/class/corlib/System.Reflection/RuntimeReflectionExtensions.cs
+++ b/mcs/class/corlib/System.Reflection/RuntimeReflectionExtensions.cs
@@ -1,8 +1,9 @@
//
// RuntimeReflectionExtensions.cs
//
-// Author:
+// Authors:
// Martin Baulig <martin.baulig@xamarin.com>
+// Marek Safar (marek.safar@gmail.com)
//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
//
@@ -23,67 +24,103 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+
#if NET_4_5
-using System;
+
using System.Collections.Generic;
namespace System.Reflection
{
public static class RuntimeReflectionExtensions
{
+ const BindingFlags AllMembersBindingFlags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance;
+
public static MethodInfo GetMethodInfo (this Delegate del)
{
- return del.GetMethodInfo ();
+ if (del == null)
+ throw new ArgumentNullException ("del");
+
+ return del.Method;
}
public static MethodInfo GetRuntimeBaseDefinition (this MethodInfo method)
{
- return method.GetRuntimeBaseDefinition ();
+ if (method == null)
+ throw new ArgumentNullException ("method");
+
+ return method.GetBaseDefinition ();
}
public static EventInfo GetRuntimeEvent (this Type type, string name)
{
- return type.GetRuntimeEvent (name);
+ if (type == null)
+ throw new ArgumentNullException ("type");
+
+ return type.GetEvent (name);
}
public static IEnumerable<EventInfo> GetRuntimeEvents (this Type type)
{
- return type.GetRuntimeEvents ();
+ if (type == null)
+ throw new ArgumentNullException ("type");
+
+ return type.GetEvents (AllMembersBindingFlags);
}
public static FieldInfo GetRuntimeField (this Type type, string name)
{
- return type.GetRuntimeField (name);
+ if (type == null)
+ throw new ArgumentNullException ("type");
+
+ return type.GetField (name);
}
public static IEnumerable<FieldInfo> GetRuntimeFields (this Type type)
{
- return type.GetRuntimeFields ();
+ if (type == null)
+ throw new ArgumentNullException ("type");
+
+ return type.GetFields (AllMembersBindingFlags);
}
public static InterfaceMapping GetRuntimeInterfaceMap (this TypeInfo typeInfo, Type interfaceType)
{
- return typeInfo.GetRuntimeInterfaceMap (interfaceType);
+ if (typeInfo == null)
+ throw new ArgumentNullException ("typeInfo");
+
+ return typeInfo.GetInterfaceMap (interfaceType);
}
public static MethodInfo GetRuntimeMethod (this Type type, string name, Type[] parameters)
{
- return type.GetRuntimeMethod (name, parameters);
+ if (type == null)
+ throw new ArgumentNullException ("type");
+
+ return type.GetMethod (name, parameters);
}
public static IEnumerable<MethodInfo> GetRuntimeMethods (this Type type)
{
- return type.GetRuntimeMethods ();
+ if (type == null)
+ throw new ArgumentNullException ("type");
+
+ return type.GetMethods (AllMembersBindingFlags);
}
public static IEnumerable<PropertyInfo> GetRuntimeProperties (this Type type)
{
- return type.GetRuntimeProperties ();
+ if (type == null)
+ throw new ArgumentNullException ("type");
+
+ return type.GetProperties (AllMembersBindingFlags);
}
public static PropertyInfo GetRuntimeProperty (this Type type, string name)
{
- return type.GetRuntimeProperty (name);
+ if (type == null)
+ throw new ArgumentNullException ("type");
+
+ return type.GetProperty (name);
}
}
}
diff --git a/mcs/class/corlib/System.Reflection/TypeAttributes.cs b/mcs/class/corlib/System.Reflection/TypeAttributes.cs
index cc73f9504d6..f08c7c8173f 100644
--- a/mcs/class/corlib/System.Reflection/TypeAttributes.cs
+++ b/mcs/class/corlib/System.Reflection/TypeAttributes.cs
@@ -128,6 +128,10 @@ namespace System.Reflection {
/// </summary>
Serializable = 8192,
+#if NET_4_5
+ WindowsRuntime = 16384,
+#endif
+
/// <summary>
/// </summary>
StringFormatMask = 196608,
diff --git a/mcs/class/corlib/System.Reflection/TypeDelegator.cs b/mcs/class/corlib/System.Reflection/TypeDelegator.cs
index 8ccb618ac8f..01b4d58841d 100644
--- a/mcs/class/corlib/System.Reflection/TypeDelegator.cs
+++ b/mcs/class/corlib/System.Reflection/TypeDelegator.cs
@@ -260,5 +260,19 @@ namespace System.Reflection {
}
}
+#if NET_4_5
+ public override bool IsConstructedGenericType {
+ get { return typeImpl.IsConstructedGenericType; }
+ }
+
+ public override bool IsAssignableFrom (TypeInfo typeInfo)
+ {
+ if (typeInfo == null)
+ throw new ArgumentNullException ("typeInfo");
+
+ return IsAssignableFrom (typeInfo.AsType ());
+ }
+#endif
+
}
}
diff --git a/mcs/class/corlib/System.Reflection/TypeInfo.cs b/mcs/class/corlib/System.Reflection/TypeInfo.cs
index b5521116e34..101aadc727e 100644
--- a/mcs/class/corlib/System.Reflection/TypeInfo.cs
+++ b/mcs/class/corlib/System.Reflection/TypeInfo.cs
@@ -41,7 +41,7 @@ namespace System.Reflection
return this;
}
- static readonly BindingFlags declaredFlags = BindingFlags.DeclaredOnly |
+ const BindingFlags declaredFlags = BindingFlags.DeclaredOnly |
BindingFlags.Public | BindingFlags.NonPublic |
BindingFlags.Static | BindingFlags.Instance;
@@ -67,13 +67,7 @@ namespace System.Reflection
public virtual IEnumerable<MemberInfo> DeclaredMembers {
get {
- var ret = new List<MemberInfo> ();
- ret.AddRange (DeclaredConstructors);
- ret.AddRange (DeclaredEvents);
- ret.AddRange (DeclaredFields);
- ret.AddRange (DeclaredMethods);
- ret.AddRange (DeclaredProperties);
- return ret.AsReadOnly ();
+ return GetMembers (declaredFlags);
}
}
@@ -87,28 +81,15 @@ namespace System.Reflection
public virtual Type[] GenericTypeParameters {
get {
if (!ContainsGenericParameters)
- return new Type [0];
+ return EmptyTypes;
+
return GetGenericArguments ();
}
}
- static bool list_contains (IEnumerable<Type> types, Type type)
- {
- foreach (var t in types) {
- if (t == type)
- return true;
- }
-
- return false;
- }
-
public virtual IEnumerable<Type> ImplementedInterfaces {
get {
- var all = GetInterfaces ();
- var baseIfaces = BaseType != null ? BaseType.GetInterfaces () : new Type [0];
- foreach (var iface in all)
- if (!list_contains (baseIfaces, iface))
- yield return iface;
+ return GetInterfaces ();
}
}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs b/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
index a3134933a31..a66a8dc7ae2 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
@@ -187,6 +187,12 @@ namespace System.Runtime.InteropServices
throw new NotImplementedException ();
}
+#if NET_4_5
+ public static IntPtr CreateAggregatedObject<T> (IntPtr pOuter, T o) {
+ return CreateAggregatedObject (pOuter, (object)o);
+ }
+#endif
+
#if !FULL_AOT_RUNTIME
public static object CreateWrapperOfType (object o, Type t)
{
@@ -204,12 +210,24 @@ namespace System.Runtime.InteropServices
return ComInteropProxy.GetProxy (co.IUnknown, t).GetTransparentProxy ();
}
+
+#if NET_4_5
+ public static TWrapper CreateWrapperOfType<T, TWrapper> (T o) {
+ return (TWrapper)CreateWrapperOfType ((object)o, typeof (TWrapper));
+ }
+#endif
#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)]
[ComVisible (true)]
public extern static void DestroyStructure (IntPtr ptr, Type structuretype);
+#if NET_4_5
+ public static void DestroyStructure<T> (IntPtr ptr) {
+ DestroyStructure (ptr, typeof (T));
+ }
+#endif
+
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static void FreeBSTR (IntPtr ptr);
@@ -329,6 +347,12 @@ namespace System.Runtime.InteropServices
#endif
}
+#if NET_4_5
+ public static IntPtr GetComInterfaceForObject<T, TInterface> (T o) {
+ return GetComInterfaceForObject ((object)o, typeof (T));
+ }
+#endif
+
[MonoTODO]
public static IntPtr GetComInterfaceForObjectInContext (object o, Type t)
{
@@ -463,6 +487,12 @@ namespace System.Runtime.InteropServices
Marshal.StructureToPtr(vt, pDstNativeVariant, false);
}
+#if NET_4_5
+ public static void GetNativeVariantForObject<T> (T obj, IntPtr pDstNativeVariant) {
+ GetNativeVariantForObject ((object)obj, pDstNativeVariant);
+ }
+#endif
+
#if !MOBILE
[MethodImplAttribute (MethodImplOptions.InternalCall)]
private static extern object GetObjectForCCW (IntPtr pUnk);
@@ -489,6 +519,13 @@ namespace System.Runtime.InteropServices
return vt.GetValue();
}
+#if NET_4_5
+ public static T GetObjectForNativeVariant<T> (IntPtr pSrcNativeVariant) {
+ Variant vt = (Variant)Marshal.PtrToStructure(pSrcNativeVariant, typeof(Variant));
+ return (T)vt.GetValue();
+ }
+#endif
+
public static object[] GetObjectsForNativeVariants (IntPtr aSrcNativeVariant, int cVars)
{
if (cVars < 0)
@@ -500,6 +537,18 @@ namespace System.Runtime.InteropServices
return objects;
}
+#if NET_4_5
+ public static T[] GetObjectsForNativeVariants<T> (IntPtr aSrcNativeVariant, int cVars) {
+ if (cVars < 0)
+ throw new ArgumentOutOfRangeException ("cVars", "cVars cannot be a negative number.");
+ T[] objects = new T[cVars];
+ for (int i = 0; i < cVars; i++)
+ objects[i] = GetObjectForNativeVariant<T> ((IntPtr)(aSrcNativeVariant.ToInt64 () +
+ i * SizeOf (typeof(Variant))));
+ return objects;
+ }
+#endif
+
[MonoTODO]
public static int GetStartComSlot (Type t)
{
@@ -639,6 +688,12 @@ namespace System.Runtime.InteropServices
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static IntPtr OffsetOf (Type t, string fieldName);
+#if NET_4_5
+ public static IntPtr OffsetOf<T> (string fieldName) {
+ return OffsetOf (typeof (T), fieldName);
+ }
+#endif
+
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static void Prelink (MethodInfo m);
@@ -687,6 +742,16 @@ namespace System.Runtime.InteropServices
[ComVisible (true)]
public extern static object PtrToStructure (IntPtr ptr, Type structureType);
+#if NET_4_5
+ public static void PtrToStructure<T> (IntPtr ptr, T structure) {
+ PtrToStructure (ptr, (object)structure);
+ }
+
+ public static object PtrToStructure<T> (IntPtr ptr) {
+ return PtrToStructure (ptr, typeof (T));
+ }
+#endif
+
#if !MOBILE
[MethodImplAttribute (MethodImplOptions.InternalCall)]
private extern static int QueryInterfaceInternal (IntPtr pUnk, ref Guid iid, out IntPtr ppv);
@@ -913,6 +978,16 @@ namespace System.Runtime.InteropServices
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static int SizeOf (Type t);
+#if NET_4_5
+ public static int SizeOf<T> () {
+ return SizeOf (typeof (T));
+ }
+
+ public static int SizeOf<T> (T structure) {
+ return SizeOf (structure.GetType ());
+ }
+#endif
+
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static IntPtr StringToBSTR (string s);
@@ -1059,6 +1134,12 @@ namespace System.Runtime.InteropServices
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static void StructureToPtr (object structure, IntPtr ptr, bool fDeleteOld);
+#if NET_4_5
+ public static void StructureToPtr<T> (T structure, IntPtr ptr, bool fDeleteOld) {
+ StructureToPtr ((object)structure, ptr, fDeleteOld);
+ }
+#endif
+
public static void ThrowExceptionForHR (int errorCode) {
Exception ex = GetExceptionForHR (errorCode);
if (ex != null)
@@ -1074,6 +1155,12 @@ namespace System.Runtime.InteropServices
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static IntPtr UnsafeAddrOfPinnedArrayElement (Array arr, int index);
+#if NET_4_5
+ public static IntPtr UnsafeAddrOfPinnedArrayElement<T> (T[] arr, int index) {
+ return UnsafeAddrOfPinnedArrayElement ((Array)arr, index);
+ }
+#endif
+
public static void WriteByte (IntPtr ptr, byte val)
{
unsafe {
@@ -1266,6 +1353,12 @@ namespace System.Runtime.InteropServices
return GetDelegateForFunctionPointerInternal (ptr, t);
}
+#if NET_4_5
+ public static Delegate GetDelegateForFunctionPointer<T> (IntPtr ptr) {
+ return GetDelegateForFunctionPointer (ptr, typeof (T));
+ }
+#endif
+
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern IntPtr GetFunctionPointerForDelegateInternal (Delegate d);
@@ -1276,5 +1369,14 @@ namespace System.Runtime.InteropServices
return GetFunctionPointerForDelegateInternal (d);
}
+
+#if NET_4_5
+ public static IntPtr GetFunctionPointerForDelegate<TDelegate> (TDelegate d) {
+ if (d == null)
+ throw new ArgumentNullException ("d");
+
+ return GetFunctionPointerForDelegateInternal ((Delegate)(object)d);
+ }
+#endif
}
}
diff --git a/mcs/class/corlib/System.Runtime/GCLatencyMode.cs b/mcs/class/corlib/System.Runtime/GCLatencyMode.cs
index 695d3e562f1..8274d34596a 100644
--- a/mcs/class/corlib/System.Runtime/GCLatencyMode.cs
+++ b/mcs/class/corlib/System.Runtime/GCLatencyMode.cs
@@ -34,6 +34,9 @@ namespace System.Runtime
{
Batch = 0,
Interactive = 1,
- LowLatency = 2
+ LowLatency = 2,
+#if NET_4_5
+ SustainedLowLatency = 3
+#endif
}
}
diff --git a/mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs b/mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs
index 03cbfe1a8fb..4cd3779172c 100644
--- a/mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs
@@ -235,7 +235,7 @@ namespace System.Security.Cryptography {
HashAlgorithm hash = null;
if (halg is String)
- hash = HashAlgorithm.Create ((String)halg);
+ hash = GetHashFromString ((string) halg);
else if (halg is HashAlgorithm)
hash = (HashAlgorithm) halg;
else if (halg is Type)
@@ -243,8 +243,25 @@ namespace System.Security.Cryptography {
else
throw new ArgumentException ("halg");
+ if (hash == null)
+ throw new ArgumentException (
+ "Could not find provider for halg='" + halg + "'.",
+ "halg");
+
return hash;
}
+
+ private HashAlgorithm GetHashFromString (string name)
+ {
+ HashAlgorithm hash = HashAlgorithm.Create (name);
+ if (hash != null)
+ return hash;
+ try {
+ return HashAlgorithm.Create (GetHashNameFromOID (name));
+ } catch (CryptographicException e) {
+ throw new ArgumentException (e.Message, "halg", e);
+ }
+ }
// NOTE: this method can work with ANY configured (OID in machine.config)
// HashAlgorithm descendant
diff --git a/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs b/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs
index 14f07dd98c8..8c431515299 100644
--- a/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs
+++ b/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs
@@ -244,7 +244,7 @@ namespace System.Security.Principal {
else {
// validate token by getting name
_name = GetTokenName (_token);
- if ((_name == String.Empty) || (_name == null))
+ if (_name == null)
throw new SerializationException ("Token doesn't match a user.");
}
_type = _info.GetString ("m_type");
diff --git a/mcs/class/corlib/System.Text/Decoder.cs b/mcs/class/corlib/System.Text/Decoder.cs
index cf2e6f23efc..c44176989c8 100644
--- a/mcs/class/corlib/System.Text/Decoder.cs
+++ b/mcs/class/corlib/System.Text/Decoder.cs
@@ -108,10 +108,11 @@ public abstract class Decoder
CheckArguments (chars, charCount, bytes, byteCount);
char [] carr = new char [charCount];
- Marshal.Copy ((IntPtr) chars, carr, 0, charCount);
byte [] barr = new byte [byteCount];
Marshal.Copy ((IntPtr) bytes, barr, 0, byteCount);
- return GetChars (barr, 0, byteCount, carr, 0, flush);
+ int charsUsed = GetChars (barr, 0, byteCount, carr, 0, flush);
+ Marshal.Copy (carr, 0, (IntPtr) chars, charsUsed);
+ return charsUsed;
}
[ComVisible (false)]
diff --git a/mcs/class/corlib/System.Text/UTF8Encoding.cs b/mcs/class/corlib/System.Text/UTF8Encoding.cs
index bdd80e8a626..1aa56bc9f29 100644
--- a/mcs/class/corlib/System.Text/UTF8Encoding.cs
+++ b/mcs/class/corlib/System.Text/UTF8Encoding.cs
@@ -852,7 +852,14 @@ fail_no_space:
if (charCount < 0) {
throw new ArgumentOutOfRangeException ("charCount", _("ArgRange_NonNegative"));
}
- return charCount * 4;
+
+ // Add 1 to charCount since there may be a lead surrogate left from the previous call to GetBytes/Encoder.Convert
+ charCount = charCount + 1;
+ if (EncoderFallback.MaxCharCount > 1) {
+ charCount = charCount * EncoderFallback.MaxCharCount;
+ }
+
+ return charCount * 3;
}
// Get the maximum number of characters needed to decode a
@@ -862,7 +869,14 @@ fail_no_space:
if (byteCount < 0) {
throw new ArgumentOutOfRangeException ("byteCount", _("ArgRange_NonNegative"));
}
- return byteCount;
+
+ // Add 1 to byteCount since there may be the bytes from part of a surrogate pair left from the previous call to GetChars/Decoder.Convert
+ int maxCharCount = byteCount + 1;
+ if (DecoderFallback.MaxCharCount > 1) {
+ maxCharCount = maxCharCount * DecoderFallback.MaxCharCount;
+ }
+
+ return maxCharCount;
}
// Get a UTF8-specific decoder that is attached to this instance.
diff --git a/mcs/class/corlib/System.Threading.Tasks/CyclicDeque.cs b/mcs/class/corlib/System.Threading.Tasks/CyclicDeque.cs
index 21c7884b084..d0b723d285e 100644
--- a/mcs/class/corlib/System.Threading.Tasks/CyclicDeque.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/CyclicDeque.cs
@@ -43,22 +43,20 @@ namespace System.Threading.Tasks
{
const int BaseSize = 11;
- long bottom;
- long top;
- long upperBound;
+ int bottom;
+ int top;
+ int upperBound;
CircularArray<T> array = new CircularArray<T> (BaseSize);
public void PushBottom (T obj)
{
- /* Read is implemented as a simple load operation on 64bits
- * so no need to make the distinction ourselves
- */
- long b = Interlocked.Read (ref bottom);
+ int b = bottom;
var a = array;
// Take care of growing
- if (b - upperBound >= a.Size - 1) {
- upperBound = Interlocked.Read (ref top);
+ var size = b - top - upperBound;
+ if (size > a.Size) {
+ upperBound = top;
a = a.Grow (b, upperBound);
array = a;
}
@@ -72,10 +70,10 @@ namespace System.Threading.Tasks
{
obj = default (T);
- long b = Interlocked.Decrement (ref bottom);
+ int b = Interlocked.Decrement (ref bottom);
var a = array;
- long t = Interlocked.Read (ref top);
- long size = b - t;
+ int t = top;
+ int size = b - t;
if (size < 0) {
// Set bottom to t
@@ -98,10 +96,10 @@ namespace System.Threading.Tasks
{
obj = default (T);
- long b = Interlocked.Decrement (ref bottom);
+ int b = Interlocked.Decrement (ref bottom);
var a = array;
- long t = Interlocked.Read (ref top);
- long size = b - t;
+ int t = top;
+ int size = b - t;
if (size < 0)
return false;
@@ -114,8 +112,8 @@ namespace System.Threading.Tasks
{
obj = default (T);
- long t = Interlocked.Read (ref top);
- long b = Interlocked.Read (ref bottom);
+ int t = top;
+ int b = bottom;
if (b - t <= 0)
return PopResult.Empty;
@@ -133,8 +131,8 @@ namespace System.Threading.Tasks
{
obj = default (T);
- long t = Interlocked.Read (ref top);
- long b = Interlocked.Read (ref bottom);
+ int t = top;
+ int b = bottom;
if (b - t <= 0)
return false;
@@ -153,8 +151,8 @@ namespace System.Threading.Tasks
public bool IsEmpty {
get {
- long t = Interlocked.Read (ref top);
- long b = Interlocked.Read (ref bottom);
+ int t = top;
+ int b = bottom;
return b - t <= 0;
}
}
@@ -173,13 +171,13 @@ namespace System.Threading.Tasks
this.segment = new T[size];
}
- public long Size {
+ public int Size {
get {
return size;
}
}
- public T this[long index] {
+ public T this[int index] {
get {
return segment[index % size];
}
@@ -188,32 +186,32 @@ namespace System.Threading.Tasks
}
}
- public CircularArray<T> Grow (long bottom, long top)
+ public CircularArray<T> Grow (int bottom, int top)
{
var grow = new CircularArray<T> (baseSize + 1);
- for (long i = top; i < bottom; i++) {
+ for (int i = top; i < bottom; i++) {
grow.segment[i] = segment[i % size];
}
return grow;
}
- public IEnumerable<T> GetEnumerable (long bottom, ref long top)
+ public IEnumerable<T> GetEnumerable (int bottom, ref int top)
{
- long instantTop = top;
+ int instantTop = top;
T[] slice = new T[bottom - instantTop];
int destIndex = -1;
- for (long i = instantTop; i < bottom; i++)
+ for (int i = instantTop; i < bottom; i++)
slice[++destIndex] = segment[i % size];
return RealGetEnumerable (slice, bottom, top, instantTop);
}
- IEnumerable<T> RealGetEnumerable (T[] slice, long bottom, long realTop, long initialTop)
+ IEnumerable<T> RealGetEnumerable (T[] slice, int bottom, int realTop, int initialTop)
{
int destIndex = (int)(realTop - initialTop - 1);
- for (long i = realTop; i < bottom; ++i)
+ for (int i = realTop; i < bottom; ++i)
yield return slice[++destIndex];
}
}
diff --git a/mcs/class/corlib/System.Threading.Tasks/Parallel.cs b/mcs/class/corlib/System.Threading.Tasks/Parallel.cs
index c175441792c..d62df9a7e68 100644
--- a/mcs/class/corlib/System.Threading.Tasks/Parallel.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/Parallel.cs
@@ -203,7 +203,7 @@ namespace System.Threading.Tasks
long old;
StealValue64 val = new StealValue64 ();
- old = sixtyfour ? range.V64.Value : Interlocked.CompareExchange (ref range.V64.Value, 0, 0);
+ old = Thread.VolatileRead (ref range.V64.Value);
val.Value = old;
if (val.Actual >= stopIndex - val.Stolen - 2)
diff --git a/mcs/class/corlib/System.Threading.Tasks/Task.cs b/mcs/class/corlib/System.Threading.Tasks/Task.cs
index 5133e20351d..1ae5559957e 100644
--- a/mcs/class/corlib/System.Threading.Tasks/Task.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/Task.cs
@@ -49,8 +49,8 @@ namespace System.Threading.Tasks
// parent is the outer task in which this task is created
readonly Task parent;
- // contAncestor is the Task on which this continuation was setup
- readonly Task contAncestor;
+ // A reference to a Task on which this continuation is attached to
+ Task contAncestor;
static int id = -1;
static readonly TaskFactory defaultFactory = new TaskFactory ();
@@ -214,7 +214,6 @@ namespace System.Threading.Tasks
internal void RunSynchronouslyCore (TaskScheduler scheduler)
{
SetupScheduler (scheduler);
- var saveStatus = status;
Status = TaskStatus.WaitingToRun;
try {
@@ -224,8 +223,7 @@ namespace System.Threading.Tasks
throw new TaskSchedulerException (inner);
}
- Status = saveStatus;
- Start (scheduler);
+ Schedule ();
Wait ();
}
#endregion
@@ -502,7 +500,9 @@ namespace System.Threading.Tasks
void InnerInvoke ()
{
if (IsContinuation) {
- invoker.Invoke (contAncestor, state, this);
+ var ancestor = contAncestor;
+ contAncestor = null;
+ invoker.Invoke (ancestor, state, this);
} else {
invoker.Invoke (this, state, this);
}
@@ -959,11 +959,23 @@ namespace System.Threading.Tasks
if (millisecondsDelay < -1)
throw new ArgumentOutOfRangeException ("millisecondsDelay");
- var task = new Task (TaskActionInvoker.Delay, millisecondsDelay, cancellationToken, TaskCreationOptions.None, null, TaskConstants.Finished);
- task.SetupScheduler (TaskScheduler.Current);
-
- if (millisecondsDelay != Timeout.Infinite)
- task.scheduler.QueueTask (task);
+ if (cancellationToken.IsCancellationRequested)
+ return TaskConstants.Canceled;
+
+ var task = new Task (TaskActionInvoker.Empty, null, cancellationToken, TaskCreationOptions.None, null, null);
+ task.SetupScheduler (TaskScheduler.Default);
+
+ if (millisecondsDelay != Timeout.Infinite) {
+ var timer = new Timer (delegate (object state) {
+ var t = (Task) state;
+ if (t.Status == TaskStatus.WaitingForActivation) {
+ t.Status = TaskStatus.Running;
+ t.Finish ();
+ }
+ }, task, millisecondsDelay, -1);
+
+ task.ContinueWith (new DisposeContinuation (timer));
+ }
return task;
}
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs b/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs
index 513b09968b1..412bcf1cfaa 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs
@@ -290,12 +290,10 @@ namespace System.Threading.Tasks
sealed class FuncTaskSelected<TResult> : TaskActionInvoker
{
readonly Func<Task, TResult> action;
- readonly Task[] tasks;
- public FuncTaskSelected (Func<Task, TResult> action, Task[] tasks)
+ public FuncTaskSelected (Func<Task, TResult> action)
{
this.action = action;
- this.tasks = tasks;
}
public override Delegate Action {
@@ -306,8 +304,8 @@ namespace System.Threading.Tasks
public override void Invoke (Task owner, object state, Task context)
{
- var result = ((Task<int>) owner).Result;
- ((Task<TResult>) context).Result = action (tasks[result]);
+ var result = ((Task<Task>) owner).Result;
+ ((Task<TResult>) context).Result = action (result);
}
}
@@ -492,9 +490,9 @@ namespace System.Threading.Tasks
return new ActionTaskSelected (action);
}
- public static TaskActionInvoker Create<TResult> (Func<Task, TResult> action, Task[] tasks)
+ public static TaskActionInvoker CreateSelected<TResult> (Func<Task, TResult> action)
{
- return new FuncTaskSelected<TResult> (action, tasks);
+ return new FuncTaskSelected<TResult> (action);
}
#endregion
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskContinuation.cs b/mcs/class/corlib/System.Threading.Tasks/TaskContinuation.cs
index 8189df744b8..9825be78000 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskContinuation.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskContinuation.cs
@@ -338,6 +338,21 @@ namespace System.Threading.Tasks
evt.Signal ();
}
}
+
+ sealed class DisposeContinuation : IContinuation
+ {
+ readonly IDisposable instance;
+
+ public DisposeContinuation (IDisposable instance)
+ {
+ this.instance = instance;
+ }
+
+ public void Execute ()
+ {
+ instance.Dispose ();
+ }
+ }
}
#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskFactory.cs b/mcs/class/corlib/System.Threading.Tasks/TaskFactory.cs
index 9330fd40a5a..607f08da4ec 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskFactory.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskFactory.cs
@@ -305,7 +305,7 @@ namespace System.Threading.Tasks
{
CheckContinueArguments (tasks, continuationFunction, continuationOptions, scheduler);
- var cont = Task.WhenAnyCore (tasks).ContinueWith<TResult> (TaskActionInvoker.Create (continuationFunction, tasks), cancellationToken, continuationOptions, scheduler);
+ var cont = Task.WhenAnyCore (tasks).ContinueWith<TResult> (TaskActionInvoker.CreateSelected (continuationFunction), cancellationToken, continuationOptions, scheduler);
return cont;
}
diff --git a/mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs b/mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs
index c38a566e2cc..e1c9a6842ca 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs
@@ -50,7 +50,7 @@ namespace System.Threading.Tasks
return;
}
- ThreadPool.UnsafeQueueUserWorkItem (callback, task);
+ ThreadPool.QueueWorkItem (callback, task);
}
static void TaskExecuterCallback (object obj)
diff --git a/mcs/class/corlib/System.Threading/CancellationToken.cs b/mcs/class/corlib/System.Threading/CancellationToken.cs
index 0025debb836..82c7094ef64 100644
--- a/mcs/class/corlib/System.Threading/CancellationToken.cs
+++ b/mcs/class/corlib/System.Threading/CancellationToken.cs
@@ -85,7 +85,7 @@ namespace System.Threading
public void ThrowIfCancellationRequested ()
{
- if (Source.IsCancellationRequested)
+ if (source != null && source.IsCancellationRequested)
throw new OperationCanceledException (this);
}
diff --git a/mcs/class/corlib/System.Threading/ManualResetEventSlim.cs b/mcs/class/corlib/System.Threading/ManualResetEventSlim.cs
index a3a0fadfa99..a34370d460b 100644
--- a/mcs/class/corlib/System.Threading/ManualResetEventSlim.cs
+++ b/mcs/class/corlib/System.Threading/ManualResetEventSlim.cs
@@ -38,7 +38,7 @@ namespace System.Threading
ManualResetEvent handle;
internal AtomicBooleanValue disposed;
int used;
- long state;
+ int state;
public ManualResetEventSlim ()
: this (false, 10)
@@ -89,10 +89,10 @@ namespace System.Threading
long UpdateStateWithOp (bool set)
{
- long oldValue, newValue;
+ int oldValue, newValue;
do {
oldValue = state;
- newValue = (long)(((oldValue >> 1) + 1) << 1) | (set ? 1u : 0u);
+ newValue = (int)(((oldValue >> 1) + 1) << 1) | (set ? 1 : 0);
} while (Interlocked.CompareExchange (ref state, newValue, oldValue) != oldValue);
return newValue;
}
@@ -119,7 +119,7 @@ namespace System.Threading
* we have a mismatch between S and H at the end because the last operations done were
* S3/H1. We thus need to repeat H3 to get to the desired final state.
*/
- long currentState;
+ int currentState;
do {
currentState = state;
if (currentState != stamp && (stamp & 1) != (currentState & 1)) {
@@ -164,8 +164,6 @@ namespace System.Threading
SpinWait wait = new SpinWait ();
while (!IsSet) {
- cancellationToken.ThrowIfCancellationRequested ();
-
if (wait.Count < spinCount) {
wait.SpinOnce ();
continue;
@@ -174,6 +172,8 @@ namespace System.Threading
break;
}
+ cancellationToken.ThrowIfCancellationRequested ();
+
if (IsSet)
return true;
diff --git a/mcs/class/corlib/System.Threading/SynchronizationContext.cs b/mcs/class/corlib/System.Threading/SynchronizationContext.cs
index 5c4cedf15b0..719f43020e0 100644
--- a/mcs/class/corlib/System.Threading/SynchronizationContext.cs
+++ b/mcs/class/corlib/System.Threading/SynchronizationContext.cs
@@ -98,11 +98,9 @@ namespace System.Threading
}
#endif
- [MonoTODO]
protected void SetWaitNotificationRequired ()
{
notification_required = true;
- throw new NotImplementedException ();
}
[CLSCompliant (false)]
diff --git a/mcs/class/corlib/System.Threading/Thread.cs b/mcs/class/corlib/System.Threading/Thread.cs
index 8fd3dfd96b6..813c458f949 100644
--- a/mcs/class/corlib/System.Threading/Thread.cs
+++ b/mcs/class/corlib/System.Threading/Thread.cs
@@ -903,14 +903,11 @@ namespace System.Threading {
public bool TrySetApartmentState (ApartmentState state)
{
- /* Only throw this exception when changing the
- * state of another thread. See bug 324338
- */
- if ((this != CurrentThread) &&
- (ThreadState & ThreadState.Unstarted) == 0)
+ if ((ThreadState & ThreadState.Unstarted) == 0)
throw new ThreadStateException ("Thread was in an invalid state for the operation being executed.");
- if ((ApartmentState)Internal.apartment_state != ApartmentState.Unknown)
+ if ((ApartmentState)Internal.apartment_state != ApartmentState.Unknown &&
+ (ApartmentState)Internal.apartment_state != state)
return false;
Internal.apartment_state = (byte)state;
diff --git a/mcs/class/corlib/System.Threading/ThreadPool.cs b/mcs/class/corlib/System.Threading/ThreadPool.cs
index 4d3f1c086cf..204386f9f70 100644
--- a/mcs/class/corlib/System.Threading/ThreadPool.cs
+++ b/mcs/class/corlib/System.Threading/ThreadPool.cs
@@ -87,9 +87,6 @@ namespace System.Threading {
if (ar == null)
return false;
} else {
- if (!callBack.HasSingleTarget)
- throw new Exception ("The delegate must have only one target");
-
AsyncResult ares = new AsyncResult (callBack, state, true);
pool_queue (ares);
}
@@ -99,6 +96,12 @@ namespace System.Threading {
[MethodImplAttribute(MethodImplOptions.InternalCall)]
static extern void pool_queue (AsyncResult ares);
+ // TODO: It should be interface interface only to avoid extra allocation
+ internal static void QueueWorkItem (WaitCallback callBack, object state)
+ {
+ pool_queue (new AsyncResult (callBack, state, false));
+ }
+
public static RegisteredWaitHandle RegisterWaitForSingleObject (WaitHandle waitObject,
WaitOrTimerCallback callBack,
object state,
@@ -168,11 +171,11 @@ namespace System.Threading {
[SecurityPermission (SecurityAction.Demand, ControlEvidence=true, ControlPolicy=true)]
public static bool UnsafeQueueUserWorkItem (WaitCallback callBack, object state)
{
+ if (callBack == null)
+ throw new ArgumentNullException ("callBack");
+
// no stack propagation here (that's why it's unsafe and requires extra security permissions)
if (!callBack.IsTransparentProxy ()) {
- if (!callBack.HasSingleTarget)
- throw new Exception ("The delegate must have only one target");
-
AsyncResult ares = new AsyncResult (callBack, state, false);
pool_queue (ares);
return true;
diff --git a/mcs/class/corlib/System.Threading/Timer.cs b/mcs/class/corlib/System.Threading/Timer.cs
index 22786f65881..dd32032436f 100644
--- a/mcs/class/corlib/System.Threading/Timer.cs
+++ b/mcs/class/corlib/System.Threading/Timer.cs
@@ -311,13 +311,10 @@ namespace System.Threading
return idx;
}
- static WaitCallback TimerCaller = new WaitCallback (TimerCB);
static void TimerCB (object o)
{
Timer timer = (Timer) o;
- try {
- timer.callback (timer.state);
- } catch {}
+ timer.callback (timer.state);
}
void SchedulerThread ()
@@ -340,7 +337,7 @@ namespace System.Threading
list.RemoveAt (i);
count--;
i--;
- ThreadPool.UnsafeQueueUserWorkItem (TimerCaller, timer);
+ ThreadPool.QueueWorkItem (TimerCB, timer);
long period = timer.period_ms;
long due_time = timer.due_time_ms;
bool no_more = (period == -1 || ((period == 0 || period == Timeout.Infinite) && due_time != Timeout.Infinite));
diff --git a/mcs/class/corlib/System/AggregateException.cs b/mcs/class/corlib/System/AggregateException.cs
index 145319acdd0..c0df741af12 100644
--- a/mcs/class/corlib/System/AggregateException.cs
+++ b/mcs/class/corlib/System/AggregateException.cs
@@ -163,7 +163,7 @@ namespace System
public override Exception GetBaseException ()
{
- if (innerExceptions == null || innerExceptions.Count == 0)
+ if (innerExceptions == null || innerExceptions.Count != 1)
return this;
return innerExceptions[0].GetBaseException ();
}
diff --git a/mcs/class/corlib/System/Array.cs b/mcs/class/corlib/System/Array.cs
index 91654019f14..756378c56d8 100644
--- a/mcs/class/corlib/System/Array.cs
+++ b/mcs/class/corlib/System/Array.cs
@@ -2864,32 +2864,54 @@ namespace System
{
if (array == null)
throw new ArgumentNullException ("array");
+
+ if (match == null)
+ throw new ArgumentNullException ("match");
- return FindLastIndex<T> (array, 0, array.Length, match);
+ return GetLastIndex (array, 0, array.Length, match);
}
public static int FindLastIndex<T> (T [] array, int startIndex, Predicate<T> match)
{
if (array == null)
throw new ArgumentNullException ();
+
+ if (startIndex < 0 || (uint) startIndex > (uint) array.Length)
+ throw new ArgumentOutOfRangeException ("startIndex");
+
+ if (match == null)
+ throw new ArgumentNullException ("match");
- return FindLastIndex<T> (array, startIndex, array.Length - startIndex, match);
+ return GetLastIndex (array, 0, startIndex + 1, match);
}
public static int FindLastIndex<T> (T [] array, int startIndex, int count, Predicate<T> match)
{
if (array == null)
throw new ArgumentNullException ("array");
+
if (match == null)
throw new ArgumentNullException ("match");
+
+ if (startIndex < 0 || (uint) startIndex > (uint) array.Length)
+ throw new ArgumentOutOfRangeException ("startIndex");
- if (startIndex > array.Length || startIndex + count > array.Length)
- throw new ArgumentOutOfRangeException ();
-
- for (int i = startIndex + count - 1; i >= startIndex; i--)
- if (match (array [i]))
+ if (count < 0)
+ throw new ArgumentOutOfRangeException ("count");
+
+ if (startIndex - count + 1 < 0)
+ throw new ArgumentOutOfRangeException ("count must refer to a location within the array");
+
+ return GetLastIndex (array, startIndex - count + 1, count, match);
+ }
+
+ internal static int GetLastIndex<T> (T[] array, int startIndex, int count, Predicate<T> match)
+ {
+ // unlike FindLastIndex, takes regular params for search range
+ for (int i = startIndex + count; i != startIndex;)
+ if (match (array [--i]))
return i;
-
+
return -1;
}
@@ -2897,16 +2919,25 @@ namespace System
{
if (array == null)
throw new ArgumentNullException ("array");
+
+ if (match == null)
+ throw new ArgumentNullException ("match");
- return FindIndex<T> (array, 0, array.Length, match);
+ return GetIndex (array, 0, array.Length, match);
}
public static int FindIndex<T> (T [] array, int startIndex, Predicate<T> match)
{
if (array == null)
throw new ArgumentNullException ("array");
-
- return FindIndex<T> (array, startIndex, array.Length - startIndex, match);
+
+ if (startIndex < 0 || (uint) startIndex > (uint) array.Length)
+ throw new ArgumentOutOfRangeException ("startIndex");
+
+ if (match == null)
+ throw new ArgumentNullException ("match");
+
+ return GetIndex (array, startIndex, array.Length - startIndex, match);
}
public static int FindIndex<T> (T [] array, int startIndex, int count, Predicate<T> match)
@@ -2914,13 +2945,22 @@ namespace System
if (array == null)
throw new ArgumentNullException ("array");
- if (match == null)
- throw new ArgumentNullException ("match");
+ if (startIndex < 0)
+ throw new ArgumentOutOfRangeException ("startIndex");
- if (startIndex > array.Length || startIndex + count > array.Length)
- throw new ArgumentOutOfRangeException ();
-
- for (int i = startIndex; i < startIndex + count; i ++)
+ if (count < 0)
+ throw new ArgumentOutOfRangeException ("count");
+
+ if ((uint) startIndex + (uint) count > (uint) array.Length)
+ throw new ArgumentOutOfRangeException ("index and count exceed length of list");
+
+ return GetIndex (array, startIndex, count, match);
+ }
+
+ internal static int GetIndex<T> (T[] array, int startIndex, int count, Predicate<T> match)
+ {
+ int end = startIndex + count;
+ for (int i = startIndex; i < end; i ++)
if (match (array [i]))
return i;
diff --git a/mcs/class/corlib/System/Console.cs b/mcs/class/corlib/System/Console.cs
index 9eba75f6ed5..08f8a4c1da1 100644
--- a/mcs/class/corlib/System/Console.cs
+++ b/mcs/class/corlib/System/Console.cs
@@ -94,12 +94,6 @@ namespace System
private static TextWriter stderr;
private static TextReader stdin;
-#if NET_4_5 && !MOBILE
- static TextWriter console_stdout;
- static TextWriter console_stderr;
- static TextReader console_stdin;
-#endif
-
static Console ()
{
#if NET_2_1
@@ -161,7 +155,7 @@ namespace System
// FULL_AOT_RUNTIME is used (instead of MONOTOUCH) since we only want this code when running on
// iOS (simulator or devices) and *not* when running tools (e.g. btouch #12179) that needs to use
// the mscorlib.dll shipped with Xamarin.iOS
-#if FULL_AOT_RUNTIME
+#if MONOTOUCH && FULL_AOT_RUNTIME
stdout = new NSLogWriter ();
#else
stdout = new UnexceptionalStreamWriter (OpenStandardOutput (0), outputEncoding);
@@ -169,7 +163,7 @@ namespace System
#endif
stdout = TextWriter.Synchronized (stdout, true);
-#if FULL_AOT_RUNTIME
+#if MONOTOUCH && FULL_AOT_RUNTIME
stderr = new NSLogWriter ();
#else
stderr = new UnexceptionalStreamWriter (OpenStandardError (0), outputEncoding);
@@ -183,12 +177,6 @@ namespace System
}
#endif
-#if NET_4_5 && !MOBILE
- console_stderr = stderr;
- console_stdout = stdout;
- console_stdin = stdin;
-#endif
-
#if MONODROID
if (LogcatTextWriter.IsRunningOnAndroid ()) {
stdout = TextWriter.Synchronized (new LogcatTextWriter ("mono-stdout", stdout));
@@ -676,19 +664,19 @@ namespace System
#if NET_4_5
public static bool IsErrorRedirected {
get {
- return stderr != console_stderr || ConsoleDriver.IsErrorRedirected;
+ return ConsoleDriver.IsErrorRedirected;
}
}
public static bool IsOutputRedirected {
get {
- return stdout != console_stdout || ConsoleDriver.IsOutputRedirected;
+ return ConsoleDriver.IsOutputRedirected;
}
}
public static bool IsInputRedirected {
get {
- return stdin != console_stdin || ConsoleDriver.IsInputRedirected;
+ return ConsoleDriver.IsInputRedirected;
}
}
#endif
diff --git a/mcs/class/corlib/System/Console.iOS.cs b/mcs/class/corlib/System/Console.iOS.cs
index 17983c53c92..6a5f7147128 100644
--- a/mcs/class/corlib/System/Console.iOS.cs
+++ b/mcs/class/corlib/System/Console.iOS.cs
@@ -19,9 +19,11 @@ namespace System {
public static partial class Console {
class NSLogWriter : TextWriter {
-
[DllImport ("__Internal", CharSet=CharSet.Unicode)]
extern static void monotouch_log (string s);
+
+ [DllImport ("/usr/lib/libSystem.dylib")]
+ extern static int write (int fd, byte [] buffer, int n);
StringBuilder sb;
@@ -33,15 +35,27 @@ namespace System {
public override System.Text.Encoding Encoding {
get { return System.Text.Encoding.UTF8; }
}
+
+ static void direct_write_to_stdout (string s)
+ {
+ byte [] b = Encoding.Default.GetBytes (s);
+ while (write (1, b, b.Length) == -1 && Marshal.GetLastWin32Error () == /* EINTR*/ 4)
+ ;
+ }
public override void Flush ()
{
+ string s = sb.ToString ();
try {
- monotouch_log (sb.ToString ());
- sb.Length = 0;
+ monotouch_log (s);
}
catch (Exception) {
+ try {
+ direct_write_to_stdout (s);
+ direct_write_to_stdout (Environment.NewLine);
+ } catch (Exception){}
}
+ sb.Length = 0;
}
// minimum to override - see http://msdn.microsoft.com/en-us/library/system.io.textwriter.aspx
@@ -88,4 +102,4 @@ namespace System {
}
}
-#endif \ No newline at end of file
+#endif
diff --git a/mcs/class/corlib/System/Convert.cs b/mcs/class/corlib/System/Convert.cs
index ae3b87120a7..a17181f38ba 100644
--- a/mcs/class/corlib/System/Convert.cs
+++ b/mcs/class/corlib/System/Convert.cs
@@ -1,12 +1,13 @@
//
// System.Convert.cs
//
-// Author:
+// Authors:
// Derek Holden (dholden@draper.com)
// Duncan Mak (duncan@ximian.com)
+// Marek Safar (marek.safar@gmail.com)
//
// (C) Ximian, Inc. http://www.ximian.com
-//
+// Copyright (C) 2013 Xamarin Inc (http://www.xamarin.com)
//
// System.Convert class. This was written word for word off the
// Library specification for System.Convert in the ECMA TC39 TG2
@@ -2528,6 +2529,7 @@ namespace System {
typeof (DateTime), // 16 TypeCode.DateTime
null, // 17 null.
typeof (String), // 18 TypeCode.String
+ typeof (Enum)
};
// Function to convert an object to another type and return
@@ -2561,67 +2563,69 @@ namespace System {
if (value.GetType () == conversionType)
return value;
- if (value is IConvertible) {
- IConvertible convertValue = (IConvertible) value;
+ IConvertible convertValue = value as IConvertible;
+ if (convertValue != null) {
if (conversionType == conversionTable[0]) // 0 Empty
throw new ArgumentNullException ();
- else if (conversionType == conversionTable[1]) // 1 TypeCode.Object
- return (object) value;
+ if (conversionType == conversionTable[1]) // 1 TypeCode.Object
+ return value;
- else if (conversionType == conversionTable[2]) // 2 TypeCode.DBNull
+ if (conversionType == conversionTable[2]) // 2 TypeCode.DBNull
throw new InvalidCastException (
"Cannot cast to DBNull, it's not IConvertible");
- else if (conversionType == conversionTable[3]) // 3 TypeCode.Boolean
- return (object) convertValue.ToBoolean (provider);
+ if (conversionType == conversionTable[3]) // 3 TypeCode.Boolean
+ return convertValue.ToBoolean (provider);
- else if (conversionType == conversionTable[4]) // 4 TypeCode.Char
- return (object) convertValue.ToChar (provider);
+ if (conversionType == conversionTable[4]) // 4 TypeCode.Char
+ return convertValue.ToChar (provider);
- else if (conversionType == conversionTable[5]) // 5 TypeCode.SByte
- return (object) convertValue.ToSByte (provider);
+ if (conversionType == conversionTable[5]) // 5 TypeCode.SByte
+ return convertValue.ToSByte (provider);
- else if (conversionType == conversionTable[6]) // 6 TypeCode.Byte
- return (object) convertValue.ToByte (provider);
+ if (conversionType == conversionTable[6]) // 6 TypeCode.Byte
+ return convertValue.ToByte (provider);
- else if (conversionType == conversionTable[7]) // 7 TypeCode.Int16
- return (object) convertValue.ToInt16 (provider);
+ if (conversionType == conversionTable[7]) // 7 TypeCode.Int16
+ return convertValue.ToInt16 (provider);
- else if (conversionType == conversionTable[8]) // 8 TypeCode.UInt16
- return (object) convertValue.ToUInt16 (provider);
+ if (conversionType == conversionTable[8]) // 8 TypeCode.UInt16
+ return convertValue.ToUInt16 (provider);
- else if (conversionType == conversionTable[9]) // 9 TypeCode.Int32
- return (object) convertValue.ToInt32 (provider);
+ if (conversionType == conversionTable[9]) // 9 TypeCode.Int32
+ return convertValue.ToInt32 (provider);
- else if (conversionType == conversionTable[10]) // 10 TypeCode.UInt32
- return (object) convertValue.ToUInt32 (provider);
+ if (conversionType == conversionTable[10]) // 10 TypeCode.UInt32
+ return convertValue.ToUInt32 (provider);
- else if (conversionType == conversionTable[11]) // 11 TypeCode.Int64
- return (object) convertValue.ToInt64 (provider);
+ if (conversionType == conversionTable[11]) // 11 TypeCode.Int64
+ return convertValue.ToInt64 (provider);
- else if (conversionType == conversionTable[12]) // 12 TypeCode.UInt64
- return (object) convertValue.ToUInt64 (provider);
+ if (conversionType == conversionTable[12]) // 12 TypeCode.UInt64
+ return convertValue.ToUInt64 (provider);
- else if (conversionType == conversionTable[13]) // 13 TypeCode.Single
- return (object) convertValue.ToSingle (provider);
+ if (conversionType == conversionTable[13]) // 13 TypeCode.Single
+ return convertValue.ToSingle (provider);
- else if (conversionType == conversionTable[14]) // 14 TypeCode.Double
- return (object) convertValue.ToDouble (provider);
+ if (conversionType == conversionTable[14]) // 14 TypeCode.Double
+ return convertValue.ToDouble (provider);
- else if (conversionType == conversionTable[15]) // 15 TypeCode.Decimal
- return (object) convertValue.ToDecimal (provider);
+ if (conversionType == conversionTable[15]) // 15 TypeCode.Decimal
+ return convertValue.ToDecimal (provider);
- else if (conversionType == conversionTable[16]) // 16 TypeCode.DateTime
- return (object) convertValue.ToDateTime (provider);
+ if (conversionType == conversionTable[16]) // 16 TypeCode.DateTime
+ return convertValue.ToDateTime (provider);
- else if (conversionType == conversionTable[18]) // 18 TypeCode.String
- return (object) convertValue.ToString (provider);
- else {
- if (try_target_to_type)
- return convertValue.ToType (conversionType, provider);
- }
+ if (conversionType == conversionTable[18]) // 18 TypeCode.String
+ return convertValue.ToString (provider);
+
+ if (conversionType == conversionTable[19] && value is Enum) // System.Enum
+ return value;
+
+ if (try_target_to_type)
+ return convertValue.ToType (conversionType, provider);
}
// Not in the conversion table
throw new InvalidCastException ((Locale.GetText (
diff --git a/mcs/class/corlib/System/Enum.cs b/mcs/class/corlib/System/Enum.cs
index c16e604d977..ecf2ed18981 100644
--- a/mcs/class/corlib/System/Enum.cs
+++ b/mcs/class/corlib/System/Enum.cs
@@ -278,9 +278,8 @@ namespace System
{
if (targetType == null)
throw new ArgumentNullException ("targetType");
- if (targetType == typeof (string))
- return ToString (provider);
- return Convert.ToType (Value, targetType, provider, false);
+
+ return Convert.ToType (this, targetType, provider, false);
}
ushort IConvertible.ToUInt16 (IFormatProvider provider)
diff --git a/mcs/class/corlib/System/Guid.cs b/mcs/class/corlib/System/Guid.cs
index 42ff390b6d7..d4fb24f7cec 100644
--- a/mcs/class/corlib/System/Guid.cs
+++ b/mcs/class/corlib/System/Guid.cs
@@ -38,7 +38,7 @@
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Text;
-#if FULL_AOT_RUNTIME
+#if MONOTOUCH && FULL_AOT_RUNTIME
using Crimson.CommonCrypto;
#endif
@@ -48,7 +48,7 @@ namespace System {
[StructLayout (LayoutKind.Sequential)]
[ComVisible (true)]
public struct Guid : IFormattable, IComparable, IComparable<Guid>, IEquatable<Guid> {
-#if FULL_AOT_RUNTIME
+#if MONOTOUCH
static Guid () {
if (MonoTouchAOTHelper.FalseFlag) {
var comparer = new System.Collections.Generic.GenericComparer <Guid> ();
@@ -76,8 +76,8 @@ namespace System {
X, // {0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
}
- class GuidParser {
-
+ struct GuidParser
+ {
private string _src;
private int _length;
private int _cur;
@@ -85,7 +85,8 @@ namespace System {
public GuidParser (string src)
{
_src = src;
- Reset ();
+ _cur = 0;
+ _length = _src.Length;
}
void Reset ()
@@ -235,19 +236,29 @@ namespace System {
if (Eof)
return !(strict && (i + 1 != length));
- char c = Char.ToLowerInvariant (_src[_cur]);
+ char c = _src [_cur];
if (Char.IsDigit (c)) {
res = res * 16 + c - '0';
_cur++;
- } else if (c >= 'a' && c <= 'f') {
+ continue;
+ }
+
+ if (c >= 'a' && c <= 'f') {
res = res * 16 + c - 'a' + 10;
_cur++;
- } else {
- if (!strict)
- return true;
+ continue;
+ }
- return !(strict && (i + 1 != length));
+ if (c >= 'A' && c <= 'F') {
+ res = res * 16 + c - 'A' + 10;
+ _cur++;
+ continue;
}
+
+ if (!strict)
+ return true;
+
+ return false; //!(strict && (i + 1 != length));
}
return true;
@@ -263,20 +274,28 @@ namespace System {
public bool Parse (out Guid guid)
{
- if (TryParseNDBP (Format.N, out guid))
- return true;
-
- Reset ();
- if (TryParseNDBP (Format.D, out guid))
- return true;
-
- Reset ();
- if (TryParseNDBP (Format.B, out guid))
- return true;
-
- Reset ();
- if (TryParseNDBP (Format.P, out guid))
- return true;
+ switch (_length) {
+ case 32:
+ if (TryParseNDBP (Format.N, out guid))
+ return true;
+ break;
+ case 36:
+ if (TryParseNDBP (Format.D, out guid))
+ return true;
+ break;
+ case 38:
+ switch (_src [0]) {
+ case '{':
+ if (TryParseNDBP (Format.B, out guid))
+ return true;
+ break;
+ case '(':
+ if (TryParseNDBP (Format.P, out guid))
+ return true;
+ break;
+ }
+ break;
+ }
Reset ();
return TryParseX (out guid);
@@ -472,6 +491,15 @@ namespace System {
private static RandomNumberGenerator _fastRng;
#endif
+#if FULL_AOT_RUNTIME && !MONOTOUCH
+ // NSA approved random generator.
+ static void LameRandom (byte [] b)
+ {
+ var r = new Random ();
+ r.NextBytes (b);
+ }
+#endif
+
// generated as per section 3.4 of the specification
public static Guid NewGuid ()
{
@@ -483,8 +511,10 @@ namespace System {
_rng = RandomNumberGenerator.Create ();
_rng.GetBytes (b);
}
-#else
+#elif MONOTOUCH
Cryptor.GetRandom (b);
+#else
+ LameRandom (b);
#endif
Guid res = new Guid (b);
diff --git a/mcs/class/corlib/System/MonoCustomAttrs.cs b/mcs/class/corlib/System/MonoCustomAttrs.cs
index 870b2306f1a..d5d5a8a4b16 100644
--- a/mcs/class/corlib/System/MonoCustomAttrs.cs
+++ b/mcs/class/corlib/System/MonoCustomAttrs.cs
@@ -45,6 +45,8 @@ namespace System
static class MonoCustomAttrs
{
static Assembly corlib;
+ [ThreadStatic]
+ static Dictionary<Type, AttributeUsageAttribute> usage_cache;
/* Treat as user types all corlib types extending System.Type that are not MonoType and TypeBuilder */
static bool IsUserCattrProvider (object obj)
@@ -149,76 +151,94 @@ namespace System
object[] r;
object[] res = GetCustomAttributesBase (obj, attributeType, false);
// shortcut
- if (!inherit && res.Length == 1)
- {
+ if (!inherit && res.Length == 1) {
if (res [0] == null)
throw new CustomAttributeFormatException ("Invalid custom attribute format");
- if (attributeType != null)
- {
- if (attributeType.IsAssignableFrom (res[0].GetType ()))
- {
+ if (attributeType != null) {
+ if (attributeType.IsAssignableFrom (res[0].GetType ())) {
r = (object[]) Array.CreateInstance (attributeType, 1);
r[0] = res[0];
- }
- else
- {
+ } else {
r = (object[]) Array.CreateInstance (attributeType, 0);
}
- }
- else
- {
+ } else {
r = (object[]) Array.CreateInstance (res[0].GetType (), 1);
r[0] = res[0];
}
return r;
}
+ if (inherit && GetBase (obj) == null)
+ inherit = false;
+
// if AttributeType is sealed, and Inherited is set to false, then
// there's no use in scanning base types
- if ((attributeType != null && attributeType.IsSealed) && inherit)
- {
+ if ((attributeType != null && attributeType.IsSealed) && inherit) {
AttributeUsageAttribute usageAttribute = RetrieveAttributeUsage (
attributeType);
if (!usageAttribute.Inherited)
- {
inherit = false;
- }
}
var initialSize = Math.Max (res.Length, 16);
- var attributeInfos = new Dictionary<Type, AttributeInfo> (initialSize);
- var a = new List<object> (initialSize);
+ List<Object> a = null;
ICustomAttributeProvider btype = obj;
+ object[] array;
+
+ /* Non-inherit case */
+ if (!inherit) {
+ if (attributeType == null) {
+ foreach (object attr in res) {
+ if (attr == null)
+ throw new CustomAttributeFormatException ("Invalid custom attribute format");
+ }
+ var result = new Attribute [res.Length];
+ res.CopyTo (result, 0);
+ return result;
+ }
+
+ a = new List<object> (initialSize);
+ foreach (object attr in res) {
+ if (attr == null)
+ throw new CustomAttributeFormatException ("Invalid custom attribute format");
+
+ Type attrType = attr.GetType ();
+ if (attributeType != null && !attributeType.IsAssignableFrom (attrType))
+ continue;
+ a.Add (attr);
+ }
+ if (attributeType == null || attributeType.IsValueType)
+ array = new Attribute [a.Count];
+ else
+ array = Array.CreateInstance (attributeType, a.Count) as object[];
+ a.CopyTo (array, 0);
+ return array;
+ }
+
+ /* Inherit case */
+ var attributeInfos = new Dictionary<Type, AttributeInfo> (initialSize);
int inheritanceLevel = 0;
+ a = new List<object> (initialSize);
- do
- {
- foreach (object attr in res)
- {
+ do {
+ foreach (object attr in res) {
AttributeUsageAttribute usage;
if (attr == null)
throw new CustomAttributeFormatException ("Invalid custom attribute format");
Type attrType = attr.GetType ();
- if (attributeType != null)
- {
+ if (attributeType != null) {
if (!attributeType.IsAssignableFrom (attrType))
- {
continue;
- }
}
AttributeInfo firstAttribute;
if (attributeInfos.TryGetValue (attrType, out firstAttribute))
- {
usage = firstAttribute.Usage;
- }
else
- {
usage = RetrieveAttributeUsage (attrType);
- }
// only add attribute to the list of attributes if
// - we are on the first inheritance level, or the attribute can be inherited anyway
@@ -232,32 +252,22 @@ namespace System
if ((inheritanceLevel == 0 || usage.Inherited) && (usage.AllowMultiple ||
(firstAttribute == null || (firstAttribute != null
&& firstAttribute.InheritanceLevel == inheritanceLevel))))
- {
a.Add (attr);
- }
if (firstAttribute == null)
- {
attributeInfos.Add (attrType, new AttributeInfo (usage, inheritanceLevel));
- }
}
- if ((btype = GetBase (btype)) != null)
- {
+ if ((btype = GetBase (btype)) != null) {
inheritanceLevel++;
res = GetCustomAttributesBase (btype, attributeType, true);
}
} while (inherit && btype != null);
- object[] array = null;
if (attributeType == null || attributeType.IsValueType)
- {
- array = (object[]) Array.CreateInstance (typeof(Attribute), a.Count);
- }
+ array = new Attribute [a.Count];
else
- {
array = Array.CreateInstance (attributeType, a.Count) as object[];
- }
// copy attributes to array
a.CopyTo (array, 0);
@@ -406,7 +416,7 @@ namespace System
return baseMethod;
}
- private static AttributeUsageAttribute RetrieveAttributeUsage (Type attributeType)
+ private static AttributeUsageAttribute RetrieveAttributeUsageNoCache (Type attributeType)
{
if (attributeType == typeof (AttributeUsageAttribute))
/* Avoid endless recursion */
@@ -445,6 +455,19 @@ namespace System
return ((AttributeUsageAttribute) attribs[0]);
}
+ static AttributeUsageAttribute RetrieveAttributeUsage (Type attributeType)
+ {
+ AttributeUsageAttribute usageAttribute = null;
+ /* Usage a thread-local cache to speed this up, since it is called a lot from GetCustomAttributes () */
+ if (usage_cache == null)
+ usage_cache = new Dictionary<Type, AttributeUsageAttribute> ();
+ if (usage_cache.TryGetValue (attributeType, out usageAttribute))
+ return usageAttribute;
+ usageAttribute = RetrieveAttributeUsageNoCache (attributeType);
+ usage_cache [attributeType] = usageAttribute;
+ return usageAttribute;
+ }
+
private static readonly AttributeUsageAttribute DefaultAttributeUsage =
new AttributeUsageAttribute (AttributeTargets.All);
diff --git a/mcs/class/corlib/System/MonoType.cs b/mcs/class/corlib/System/MonoType.cs
index df90010c206..4bce62bd679 100644
--- a/mcs/class/corlib/System/MonoType.cs
+++ b/mcs/class/corlib/System/MonoType.cs
@@ -51,7 +51,13 @@ namespace System
[Serializable]
[StructLayout (LayoutKind.Sequential)]
- sealed class MonoType : Type, ISerializable
+ sealed class MonoType :
+#if NET_4_5
+ TypeInfo
+#else
+ Type
+#endif
+ , ISerializable
{
[NonSerialized]
MonoTypeInfo type_info;
diff --git a/mcs/class/corlib/System/MulticastDelegate.cs b/mcs/class/corlib/System/MulticastDelegate.cs
index ab7583652c2..0550ff82843 100644
--- a/mcs/class/corlib/System/MulticastDelegate.cs
+++ b/mcs/class/corlib/System/MulticastDelegate.cs
@@ -43,19 +43,17 @@ namespace System
[StructLayout (LayoutKind.Sequential)]
public abstract class MulticastDelegate : Delegate
{
- private MulticastDelegate prev;
- private MulticastDelegate kpm_next;
+ MulticastDelegate prev;
+ MulticastDelegate kpm_next;
protected MulticastDelegate (object target, string method)
: base (target, method)
{
- prev = null;
}
protected MulticastDelegate (Type target, string method)
: base (target, method)
{
- prev = null;
}
public override void GetObjectData (SerializationInfo info, StreamingContext context)
@@ -72,9 +70,6 @@ namespace System
return base.DynamicInvokeImpl (args);
}
- internal bool HasSingleTarget {
- get { return prev == null; }
- }
// <remarks>
// Equals: two multicast delegates are equal if their base is equal
// and their invocations list is equal.
diff --git a/mcs/class/corlib/System/Random.cs b/mcs/class/corlib/System/Random.cs
index 1f84216ffee..0bf5c746278 100644
--- a/mcs/class/corlib/System/Random.cs
+++ b/mcs/class/corlib/System/Random.cs
@@ -4,13 +4,12 @@
// Authors:
// Bob Smith (bob@thestuff.net)
// Ben Maurer (bmaurer@users.sourceforge.net)
+// Sebastien Pouliot <sebastien@xamarin.com>
//
// (C) 2001 Bob Smith. http://www.thestuff.net
// (C) 2003 Ben Maurer
-//
-
-//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright 2013 Xamarin Inc. (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -39,12 +38,11 @@ namespace System
[ComVisible (true)]
public class Random
{
- const int MBIG = int.MaxValue;
- const int MSEED = 161803398;
+ uint x;
+ uint y;
+ uint z;
+ uint c;
- int inext, inextp;
- int [] SeedArray = new int [56];
-
public Random ()
: this (Environment.TickCount)
{
@@ -52,75 +50,28 @@ namespace System
public Random (int Seed)
{
- int ii;
- int mj, mk;
-
- // Numerical Recipes in C online @ http://www.library.cornell.edu/nr/bookcpdf/c7-1.pdf
-
- // Math.Abs throws on Int32.MinValue, so we need to work around that case.
- // Fixes: 605797
- if (Seed == Int32.MinValue)
- mj = MSEED - Math.Abs (Int32.MinValue + 1);
- else
- mj = MSEED - Math.Abs (Seed);
-
- SeedArray [55] = mj;
- mk = 1;
- for (int i = 1; i < 55; i++) { // [1, 55] is special (Knuth)
- ii = (21 * i) % 55;
- SeedArray [ii] = mk;
- mk = mj - mk;
- if (mk < 0)
- mk += MBIG;
- mj = SeedArray [ii];
- }
- for (int k = 1; k < 5; k++) {
- for (int i = 1; i < 56; i++) {
- SeedArray [i] -= SeedArray [1 + (i + 30) % 55];
- if (SeedArray [i] < 0)
- SeedArray [i] += MBIG;
- }
- }
- inext = 0;
- inextp = 31;
- }
-
- protected virtual double Sample ()
- {
- int retVal;
-
- if (++inext >= 56) inext = 1;
- if (++inextp >= 56) inextp = 1;
-
- retVal = SeedArray [inext] - SeedArray [inextp];
-
- if (retVal < 0)
- retVal += MBIG;
-
- SeedArray [inext] = retVal;
-
- return retVal * (1.0 / MBIG);
- }
-
- public virtual int Next ()
- {
- return (int)(Sample () * int.MaxValue);
+ x = (uint) Seed;
+ y = (uint) 987654321;
+ z = (uint) 43219876;
+ c = (uint) 6543217;
}
- public virtual int Next (int maxValue)
+ uint JKiss ()
{
- if (maxValue < 0)
- throw new ArgumentOutOfRangeException(Locale.GetText (
- "Max value is less than min value."));
-
- return (int)(Sample () * maxValue);
+ x = 314527869 * x + 1234567;
+ y ^= y << 5;
+ y ^= y >> 7;
+ y ^= y << 22;
+ ulong t = ((ulong) 4294584393 * z + c);
+ c = (uint) (t >> 32);
+ z = (uint) t;
+ return (x + y + z);
}
public virtual int Next (int minValue, int maxValue)
{
if (minValue > maxValue)
- throw new ArgumentOutOfRangeException (Locale.GetText (
- "Min value is greater than max value."));
+ throw new ArgumentOutOfRangeException ("Maximum value is less than minimal value.");
// special case: a difference of one (or less) will always return the minimum
// e.g. -1,-1 or -1,0 will always return -1
@@ -128,7 +79,28 @@ namespace System
if (diff <= 1)
return minValue;
- return (int)((uint)(Sample () * diff) + minValue);
+ return minValue + ((int) (JKiss () % diff));
+ }
+
+ public virtual int Next (int maxValue)
+ {
+ if (maxValue < 0)
+ throw new ArgumentOutOfRangeException ("Maximum value is less than minimal value.");
+
+ return maxValue > 0 ? (int)(JKiss () % maxValue) : 0;
+ }
+
+ public virtual int Next ()
+ {
+ // returns a non-negative, [0 - Int32.MacValue], random number
+ // but we want to avoid calls to Math.Abs (call cost and branching cost it requires)
+ // and the fact it would throw for Int32.MinValue (so roughly 1 time out of 2^32)
+ int random = (int) JKiss ();
+ while (random == Int32.MinValue)
+ random = (int) JKiss ();
+ int mask = random >> 31;
+ random ^= mask;
+ return random + (mask & 1);
}
public virtual void NextBytes (byte [] buffer)
@@ -136,14 +108,39 @@ namespace System
if (buffer == null)
throw new ArgumentNullException ("buffer");
- for (int i = 0; i < buffer.Length; i++) {
- buffer [i] = (byte)(Sample () * (byte.MaxValue + 1));
+ // each random `int` can fill 4 bytes
+ int p = 0;
+ uint random;
+ for (int i = 0; i < (buffer.Length >> 2); i++) {
+ random = JKiss ();
+ buffer [p++] = (byte) (random >> 24);
+ buffer [p++] = (byte) (random >> 16);
+ buffer [p++] = (byte) (random >> 8);
+ buffer [p++] = (byte) random;
+ }
+ if (p == buffer.Length)
+ return;
+
+ // complete the array
+ random = JKiss ();
+ while (p < buffer.Length) {
+ buffer [p++] = (byte) random;
+ random >>= 8;
}
}
public virtual double NextDouble ()
{
- return this.Sample ();
+ // return a double value between [0,1]
+ return Sample ();
+ }
+
+ protected virtual double Sample ()
+ {
+ // a single 32 bits random value is not enough to create a random double value
+ uint a = JKiss () >> 6; // Upper 26 bits
+ uint b = JKiss () >> 5; // Upper 27 bits
+ return (a * 134217728.0 + b) / 9007199254740992.0;
}
}
-}
+} \ No newline at end of file
diff --git a/mcs/class/corlib/System/String.cs b/mcs/class/corlib/System/String.cs
index 4c8ea8d7481..d30735f9bdb 100644
--- a/mcs/class/corlib/System/String.cs
+++ b/mcs/class/corlib/System/String.cs
@@ -1694,9 +1694,9 @@ namespace System
case StringComparison.InvariantCultureIgnoreCase:
return CultureInfo.InvariantCulture.CompareInfo.IsSuffix (this, value, CompareOptions.IgnoreCase);
case StringComparison.Ordinal:
- return CultureInfo.CurrentCulture.CompareInfo.IsSuffix (this, value, CompareOptions.Ordinal);
+ return CultureInfo.InvariantCulture.CompareInfo.IsSuffix (this, value, CompareOptions.Ordinal);
case StringComparison.OrdinalIgnoreCase:
- return CultureInfo.CurrentCulture.CompareInfo.IsSuffix (this, value, CompareOptions.OrdinalIgnoreCase);
+ return CultureInfo.InvariantCulture.CompareInfo.IsSuffix (this, value, CompareOptions.OrdinalIgnoreCase);
default:
string msg = Locale.GetText ("Invalid value '{0}' for StringComparison", comparisonType);
throw new ArgumentException (msg, "comparisonType");
diff --git a/mcs/class/corlib/System/Type.cs b/mcs/class/corlib/System/Type.cs
index a45c3948878..1b6a28b7541 100644
--- a/mcs/class/corlib/System/Type.cs
+++ b/mcs/class/corlib/System/Type.cs
@@ -1431,6 +1431,12 @@ namespace System {
return FullName;
}
+ internal static bool ShouldPrintFullName (Type type)
+ {
+ return type.IsGenericType || (type.IsClass && (!type.IsPointer ||
+ (!type.GetElementType ().IsPrimitive && !type.GetElementType ().IsNested)));
+ }
+
internal virtual Type InternalResolve ()
{
return UnderlyingSystemType;
diff --git a/mcs/class/corlib/System/Variant.cs b/mcs/class/corlib/System/Variant.cs
index 3cc7b18dfb8..8ac242b346e 100644
--- a/mcs/class/corlib/System/Variant.cs
+++ b/mcs/class/corlib/System/Variant.cs
@@ -247,7 +247,7 @@ namespace System
obj = Marshal.PtrToStringBSTR(Marshal.ReadIntPtr(addr));
break;
// GetObjectForIUnknown is excluded from Marshal using FULL_AOT_RUNTIME
-#if !MONOTOUCH
+#if !DISABLE_COM
case VarEnum.VT_UNKNOWN:
case VarEnum.VT_DISPATCH:
{
diff --git a/mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs b/mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs
index cb5b9f7cf1c..6542238daed 100644
--- a/mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs
+++ b/mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs
@@ -555,12 +555,55 @@ namespace MonoTests.System.Collections.Generic {
i = _list1.FindIndex (FindMultipleOfTwelve);
Assert.AreEqual (-1, i);
+
+ var a = new List<int> () { 2, 2, 2, 3, 2 };
+ Assert.AreEqual (2, a.FindIndex (2, 2, l => true));
}
- [Test, ExpectedException (typeof (ArgumentNullException))]
- public void FindIndexNullTest ()
+ [Test]
+ public void FindIndex_Invalid ()
{
- int i = _list1.FindIndex (null);
+ try {
+ _list1.FindIndex (null);
+ Assert.Fail ("#1");
+ } catch (ArgumentNullException) {
+ }
+
+ try {
+ _list1.FindIndex (-1, l => true);
+ Assert.Fail ("#2");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ _list1.FindIndex (-1, 0, l => true);
+ Assert.Fail ("#2b");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ _list1.FindIndex (0, -1, l => true);
+ Assert.Fail ("#3");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ _list1.FindIndex (100, l => true);
+ Assert.Fail ("#4");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ _list1.FindIndex (100, 0, l => true);
+ Assert.Fail ("#4b");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ _list1.FindIndex (7, 2, l => true);
+ Assert.Fail ("#5");
+ } catch (ArgumentOutOfRangeException) {
+ }
}
[Test]
@@ -579,8 +622,6 @@ namespace MonoTests.System.Collections.Generic {
int i = _list1.FindLast (null);
}
- // FIXME currently generates Invalid IL Code error
- /*
[Test]
public void ForEachTest ()
{
@@ -589,7 +630,7 @@ namespace MonoTests.System.Collections.Generic {
Assert.AreEqual (418, i);
}
- */
+
[Test]
public void FindLastIndexTest ()
{
@@ -601,12 +642,56 @@ namespace MonoTests.System.Collections.Generic {
i = _list1.FindIndex (FindMultipleOfTwelve);
Assert.AreEqual (-1, i);
+
+ Assert.AreEqual (2, _list1.FindLastIndex (2, 3, l => true));
+ Assert.AreEqual (2, _list1.FindLastIndex (2, 2, l => true));
+ Assert.AreEqual (1, _list1.FindLastIndex (1, 2, l => true));
}
- [Test, ExpectedException (typeof (ArgumentNullException))]
- public void FindLastIndexNullTest ()
+ [Test]
+ public void FindLastIndex_Invalid ()
{
- int i = _list1.FindLastIndex (null);
+ try {
+ _list1.FindLastIndex (null);
+ Assert.Fail ("#1");
+ } catch (ArgumentNullException) {
+ }
+
+ try {
+ _list1.FindLastIndex (-1, l => true);
+ Assert.Fail ("#2");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ _list1.FindLastIndex (-1, 0, l => true);
+ Assert.Fail ("#2b");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ _list1.FindLastIndex (0, -1, l => true);
+ Assert.Fail ("#3");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ _list1.FindLastIndex (100, l => true);
+ Assert.Fail ("#4");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ _list1.FindLastIndex (100, 0, l => true);
+ Assert.Fail ("#4b");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ _list1.FindLastIndex (2, 4, l => true);
+ Assert.Fail ("#5");
+ } catch (ArgumentOutOfRangeException) {
+ }
}
[Test]
diff --git a/mcs/class/corlib/Test/System.Collections/StructuralComparisonsTest.cs b/mcs/class/corlib/Test/System.Collections/StructuralComparisonsTest.cs
new file mode 100644
index 00000000000..38c9ace965b
--- /dev/null
+++ b/mcs/class/corlib/Test/System.Collections/StructuralComparisonsTest.cs
@@ -0,0 +1,55 @@
+//
+// StructuralComparisonsTest.cs
+//
+// Authors:
+// Marek Safar <marek.safar@gmail.com>
+//
+// Copyright (C) 2013 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_4_0
+
+using System.Collections;
+using NUnit.Framework;
+
+namespace MonoTests.System.Collections
+{
+ [TestFixture]
+ public class StructuralComparisonsTest
+ {
+ [Test]
+ public void EqualsTest ()
+ {
+ int[] a1 = new[] { 9, 1, 3, 4 };
+ int[] a2 = new[] { 9, 1, 3, 4 };
+
+ Assert.IsTrue (StructuralComparisons.StructuralEqualityComparer.Equals (a1, a2), "#1");
+ Assert.IsFalse (StructuralComparisons.StructuralEqualityComparer.Equals (null, a2), "#2");
+ Assert.IsFalse (StructuralComparisons.StructuralEqualityComparer.Equals (a1, null), "#3");
+ Assert.IsTrue (StructuralComparisons.StructuralEqualityComparer.Equals (null, null), "#4");
+ Assert.IsTrue (StructuralComparisons.StructuralEqualityComparer.Equals (4, 4), "#5");
+ Assert.IsFalse (StructuralComparisons.StructuralEqualityComparer.Equals (4, 5), "#6");
+ }
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/mcs/class/corlib/Test/System.Diagnostics/StackFrameTest.cs b/mcs/class/corlib/Test/System.Diagnostics/StackFrameTest.cs
index 033cc08539d..c1e0f1fa6fe 100644
--- a/mcs/class/corlib/Test/System.Diagnostics/StackFrameTest.cs
+++ b/mcs/class/corlib/Test/System.Diagnostics/StackFrameTest.cs
@@ -42,6 +42,7 @@ namespace MonoTests.System.Diagnostics
/// Tests whether getting file name works.
/// </summary>
[Test]
+ [Category("LLVMNotWorking")]
public void TestGetFileName ()
{
Assert.AreEqual ("dir/someFile",
@@ -57,6 +58,7 @@ namespace MonoTests.System.Diagnostics
/// Tests whether getting file line number works.
/// </summary>
[Test]
+ [Category("LLVMNotWorking")]
public void TestGetFileLineNumber ()
{
Assert.AreEqual (13,
diff --git a/mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs b/mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs
index 4a6ac7db8a0..7714f53ab32 100644
--- a/mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs
@@ -571,6 +571,14 @@ namespace MonoTests.System.Globalization
Assert.AreEqual (31748, new CultureInfo ("zh-CHT").LCID);
Assert.AreEqual (31748, new CultureInfo ("zh-CHT").Parent.LCID);
}
+
+ [Test]
+ [SetCulture ("zh-TW")]
+ public void ParentOfZh ()
+ {
+ Assert.AreEqual (31748, CultureInfo.CurrentCulture.Parent.LCID);
+ Assert.AreEqual (31748, CultureInfo.CurrentCulture.Parent.Parent.LCID);
+ }
[Test]
public void CurrentCulture ()
diff --git a/mcs/class/corlib/Test/System.IO/FileStreamTest.cs b/mcs/class/corlib/Test/System.IO/FileStreamTest.cs
index a56c4f820c0..51d352d0dd8 100644
--- a/mcs/class/corlib/Test/System.IO/FileStreamTest.cs
+++ b/mcs/class/corlib/Test/System.IO/FileStreamTest.cs
@@ -15,6 +15,7 @@ using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
+using System.Threading;
namespace MonoTests.System.IO
{
@@ -1515,6 +1516,35 @@ namespace MonoTests.System.IO
stream.EndWrite (stream.BeginWrite (new byte[8], 0, 8, null, null));
}
+ static IAsyncResult DoBeginWrite(Stream stream, ManualResetEvent mre, byte[] RandomBuffer)
+ {
+ return stream.BeginWrite (RandomBuffer, 0, RandomBuffer.Length, ar => {
+ stream.EndWrite (ar);
+
+ // we don't supply an ManualResetEvent so this will throw an NRE on the second run
+ // which nunit-console will ignore (but other test runners don't like that)
+ if (mre == null)
+ return;
+
+ DoBeginWrite (stream, null, RandomBuffer).AsyncWaitHandle.WaitOne ();
+ mre.Set ();
+ }, null);
+ }
+
+ [Test]
+ public void BeginWrite_Recursive ()
+ {
+ string path = TempFolder + Path.DirectorySeparatorChar + "temp";
+ DeleteFile (path);
+
+ using (FileStream stream = new FileStream (path, FileMode.OpenOrCreate, FileAccess.Write)) {
+ var mre = new ManualResetEvent (false);
+ var RandomBuffer = new byte[1024];
+ DoBeginWrite (stream, mre, RandomBuffer);
+ Assert.IsTrue (mre.WaitOne (5000), "#1");
+ }
+ }
+
[Test]
[Category("TargetJvmNotSupported")] // File locking not supported for TARGET_JVM
[ExpectedException (typeof (ObjectDisposedException))]
diff --git a/mcs/class/corlib/Test/System.Reflection.Emit/AssemblyBuilderTest.cs b/mcs/class/corlib/Test/System.Reflection.Emit/AssemblyBuilderTest.cs
index 6e75b960cba..5482647d8c4 100644
--- a/mcs/class/corlib/Test/System.Reflection.Emit/AssemblyBuilderTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection.Emit/AssemblyBuilderTest.cs
@@ -78,12 +78,16 @@ public class AssemblyBuilderTest
return assemblyName;
}
- private AssemblyBuilder genAssembly ()
+ private AssemblyBuilder genAssembly (AssemblyBuilderAccess access)
{
return domain.DefineDynamicAssembly (genAssemblyName (),
- AssemblyBuilderAccess.RunAndSave,
+ access,
tempDir);
}
+ private AssemblyBuilder genAssembly ()
+ {
+ return genAssembly (AssemblyBuilderAccess.RunAndSave);
+ }
private MethodInfo genEntryFunction (AssemblyBuilder assembly)
{
@@ -1929,5 +1933,25 @@ public class AssemblyBuilderTest
Assert.AreEqual (_assemblyName, assemblyName.ToString ());
}
}
+
+
+ [Test]//Bug #7126
+ public void CannotCreateInstanceOfSaveOnlyAssembly ()
+ {
+ var asm_builder = genAssembly (AssemblyBuilderAccess.Save);
+ var mod_builder = asm_builder.DefineDynamicModule("Foo", "Foo.dll");
+
+ var type_builder = mod_builder.DefineType("Foo",
+ TypeAttributes.Public | TypeAttributes.Sealed |
+ TypeAttributes.Class | TypeAttributes.BeforeFieldInit);
+
+ var type = type_builder.CreateType();
+
+ try {
+ Activator.CreateInstance(type);
+ Assert.Fail ("Cannot create instance of save only type");
+ } catch (NotSupportedException e) {
+ }
+ }
}
}
diff --git a/mcs/class/corlib/Test/System.Reflection.Emit/DynamicILInfoTest.cs b/mcs/class/corlib/Test/System.Reflection.Emit/DynamicILInfoTest.cs
index af33767c62f..b70bb8405c3 100644
--- a/mcs/class/corlib/Test/System.Reflection.Emit/DynamicILInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection.Emit/DynamicILInfoTest.cs
@@ -62,6 +62,14 @@ public class DynamicILInfoTest
var res = dm.Invoke(null, null);
Assert.AreEqual ("abcd", res);
}
+
+ [Test] // bug #13969
+ public void GetTokenFor_Constructor () {
+ var m = typeof (object).GetConstructor (Type.EmptyTypes);
+ var dm = new DynamicMethod ("Foo", typeof (void), Type.EmptyTypes);
+ var dil = dm.GetDynamicILInfo ();
+ dil.GetTokenFor (m.MethodHandle);
+ }
[Test]
public void GetTokenFor_Type () {
diff --git a/mcs/class/corlib/Test/System.Reflection/AssemblyNameTest.cs b/mcs/class/corlib/Test/System.Reflection/AssemblyNameTest.cs
index 9880acdc61e..0e26ea17702 100644
--- a/mcs/class/corlib/Test/System.Reflection/AssemblyNameTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/AssemblyNameTest.cs
@@ -1177,9 +1177,7 @@ public class AssemblyNameTest {
Assert.AreEqual (an.HashAlgorithm, clone.HashAlgorithm, "HashAlgorithm");
Assert.AreEqual (an.KeyPair, clone.KeyPair, "KeyPair");
Assert.AreEqual (an.Name, clone.Name, "Name");
-#if NET_2_0
- Assert.AreEqual (an.ProcessorArchitecture, clone.ProcessorArchitecture, "PA");
-#endif
+ //Assert.AreEqual (an.ProcessorArchitecture, clone.ProcessorArchitecture, "PA");
Assert.AreEqual (an.Version, clone.Version, "Version");
Assert.AreEqual (an.VersionCompatibility, clone.VersionCompatibility, "VersionCompatibility");
Assert.AreEqual (an.GetPublicKey (), clone.GetPublicKey (), "GetPublicKey");
@@ -2016,6 +2014,23 @@ public class AssemblyNameTest {
Assert.AreEqual (fullName, an.FullName);
}
+
+ [Test]
+ public void ReferenceMatchesDefinition_Compares_Only_SimpleName ()
+ {
+ var an1 = new AssemblyName ("TestDll, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=b77a5c561934e089");
+ var an2 = new AssemblyName ("TestDll, Version=2.0.0.2001, Culture=en-US, PublicKeyToken=ab7a5c561934e089");
+
+ var an3 = new AssemblyName ("TestDll");
+ var an4 = new AssemblyName ("tesTDlL");
+
+ var an5 = new AssemblyName ("TestDll");
+ var an6 = new AssemblyName ("TestDll2");
+
+ Assert.IsTrue (AssemblyName.ReferenceMatchesDefinition (an1, an2));
+ Assert.IsTrue (AssemblyName.ReferenceMatchesDefinition (an3, an4));
+ Assert.IsFalse (AssemblyName.ReferenceMatchesDefinition (an5, an6));
+ }
#endif
}
diff --git a/mcs/class/corlib/Test/System.Reflection/BinderTests.cs b/mcs/class/corlib/Test/System.Reflection/BinderTests.cs
index 08235e8cec6..ab0c5356aff 100644
--- a/mcs/class/corlib/Test/System.Reflection/BinderTests.cs
+++ b/mcs/class/corlib/Test/System.Reflection/BinderTests.cs
@@ -174,6 +174,14 @@ namespace MonoTests.System.Reflection
}
}
+ class DefaultValues
+ {
+ public int Value;
+ public DefaultValues (int i = 5)
+ {
+ Value = i;
+ }
+ }
[TestFixture]
public class BinderTest
@@ -187,6 +195,16 @@ namespace MonoTests.System.Reflection
var o = Activator.CreateInstance (typeof (ParamsArrayTest), new object[] { test_args });
Assert.IsNotNull (o, "#A1");
}
+
+ [Test]
+ public void DefaultParameter ()
+ {
+ var o = Activator.CreateInstance (typeof (DefaultValues),
+ BindingFlags.CreateInstance | BindingFlags.Public | BindingFlags.Instance | BindingFlags.OptionalParamBinding,
+ null, null, null);
+ var a = o as DefaultValues;
+ Assert.AreEqual (5, a.Value);
+ }
[Test]
[ExpectedException (typeof (ArgumentException))]
diff --git a/mcs/class/corlib/Test/System.Reflection/IntrospectionExtensionsTest.cs b/mcs/class/corlib/Test/System.Reflection/IntrospectionExtensionsTest.cs
new file mode 100644
index 00000000000..f16d9a2a0f2
--- /dev/null
+++ b/mcs/class/corlib/Test/System.Reflection/IntrospectionExtensionsTest.cs
@@ -0,0 +1,57 @@
+//
+// IntrospectionExtensionsTest.cs:
+//
+// Authors:
+// Marek Safar (marek.safar@gmail.com)
+//
+// (C) 2013
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_4_5
+
+using System;
+using System.Reflection;
+
+using NUnit.Framework;
+
+namespace MonoTests.System.Reflection
+{
+ [TestFixture]
+ public class IntrospectionExtensionsTest
+ {
+ [Test]
+ [ExpectedException (typeof (ArgumentNullException))]
+ public void GetTypeInfo_NullArgument ()
+ {
+ IntrospectionExtensions.GetTypeInfo (null);
+ }
+
+ [Test]
+ public void GetTypeInfo_SystemType ()
+ {
+ var t = typeof (double);
+ Assert.AreSame (t, IntrospectionExtensions.GetTypeInfo (t));
+ }
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs
index 0f48ddef2a3..ff1d915632d 100644
--- a/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs
@@ -13,6 +13,7 @@ using System.Threading;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
+using System.Collections.Generic;
using NUnit.Framework;
@@ -233,6 +234,175 @@ namespace MonoTests.System.Reflection
var info = typeof (ParameterInfoTest).GetMethod ("TestC").GetParameters ();
Assert.AreEqual (decimal.MaxValue, info [0].DefaultValue);
}
+
+ class MyParameterInfo2 : ParameterInfo
+ {
+ public ParameterAttributes MyAttrsImpl;
+
+ public override ParameterAttributes Attributes {
+ get {return MyAttrsImpl;}
+ }
+
+ public IList<CustomAttributeData> myList = new List<CustomAttributeData> ();
+
+ public override IList<CustomAttributeData> GetCustomAttributesData () {
+ return myList;
+ }
+ }
+
+ class MyParameterInfo : ParameterInfo
+ {
+ public void SetClassImpl (Type t)
+ {
+ ClassImpl = t;
+ }
+
+ public void SetDefaultValueImpl (object o)
+ {
+ DefaultValueImpl = o;
+ }
+
+ public void SetMemberImpl (MemberInfo o)
+ {
+ MemberImpl = o;
+ }
+
+ public void SetNameImpl (string s)
+ {
+ NameImpl = s;
+ }
+
+ public void SetPositionImpl (int i)
+ {
+ PositionImpl = i;
+ }
+
+ public void SetAttrsImpl (ParameterAttributes a)
+ {
+ AttrsImpl = a;
+ }
+
+ public void TestMethod (int a) {}
+ public int this[int x, int y] {
+ get { return 0; }
+ set { }
+ }
+
+ }
+
+ [Test]
+ public void SubClassWithNoOverrides ()
+ {
+ var p = new MyParameterInfo ();
+ Assert.IsFalse (p.IsDefined (typeof (FlagsAttribute), false), "#1");
+ Assert.AreEqual (0, p.GetCustomAttributes (false).Length, "#2");
+ Assert.AreEqual (0, p.GetCustomAttributes (typeof (FlagsAttribute), false).Length, "#3");
+ Assert.AreEqual (0, p.GetOptionalCustomModifiers ().Length, "#4");
+ Assert.AreEqual (0, p.GetRequiredCustomModifiers ().Length, "#5");
+#if NET_4_5
+ try {
+ var ign = p.HasDefaultValue;
+ Assert.Fail ("#6");
+ } catch (NotImplementedException) {
+ }
+#endif
+ Assert.IsFalse (p.IsIn, "#7");
+ Assert.IsFalse (p.IsLcid, "#8");
+ Assert.IsFalse (p.IsOptional, "#9");
+ Assert.IsFalse (p.IsOut, "#10");
+ Assert.IsFalse (p.IsRetval, "#10");
+#if NET_4_5
+ try {
+ var ign = p.CustomAttributes;
+ Assert.Fail ("#11");
+ } catch (NotImplementedException) {
+ }
+#endif
+ try {
+ p.GetCustomAttributesData ();
+ Assert.Fail ("#12");
+ } catch (NotImplementedException) {
+ }
+
+ Assert.AreEqual (0x8000000, p.MetadataToken, "#13");
+ Assert.AreEqual (0, p.Position, "#14");
+ try {
+ var ign = p.DefaultValue;
+ Assert.Fail ("#15");
+ } catch (NotImplementedException) {
+ }
+ try {
+ var ign = p.RawDefaultValue;
+ Assert.Fail ("#16");
+ } catch (NotImplementedException) {
+ }
+ Assert.IsNull (p.Member, "#17");
+ Assert.AreEqual (ParameterAttributes.None, p.Attributes, "#18");
+ Assert.IsNull (p.Name, "#19");
+ Assert.IsNull (p.ParameterType, "#20");
+ }
+
+ [Test]
+ public void SubClassWithValuesSet ()
+ {
+ var p = new MyParameterInfo ();
+ p.SetClassImpl (typeof (Decimal));
+ Assert.AreEqual (typeof (Decimal), p.ParameterType, "#1");
+ p.SetClassImpl (null);
+
+ p.SetDefaultValueImpl ("foo");
+ try {
+ var ign = p.DefaultValue;
+ Assert.Fail ("#2");
+ } catch (NotImplementedException) {
+ }
+ p.SetDefaultValueImpl (null);
+
+ var obj = typeof (object);
+ p.SetMemberImpl (obj);
+ Assert.AreEqual (obj, p.Member, "#3");
+ Assert.AreEqual (0x8000000, p.MetadataToken, "#4");
+ p.SetMemberImpl (null);
+
+ var method = typeof (MyParameterInfo).GetMethod ("TestMethod");
+ p.SetMemberImpl (method);
+ Assert.IsNotNull (method, "#5");
+ Assert.AreEqual (method, p.Member, "#6");
+ Assert.AreEqual (0x8000000, p.MetadataToken, "#7");
+ p.SetMemberImpl (null);
+
+ var property = typeof (MyParameterInfo).GetProperty ("Item");
+ p.SetMemberImpl (property);
+ Assert.IsNotNull (property, "#8");
+ Assert.AreEqual (property, p.Member, "#9");
+ Assert.AreEqual (0x8000000, p.MetadataToken, "#10");
+ p.SetMemberImpl (null);
+
+ p.SetNameImpl ("foo");
+ Assert.AreEqual ("foo", p.Name, "#11");
+ p.SetNameImpl (null);
+
+ p.SetPositionImpl (99);
+ Assert.AreEqual (p.Position, 99, "#12");
+ Assert.AreEqual (p.MetadataToken, 0x8000000, "#13");
+ p.SetPositionImpl (0);
+
+ Assert.IsFalse (p.IsIn, "#14");
+ p.SetAttrsImpl (ParameterAttributes.In);
+ Assert.IsTrue (p.IsIn, "#15");
+ }
+
+ [Test]
+ public void SubClassWithOverrides()
+ {
+ var p2 = new MyParameterInfo2 ();
+ Assert.IsFalse (p2.IsIn, "#1");
+ p2.MyAttrsImpl = ParameterAttributes.In;
+ Assert.IsTrue (p2.IsIn, "#2");
+#if NET_4_5
+ Assert.AreEqual (p2.myList, p2.CustomAttributes, "#3");
+#endif
+ }
#endif
}
}
diff --git a/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs
index 54368c6cd45..67da2d7b5c8 100644
--- a/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs
@@ -402,7 +402,7 @@ namespace MonoTests.System.Reflection
}
}
#endif
-#if NET_2_0
+
public class A<T>
{
public string Property {
@@ -438,8 +438,13 @@ namespace MonoTests.System.Reflection
PropertyInfo property = type.GetProperty ("Property");
Assert.AreEqual (typeof (string).FullName, property.GetValue (instance, null));
}
-#endif
+ [Test]
+ public void ToStringTest ()
+ {
+ var pa = typeof (TestC).GetProperty ("Item");
+ Assert.AreEqual ("Int32 Item [System.Double[]]", pa.ToString ());
+ }
static bool HasAttribute (object [] attrs, Type attributeType)
{
@@ -523,5 +528,23 @@ namespace MonoTests.System.Reflection
Assert.IsTrue (ex.InnerException is ObjectDisposedException);
}
}
+
+ public class DefaultValueTest
+ {
+ public string this[int val, string param = "test"]
+ {
+ get{ return val + param; }
+ }
+ }
+
+
+ [Test]
+ public void PropertyWithDefaultValue ()
+ {
+ var parameters = typeof (DefaultValueTest).GetProperty ("Item").GetIndexParameters ();
+ var defaultParam = parameters[parameters.Length - 1];
+ Assert.AreEqual ("param", defaultParam.Name, "#1");
+ Assert.AreEqual ("test", defaultParam.DefaultValue, "#2");
+ }
}
}
diff --git a/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs b/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs
index 52409b4f188..48f629adfac 100644
--- a/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs
+++ b/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs
@@ -73,6 +73,18 @@ namespace MonoTests.System.Runtime.CompilerServices
} catch (TaskCanceledException) {
}
}
+
+ [Test]
+ public void GetResultWaitOnCompletion ()
+ {
+ TaskAwaiter awaiter;
+
+ var task = Task.Delay (30);
+ awaiter = task.GetAwaiter ();
+
+ awaiter.GetResult ();
+ Assert.AreEqual (TaskStatus.RanToCompletion, task.Status);
+ }
}
}
diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs
index 91b39eb832c..01a3f9987f3 100644
--- a/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs
+++ b/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs
@@ -263,6 +263,26 @@ public class RSACryptoServiceProviderTest {
}
[Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void SignDataWithInvalidOid ()
+ {
+ byte[] data = new byte [5];
+ rsa = new RSACryptoServiceProvider (minKeySize);
+
+ rsa.SignData (data, "1.2.3");
+ }
+
+ [Test]
+ public void SignDataWithOid ()
+ {
+ string oid = CryptoConfig.MapNameToOID ("SHA256");
+ byte[] data = new byte [5];
+ rsa = new RSACryptoServiceProvider (minKeySize);
+
+ rsa.SignData (data, oid);
+ }
+
+ [Test]
[ExpectedException (typeof (ArgumentNullException))]
public void SignHashNullValue ()
{
diff --git a/mcs/class/corlib/Test/System.Security.Principal/WindowsIdentityTest.cs b/mcs/class/corlib/Test/System.Security.Principal/WindowsIdentityTest.cs
index d3a1e2de3c4..4c84824c912 100644
--- a/mcs/class/corlib/Test/System.Security.Principal/WindowsIdentityTest.cs
+++ b/mcs/class/corlib/Test/System.Security.Principal/WindowsIdentityTest.cs
@@ -213,9 +213,6 @@ namespace MonoTests.System.Security.Principal {
}
[Test]
-#if __IOS__
- [Ignore ("https://bugzilla.xamarin.com/show_bug.cgi?id=12789")]
-#endif
public void SerializeRoundTrip ()
{
WindowsIdentity wi = WindowsIdentity.GetCurrent ();
diff --git a/mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs b/mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs
index 1f53af7e3eb..91a465c13d3 100644
--- a/mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs
+++ b/mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs
@@ -125,34 +125,36 @@ namespace MonoTests.System.Text
}
[Test]
-#if NET_2_0
- [Category ("NotWorking")]
-#endif
public void TestMaxCharCount()
{
UTF8Encoding UTF8enc = new UTF8Encoding ();
-#if NET_2_0
- // hmm, where is this extra 1 coming from?
+ Encoding UTF8encWithBOM = new UTF8Encoding(true);
Assert.AreEqual (51, UTF8enc.GetMaxCharCount(50), "UTF #1");
-#else
- Assert.AreEqual (50, UTF8enc.GetMaxCharCount(50), "UTF #1");
-#endif
+ Assert.AreEqual (UTF8enc.GetMaxByteCount(50), UTF8encWithBOM.GetMaxByteCount(50), "UTF #2");
+ }
+
+ [Test]
+ public void TestMaxCharCountWithCustomFallback()
+ {
+ Encoding encoding = Encoding.GetEncoding("utf-8", new EncoderReplacementFallback("\u2047\u2047"), new DecoderReplacementFallback("\u2047\u2047"));
+ Assert.AreEqual (102, encoding.GetMaxCharCount(50), "UTF #1");
}
[Test]
-#if NET_2_0
- [Category ("NotWorking")]
-#endif
public void TestMaxByteCount()
{
UTF8Encoding UTF8enc = new UTF8Encoding ();
-#if NET_2_0
- // maybe under .NET 2.0 insufficient surrogate pair is
- // just not handled, and 3 is Preamble size.
+ Encoding UTF8encWithBOM = new UTF8Encoding(true);
+
Assert.AreEqual (153, UTF8enc.GetMaxByteCount(50), "UTF #1");
-#else
- Assert.AreEqual (200, UTF8enc.GetMaxByteCount(50), "UTF #1");
-#endif
+ Assert.AreEqual (UTF8enc.GetMaxByteCount(50), UTF8encWithBOM.GetMaxByteCount(50), "UTF #2");
+ }
+
+ [Test]
+ public void TestMaxByteCountWithCustomFallback()
+ {
+ Encoding encoding = Encoding.GetEncoding("utf-8", new EncoderReplacementFallback("\u2047\u2047"), new DecoderReplacementFallback("?"));
+ Assert.AreEqual (306, encoding.GetMaxByteCount(50), "UTF #1");
}
// regression for bug #59648
diff --git a/mcs/class/corlib/Test/System.Threading.Tasks/TaskFactoryTest.cs b/mcs/class/corlib/Test/System.Threading.Tasks/TaskFactoryTest.cs
index 16db84cb41a..f0f87a898f2 100644
--- a/mcs/class/corlib/Test/System.Threading.Tasks/TaskFactoryTest.cs
+++ b/mcs/class/corlib/Test/System.Threading.Tasks/TaskFactoryTest.cs
@@ -282,6 +282,16 @@ namespace MonoTests.System.Threading.Tasks
}
[Test]
+ public void ContinueWhenAny_WithResult ()
+ {
+ var tcs = new TaskCompletionSource<int>();
+ tcs.SetResult(1);
+ Task[] tasks = new[] { tcs.Task };
+ var res = Task.Factory.ContinueWhenAny (tasks, l => 4);
+ Assert.AreEqual (4, res.Result);
+ }
+
+ [Test]
public void ContinueWhenAny_InvalidArguments ()
{
try {
diff --git a/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs b/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs
index 8c134680dc3..feff0e8b06f 100644
--- a/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs
+++ b/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs
@@ -67,6 +67,25 @@ namespace MonoTests.System.Threading.Tasks
}
}
+ class NonInlineableScheduler : TaskScheduler
+ {
+ protected override IEnumerable<Task> GetScheduledTasks ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override void QueueTask (Task task)
+ {
+ if (!base.TryExecuteTask (task))
+ throw new ApplicationException ();
+ }
+
+ protected override bool TryExecuteTaskInline (Task task, bool taskWasPreviouslyQueued)
+ {
+ return false;
+ }
+ }
+
Task[] tasks;
const int max = 6;
@@ -1107,6 +1126,15 @@ namespace MonoTests.System.Threading.Tasks
}
[Test]
+ public void Delay_TimeManagement ()
+ {
+ var delay1 = Task.Delay(50);
+ var delay2 = Task.Delay(25);
+ Assert.IsTrue (Task.WhenAny(new[] { delay1, delay2 }).Wait (1000));
+ Assert.AreEqual (TaskStatus.RanToCompletion, delay2.Status);
+ }
+
+ [Test]
public void WaitAny_WithNull ()
{
var tasks = new [] {
@@ -1639,6 +1667,16 @@ namespace MonoTests.System.Threading.Tasks
}
[Test]
+ public void ContinueWith_CustomScheduleRejected ()
+ {
+ var scheduler = new NonInlineableScheduler ();
+ var t = Task.Factory.StartNew (delegate { }).
+ ContinueWith (r => {}, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, scheduler);
+
+ Assert.IsTrue (t.Wait (5000));
+ }
+
+ [Test]
public void FromResult ()
{
var t = Task.FromResult<object> (null);
diff --git a/mcs/class/corlib/Test/System.Threading/ThreadPoolTest.cs b/mcs/class/corlib/Test/System.Threading/ThreadPoolTest.cs
index 951e41ee1aa..88803e5c2d5 100644
--- a/mcs/class/corlib/Test/System.Threading/ThreadPoolTest.cs
+++ b/mcs/class/corlib/Test/System.Threading/ThreadPoolTest.cs
@@ -49,6 +49,37 @@ namespace MonoTests.System.Threading
Assert.Fail ("#2");
} catch (ArgumentNullException) {
}
- }
+ }
+
+ [Test]
+ public void UnsafeQueueUserWorkItem_InvalidArguments ()
+ {
+ try {
+ ThreadPool.UnsafeQueueUserWorkItem (null, 1);
+ Assert.Fail ("#1");
+ } catch (ArgumentNullException) {
+ }
+ }
+
+#if NET_4_0
+ event WaitCallback e;
+
+ [Test]
+ public void UnsafeQueueUserWorkItem_MulticastDelegate ()
+ {
+ CountdownEvent ev = new CountdownEvent (2);
+
+ e += delegate {
+ ev.Signal ();
+ };
+
+ e += delegate {
+ ev.Signal ();
+ };
+
+ ThreadPool.UnsafeQueueUserWorkItem (e, null);
+ Assert.IsTrue (ev.Wait (3000));
+ }
+#endif
}
} \ No newline at end of file
diff --git a/mcs/class/corlib/Test/System.Threading/ThreadTest.cs b/mcs/class/corlib/Test/System.Threading/ThreadTest.cs
index 1c22314ccf1..7d483e67034 100644
--- a/mcs/class/corlib/Test/System.Threading/ThreadTest.cs
+++ b/mcs/class/corlib/Test/System.Threading/ThreadTest.cs
@@ -1123,6 +1123,60 @@ namespace MonoTests.System.Threading
}
[Test]
+ public void TestSetApartmentStateSameState ()
+ {
+ Thread t1 = new Thread (new ThreadStart (Start));
+ t1.SetApartmentState (ApartmentState.STA);
+ Assert.AreEqual (ApartmentState.STA, t1.ApartmentState, "Thread1 Set Once");
+
+ t1.SetApartmentState (ApartmentState.STA);
+ Assert.AreEqual (ApartmentState.STA, t1.ApartmentState, "Thread1 Set twice");
+ }
+
+ [Test]
+ [ExpectedException(typeof(InvalidOperationException))]
+ public void TestSetApartmentStateDiffState ()
+ {
+ Thread t1 = new Thread (new ThreadStart (Start));
+ t1.SetApartmentState (ApartmentState.STA);
+ Assert.AreEqual (ApartmentState.STA, t1.ApartmentState, "Thread1 Set Once");
+
+ t1.SetApartmentState (ApartmentState.MTA);
+ }
+
+ [Test]
+ public void TestTrySetApartmentState ()
+ {
+ Thread t1 = new Thread (new ThreadStart (Start));
+ t1.SetApartmentState (ApartmentState.STA);
+ Assert.AreEqual (ApartmentState.STA, t1.ApartmentState, "#1");
+
+ bool result = t1.TrySetApartmentState (ApartmentState.MTA);
+ Assert.IsFalse (result, "#2");
+
+ result = t1.TrySetApartmentState (ApartmentState.STA);
+ Assert.IsTrue (result, "#3");
+ }
+
+ [Test]
+ public void TestTrySetApartmentStateRunning ()
+ {
+ Thread t1 = new Thread (new ThreadStart (Start));
+ t1.SetApartmentState (ApartmentState.STA);
+ Assert.AreEqual (ApartmentState.STA, t1.ApartmentState, "#1");
+
+ t1.Start ();
+
+ try {
+ t1.TrySetApartmentState (ApartmentState.STA);
+ Assert.Fail ("#2");
+ } catch (ThreadStateException) {
+ }
+
+ t1.Join ();
+ }
+
+ [Test]
public void Volatile () {
double v3 = 55667;
Thread.VolatileWrite (ref v3, double.MaxValue);
diff --git a/mcs/class/corlib/Test/System.Threading/TimerTest.cs b/mcs/class/corlib/Test/System.Threading/TimerTest.cs
index 67737cbef0f..ee60eb53aa2 100644
--- a/mcs/class/corlib/Test/System.Threading/TimerTest.cs
+++ b/mcs/class/corlib/Test/System.Threading/TimerTest.cs
@@ -60,11 +60,11 @@ namespace MonoTests.System.Threading {
Timer t = new Timer (new TimerCallback (Callback), bucket, 10, 10);
Thread.Sleep (500);
int c = bucket.count;
- Assert.IsTrue(c > 20, "#1");
+ Assert.IsTrue (c > 20, "#1 " + c.ToString ());
t.Change (100, 100);
c = bucket.count;
Thread.Sleep (500);
- Assert.IsTrue(bucket.count <= c + 20, "#2");
+ Assert.IsTrue (bucket.count <= c + 20, "#2 " + c.ToString ());
t.Dispose ();
}
@@ -193,13 +193,16 @@ namespace MonoTests.System.Threading {
Thread.Sleep(100);
t.Change (int.MaxValue, Timeout.Infinite);
// since period is 0 the callback should happen once (bug #340212)
- Assert.IsTrue(b.count == 1);
-
+ Assert.AreEqual (1, b.count, "only once");
}
[Test]
+ [Ignore ()]
public void TestDisposeOnCallback ()
{
+ // this test is bad, as the provided `state` (t1) is null and will throw an NRE inside the callback
+ // that was ignored before 238785a3e3d510528228fc551625975bc508c2f3 and most unit test runner won't
+ // report it since the NRE will not happen on the main thread (but Touch.Unit will)
Timer t1 = null;
t1 = new Timer (new TimerCallback (CallbackTestDisposeOnCallback), t1, 0, 10);
Thread.Sleep (200);
@@ -211,7 +214,7 @@ namespace MonoTests.System.Threading {
{
((Timer) foo).Dispose ();
}
-
+
private void Callback (object foo)
{
Bucket b = foo as Bucket;
diff --git a/mcs/class/corlib/Test/System/AggregateExceptionTests.cs b/mcs/class/corlib/Test/System/AggregateExceptionTests.cs
index bc91e12686b..d133a82cd86 100644
--- a/mcs/class/corlib/Test/System/AggregateExceptionTests.cs
+++ b/mcs/class/corlib/Test/System/AggregateExceptionTests.cs
@@ -108,6 +108,17 @@ namespace MonoTests.System
}
}
+ [Test]
+ public void GetBaseWithInner ()
+ {
+ var ae = new AggregateException ("x", new [] { new ArgumentException (), new ArgumentNullException () });
+ Assert.AreEqual (ae, ae.GetBaseException (), "#1");
+
+ var expected = new ArgumentException ();
+ var ae2 = new AggregateException ("x", new AggregateException (expected, new Exception ()));
+ Assert.AreEqual (expected, ae2.GetBaseException ().InnerException, "#2");
+ }
+
static void Throws (Type t, Action action)
{
Exception e = null;
diff --git a/mcs/class/corlib/Test/System/ArrayTest.cs b/mcs/class/corlib/Test/System/ArrayTest.cs
index 4c74ee9d3d4..ef41ce17946 100644
--- a/mcs/class/corlib/Test/System/ArrayTest.cs
+++ b/mcs/class/corlib/Test/System/ArrayTest.cs
@@ -1618,6 +1618,126 @@ public class ArrayTest
}
}
+
+ [Test]
+ public void FindIndexTest ()
+ {
+ var a = new int[] { 2, 2, 2, 3, 2 };
+ Assert.AreEqual (2, Array.FindIndex (a, 2, 2, l => true));
+ }
+
+ [Test]
+ public void FindIndex_Invalid ()
+ {
+ var array = new int [] { 1, 2, 3, 4, 5 };
+
+ try {
+ Array.FindIndex (array, null);
+ Assert.Fail ("#1");
+ } catch (ArgumentNullException) {
+ }
+
+ try {
+ Array.FindIndex (array, -1, l => true);
+ Assert.Fail ("#2");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ Array.FindIndex (array, -1, 0, l => true);
+ Assert.Fail ("#2b");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ Array.FindIndex (array, 0, -1, l => true);
+ Assert.Fail ("#3");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ Array.FindIndex (array, 100, l => true);
+ Assert.Fail ("#4");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ Array.FindIndex (array, 100, 0, l => true);
+ Assert.Fail ("#4b");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ Array.FindIndex (array, 7, 2, l => true);
+ Assert.Fail ("#5");
+ } catch (ArgumentOutOfRangeException) {
+ }
+ }
+
+ [Test, ExpectedException (typeof (ArgumentNullException))]
+ public void FindLastNullTest ()
+ {
+ var array = new int [] { 1, 2, 3, 4, 5 };
+ Array.FindLast (array, null);
+ }
+
+ [Test]
+ public void FindLastIndexTest ()
+ {
+ var array = new int [] { 1, 2, 3, 4, 5 };
+
+ Assert.AreEqual (2, Array.FindLastIndex (array, 2, 3, l => true));
+ Assert.AreEqual (2, Array.FindLastIndex (array, 2, 2, l => true));
+ Assert.AreEqual (1, Array.FindLastIndex (array, 1, 2, l => true));
+ }
+
+ [Test]
+ public void FindLastIndex_Invalid ()
+ {
+ var array = new int [] { 1, 2, 3, 4, 5 };
+ try {
+ Array.FindLastIndex (array, null);
+ Assert.Fail ("#1");
+ } catch (ArgumentNullException) {
+ }
+
+ try {
+ Array.FindLastIndex (array, -1, l => true);
+ Assert.Fail ("#2");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ Array.FindLastIndex (array, -1, 0, l => true);
+ Assert.Fail ("#2b");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ Array.FindLastIndex (array, 0, -1, l => true);
+ Assert.Fail ("#3");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ Array.FindLastIndex (array, 100, l => true);
+ Assert.Fail ("#4");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ Array.FindLastIndex (array, 100, 0, l => true);
+ Assert.Fail ("#4b");
+ } catch (ArgumentOutOfRangeException) {
+ }
+
+ try {
+ Array.FindLastIndex (array, 2, 4, l => true);
+ Assert.Fail ("#5");
+ } catch (ArgumentOutOfRangeException) {
+ }
+ }
+
[Test]
public void TestReverse() {
{
diff --git a/mcs/class/corlib/Test/System/ConsoleTest.cs b/mcs/class/corlib/Test/System/ConsoleTest.cs
index 25562126ee9..98a0d1aa266 100644
--- a/mcs/class/corlib/Test/System/ConsoleTest.cs
+++ b/mcs/class/corlib/Test/System/ConsoleTest.cs
@@ -331,6 +331,21 @@ public class ConsoleTest
}
#if !MOBILE
+
+#if NET_4_5
+ [Test]
+ public void RedirectedTest ()
+ {
+ if (Console.IsErrorRedirected) {
+ // Assert.Inconclusive ();
+ return;
+ }
+
+ Console.SetError (TextWriter.Null);
+ Assert.IsFalse (Console.IsErrorRedirected);
+ }
+#endif
+
// Bug 678357
[Test]
public void EncodingTest ()
diff --git a/mcs/class/corlib/Test/System/DelegateTest.cs b/mcs/class/corlib/Test/System/DelegateTest.cs
index 4fa97245ad2..ddfc099b73d 100644
--- a/mcs/class/corlib/Test/System/DelegateTest.cs
+++ b/mcs/class/corlib/Test/System/DelegateTest.cs
@@ -66,6 +66,9 @@ namespace MonoTests.System
}
[Test] // CreateDelegate (Type, MethodInfo)
+#if MONOTOUCH
+ [Category ("NotWorking")] // #14163
+#endif
public void CreateDelegate1_Method_Instance ()
{
C c = new C ();
@@ -971,6 +974,9 @@ namespace MonoTests.System
}
[Test]
+#if MONOTOUCH
+ [Category ("NotWorking")] // #14163
+#endif
public void NullTarget_Instance ()
{
Del1 d = (Del1)Delegate.CreateDelegate (typeof (Del1), null, typeof (DelegateTest).GetMethod ("method1"));
diff --git a/mcs/class/corlib/Test/System/EnumTest.cs b/mcs/class/corlib/Test/System/EnumTest.cs
index f6c0dca2a59..973b068e823 100644
--- a/mcs/class/corlib/Test/System/EnumTest.cs
+++ b/mcs/class/corlib/Test/System/EnumTest.cs
@@ -849,9 +849,12 @@ namespace MonoTests.System
}
[Test]
- public void ConvertToStringType ()
+ public void IConvertible_Valid ()
{
- Assert.AreEqual ("This", ((IConvertible) TestingEnum.This).ToType (typeof (string), null));
+ IConvertible ic = TestingEnum.This;
+ Assert.AreEqual ("This", ic.ToType (typeof (string), null), "#1");
+ Assert.AreEqual (TestingEnum.This, ic.ToType (typeof (TestingEnum), null), "#2");
+ Assert.AreEqual (TestingEnum.This, ic.ToType (typeof (Enum), null), "#3");
}
[Test]
diff --git a/mcs/class/corlib/Test/System/GuidTest.cs b/mcs/class/corlib/Test/System/GuidTest.cs
index 12d9f91839a..945a4084e09 100644
--- a/mcs/class/corlib/Test/System/GuidTest.cs
+++ b/mcs/class/corlib/Test/System/GuidTest.cs
@@ -390,6 +390,13 @@ namespace MonoTests.System {
[Test]
[ExpectedException (typeof (FormatException))]
+ public void ParseError_1 ()
+ {
+ Guid.Parse("08888888-0444-444-0444-012121212121");
+ }
+
+ [Test]
+ [ExpectedException (typeof (FormatException))]
public void ParseExactN ()
{
Guid.ParseExact ("00010203-0405-0607-0809-0a0b0c0d0e0f", "N");
@@ -412,6 +419,7 @@ namespace MonoTests.System {
Assert.AreEqual (Guid.Empty, guid, "A4");
Assert.IsFalse (Guid.TryParse("foobar", out guid), "A5");
Assert.AreEqual (Guid.Empty, guid, "A6");
+ Assert.IsFalse (Guid.TryParse ("08888888-0444-444-0444-012121212121", out guid), "A7");
}
[Test]
diff --git a/mcs/class/corlib/Test/System/IntegerFormatterTest.cs b/mcs/class/corlib/Test/System/IntegerFormatterTest.cs
index 8873f308cdc..a09e98a1b46 100644
--- a/mcs/class/corlib/Test/System/IntegerFormatterTest.cs
+++ b/mcs/class/corlib/Test/System/IntegerFormatterTest.cs
@@ -123,7 +123,10 @@ public class IntegerFormatterTest
}
- private static string tutti = "Int32\n" +
+ private static string tutti = tutti_1 + tutti_2;
+
+ const string tutti_1 =
+ "Int32\n" +
"(-2147483648) (C) (($2,147,483,648.00))\n" +
"(-2147483648) (C0) (($2,147,483,648))\n" +
"(-2147483648) (C1) (($2,147,483,648.0))\n" +
@@ -852,7 +855,9 @@ public class IntegerFormatterTest
"(9223372036854775807) (X8) (7FFFFFFFFFFFFFFF)\n" +
"(9223372036854775807) (X9) (7FFFFFFFFFFFFFFF)\n" +
"(9223372036854775807) (X10) (7FFFFFFFFFFFFFFF)\n" +
-"(9223372036854775807) (X99) (000000000000000000000000000000000000000000000000000000000000000000000000000000000007FFFFFFFFFFFFFFF)\n" +
+"(9223372036854775807) (X99) (000000000000000000000000000000000000000000000000000000000000000000000000000000000007FFFFFFFFFFFFFFF)\n";
+
+const string tutti_2 =
"(0) (C) ($0.00)\n" +
"(0) (C0) ($0)\n" +
"(0) (C1) ($0.0)\n" +
@@ -2000,6 +2005,5 @@ public class IntegerFormatterTest
"(100) (X10) (0000000064)\n" +
"(100) (X99) (000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064)\n";
}
-
}
diff --git a/mcs/class/corlib/Test/System/RandomTest.cs b/mcs/class/corlib/Test/System/RandomTest.cs
index a18524968f7..5e49ac38669 100644
--- a/mcs/class/corlib/Test/System/RandomTest.cs
+++ b/mcs/class/corlib/Test/System/RandomTest.cs
@@ -3,9 +3,10 @@
//
// Authors:
// Bob Smith <bob@thestuff.net>
-// Sebastien Pouliot <sebastien@ximian.com>
+// Sebastien Pouliot <sebastien@xamarin.com>
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright 2013 Xamarin Inc. (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -29,44 +30,21 @@
using NUnit.Framework;
using System;
+using System.Reflection;
namespace MonoTests.System {
[TestFixture]
public class RandomTest {
-#if false
- //
- // This test will fail, given enough runs.
- //
- // It is an ad-hoc test for distribution, and does not work
- // 100% of the time.
- //
- [Test]
- public void NextDouble ()
- {
- Random r = new Random ();
- int i;
- double c=0;
- for (i=0; i<20; i++)
- c += r.NextDouble ();
- c/=i;
- Assert.IsTrue (c.ToString () + " is out of range.", c < .7 && c > .3);
- }
-
-#endif
-
[Test]
public void CompareStreamWithSameSeed ()
{
Random r = new Random (42);
Random r2 = new Random (42);
- double c=0, c2=0;
for (int i=0; i<20; i++) {
- c += r.NextDouble ();
- c2 += r2.NextDouble ();
+ Assert.AreEqual (r.NextDouble (), r2.NextDouble (), i.ToString ());
}
- Assert.AreEqual (c, c2, "Compare");
}
[Test]
@@ -80,6 +58,13 @@ namespace MonoTests.System {
}
[Test]
+ public void NextZero ()
+ {
+ Random r = new Random ();
+ Assert.AreEqual (0, r.Next (0),"Next(0) failed");
+ }
+
+ [Test]
public void NextMax()
{
Random r = new Random();
@@ -109,23 +94,124 @@ namespace MonoTests.System {
}
}
-/* Mono implementation is now compatible with Knuth (not MS) implementation (choice of constants)
+ class RandomSampleOverride : Random {
+
+ protected override double Sample ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+
[Test]
- public void CompareWithMS ()
+ public void Base_Int ()
{
- string[] r = new string [4];
- byte[] buffer = new byte [8];
- int x = 4;
- while (x-- > 0) {
- int seed = (x << x);
- Random random = new Random (seed);
- random.NextBytes (buffer);
- r [x] = BitConverter.ToString (buffer);
+ var random = new RandomSampleOverride ();
+ // from 2.0+ Next(), Next(int,int) and NextBytes(byte[]) do not call Sample
+ // see MSDN's Notes to Inheritors
+ random.Next ();
+ random.Next (Int32.MinValue, Int32.MaxValue);
+ random.NextBytes (new byte[1]);
+ }
+
+ [Test]
+ [ExpectedException (typeof (NotImplementedException))]
+ public void Base_Double ()
+ {
+ var random = new RandomSampleOverride ();
+ random.NextDouble ();
+ }
+
+ // generate values (one for each 1024 returned values) from the original C implementation
+ static uint[] jkiss_values = {
+ 560241513, /* 0 */
+ 1281708802, /* 1024 */
+ 1571324528, /* 2048 */
+ 1565809406, /* 3072 */
+ 1010890569, /* 4096 */
+ 1778803435, /* 5120 */
+ 903613637, /* 6144 */
+ 3496059008, /* 7168 */
+ 108603163, /* 8192 */
+ 1854081276, /* 9216 */
+ 3703232459, /* 10240 */
+ 2191562138, /* 11264 */
+ 337995793, /* 12288 */
+ 1340840062, /* 13312 */
+ 2364148985, /* 14336 */
+ 2549812361, /* 15360 */
+ 563432369, /* 16384 */
+ 229365487, /* 17408 */
+ 1821397325, /* 18432 */
+ 3246092454, /* 19456 */
+ 691032417, /* 20480 */
+ 86951316, /* 21504 */
+ 3029975455, /* 22528 */
+ 1261370163, /* 23552 */
+ 2539815382, /* 24576 */
+ 3017891647, /* 25600 */
+ 3877215120, /* 26624 */
+ 3142958765, /* 27648 */
+ 1080903191, /* 28672 */
+ 2837464745, /* 29696 */
+ 614275602, /* 30720 */
+ 2250626199, /* 31744 */
+ 729001311, /* 32768 */
+ 3313769017, /* 33792 */
+ 2408398670, /* 34816 */
+ 3123583383, /* 35840 */
+ 3346590423, /* 36864 */
+ 1629546563, /* 37888 */
+ 251343753, /* 38912 */
+ 2695793631, /* 39936 */
+ 2768993787, /* 40960 */
+ 3688573224, /* 41984 */
+ 2897218561, /* 43008 */
+ 2725058810, /* 44032 */
+ 2142061914, /* 45056 */
+ 3983217096, /* 46080 */
+ 3609758190, /* 47104 */
+ 842060935, /* 48128 */
+ 2893482035, /* 49152 */
+ 2290461665, /* 50176 */
+ 1709481476, /* 51200 */
+ 3633857838, /* 52224 */
+ 332645044, /* 53248 */
+ 3522654497, /* 54272 */
+ 2501348469, /* 55296 */
+ 1644344287, /* 56320 */
+ 3081428084, /* 57344 */
+ 3114560766, /* 58368 */
+ 489030597, /* 59392 */
+ 367291591, /* 60416 */
+ 106358682, /* 61440 */
+ 3020781303, /* 62464 */
+ 1209590375, /* 63488 */
+ 1833282169, /* 64512 */
+ 61543407, /* 65536 */
+ };
+
+ [Test]
+ public void JKISS ()
+ {
+ // Random.Next() returns a non-negative *signed* integer value - so it can't be used for testing
+ var next = typeof(Random).GetMethod ("JKiss", BindingFlags.Instance | BindingFlags.NonPublic);
+
+ // if the method is not present, e.g. on MS.NET, skip this test
+ if (next == null)
+ return;
+
+ // ensure we match the original JKISS random stream
+ // first 64KB but without checking every value (one each KB)
+ Random r = new Random (123456789);
+ int n = 0;
+ int j = 0;
+ while (j < 64 * 1024) {
+ uint random = (uint) next.Invoke (r, null);
+ if (j++ % 1024 == 0) {
+ Assert.AreEqual (random, jkiss_values [n], n.ToString ());
+ n++;
+ }
}
- Assert.AreEqual ("43-DB-8B-AE-0A-88-A8-7B", r [3], "Seed(24)");
- Assert.AreEqual ("E7-2A-5C-44-D1-8C-7D-74", r [2], "Seed(8)");
- Assert.AreEqual ("C5-67-2A-FC-1B-4E-CD-72", r [1], "Seed(2)");
- Assert.AreEqual ("B9-D1-C4-8E-34-8F-E7-71", r [0], "Seed(0)");
- }*/
+ }
}
-}
+} \ No newline at end of file
diff --git a/mcs/class/corlib/Test/System/TypeTest.cs b/mcs/class/corlib/Test/System/TypeTest.cs
index 3bbe3cde42a..bc726ce38fd 100644
--- a/mcs/class/corlib/Test/System/TypeTest.cs
+++ b/mcs/class/corlib/Test/System/TypeTest.cs
@@ -2512,6 +2512,47 @@ PublicKeyToken=b77a5c561934e089"));
Assert.IsFalse (typeof (bug82431B4).IsDefined (typeof (NotInheritAttribute), true), "#K4");
}
+ class Bug13767Attribute : Attribute
+ {
+ public object[] field;
+
+ public Bug13767Attribute (params object[] args)
+ {
+ field = args;
+ }
+ }
+
+ public enum Bug13767Enum
+ {
+ Value0,
+ Value1,
+ }
+
+ [Bug13767("Demo", new[] { Bug13767Enum.Value1, Bug13767Enum.Value0 })]
+ public void Bug13767Method(string attributeName, Bug13767Enum[]options)
+ {
+
+ }
+
+ [Test] //Bug 13767
+ public void CustomAttributeWithNestedArrayOfEnum ()
+ {
+ var m = GetType ().GetMethod ("Bug13767Method");
+
+ var attr = m.GetCustomAttributes (false);
+ Assert.AreEqual (1, attr.Length, "#1");
+
+ var tc = (Bug13767Attribute)attr[0];
+ Assert.AreEqual (2, tc.field.Length, "#2");
+ Assert.AreEqual ("Demo", tc.field[0], "#3");
+ Assert.IsNotNull (tc.field[1], "#4");
+
+ var arr = (Bug13767Enum[])tc.field [1];
+ Assert.AreEqual (2, arr.Length, "#5");
+ Assert.AreEqual (Bug13767Enum.Value1, arr [0], "#6");
+ Assert.AreEqual (Bug13767Enum.Value0, arr [1], "#7");
+ }
+
[Test] // GetType (String)
public void GetType1_TypeName_Null ()
{
diff --git a/mcs/class/corlib/corlib.dll.sources b/mcs/class/corlib/corlib.dll.sources
index eb97b08f980..f581c0d5e59 100644
--- a/mcs/class/corlib/corlib.dll.sources
+++ b/mcs/class/corlib/corlib.dll.sources
@@ -540,6 +540,7 @@ System.Reflection/MonoEvent.cs
System.Reflection/MonoField.cs
System.Reflection/MonoMethod.cs
System.Reflection/MonoModule.cs
+System.Reflection/MonoParameterInfo.cs
System.Reflection/MonoProperty.cs
System.Reflection/ObfuscateAssemblyAttribute.cs
System.Reflection/ObfuscationAttribute.cs
diff --git a/mcs/class/corlib/corlib_test.dll.sources b/mcs/class/corlib/corlib_test.dll.sources
index ed7f3c7bf26..51c354cc224 100644
--- a/mcs/class/corlib/corlib_test.dll.sources
+++ b/mcs/class/corlib/corlib_test.dll.sources
@@ -39,6 +39,7 @@ System.Collections/QueueTest.cs
System.Collections/ReadOnlyCollectionBaseTest.cs
System.Collections/SortedListTest.cs
System.Collections/StackTest.cs
+System.Collections/StructuralComparisonsTest.cs
System.Collections.Generic/ComparerTest.cs
System.Collections.Generic/DictionaryTest.cs
System.Collections.Generic/EqualityComparerTest.cs
@@ -132,6 +133,7 @@ System.Reflection/ConstructorInfoTest.cs
System.Reflection/CustomAttributeDataTest.cs
System.Reflection/EventInfoTest.cs
System.Reflection/FieldInfoTest.cs
+System.Reflection/IntrospectionExtensionsTest.cs
System.Reflection/MethodBaseTest.cs
System.Reflection/MethodInfoTest.cs
System.Reflection/MonoGenericClassTest.cs
diff --git a/mcs/class/corlib/mobile_static_corlib.dll.sources b/mcs/class/corlib/mobile_static_corlib.dll.sources
new file mode 100644
index 00000000000..da77893bcc5
--- /dev/null
+++ b/mcs/class/corlib/mobile_static_corlib.dll.sources
@@ -0,0 +1 @@
+#include corlib.dll.sources
diff --git a/mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs b/mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs
index 360889f6a73..efdeedf63a6 100644
--- a/mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs
+++ b/mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs
@@ -54,7 +54,17 @@ namespace Monodoc.Providers
nsSummaries[nsName] = nsElements = new XElement ("elements",
new XElement ("summary"),
new XElement ("remarks"));
-
+ //Add namespace summary and remarks data from file, if available
+ var nsFileName = Path.Combine(asm, String.Format("ns-{0}.xml", nsName));
+ if(File.Exists(nsFileName)){
+ var nsEl = XElement.Load (nsFileName);
+
+ nsElements.Element ("summary").ReplaceWith (nsEl.Descendants ("summary").First ());
+ nsElements.Element ("remarks").ReplaceWith (nsEl.Descendants ("remarks").First ());
+ }else{
+ Console.WriteLine ("Error reading namespace XML for " + nsName);
+ }
+
foreach (var type in ns.Elements ("Type")) {
// Add the XML file corresponding to the type to our storage
var id = indexGenerator (type);
@@ -541,10 +551,11 @@ namespace Monodoc.Providers
break;
// binary operators: overloading is possible [ECMA-335 §10.3.2]
default:
- memberSignature =
- nicename + "("
- + string.Join (",", member.Element ("Parameters").Elements ("Parameter").Select (p => (string)p.Attribute ("Type")))
- + ")";
+ if (member.Element ("Parameters") != null)
+ memberSignature =
+ nicename + "("
+ + string.Join (",", member.Element ("Parameters").Elements ("Parameter").Select (p => (string)p.Attribute ("Type")))
+ + ")";
break;
}
diff --git a/mcs/errors/cs0037-8.cs b/mcs/errors/cs0037-8.cs
deleted file mode 100644
index 5f54e10eda3..00000000000
--- a/mcs/errors/cs0037-8.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// CS0037: Cannot convert null to `int' because it is a value type
-// Line: 9
-
-class C
-{
- public static void Main ()
- {
- int i = 44;
- i <<= null;
- }
-}
diff --git a/mcs/errors/cs0075.cs b/mcs/errors/cs0075.cs
index a774362dfea..367cfc7d579 100644
--- a/mcs/errors/cs0075.cs
+++ b/mcs/errors/cs0075.cs
@@ -17,7 +17,7 @@ class X
public static void Main ()
{
int a = 4, b = 5;
- X x = (X) -a;
+X x = (X) -a;
System.Console.WriteLine (x.i);
}
}
diff --git a/mcs/errors/cs0102-21.cs b/mcs/errors/cs0102-21.cs
new file mode 100644
index 00000000000..bda9e2c6435
--- /dev/null
+++ b/mcs/errors/cs0102-21.cs
@@ -0,0 +1,16 @@
+// CS0102: The type `X' already contains a definition for `False'
+// Line: 11
+
+class X
+{
+ bool False<T> ()
+ {
+ return false;
+ }
+
+ bool False {
+ get {
+ return false;
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0118-11.cs b/mcs/errors/cs0118-11.cs
index df639d25041..18d426334e4 100644..100755
--- a/mcs/errors/cs0118-11.cs
+++ b/mcs/errors/cs0118-11.cs
@@ -1,17 +1,10 @@
-// CS0118: `Test.SomeDel' is a `type' but a `variable' was expected
-// Line: 14
+// CS0118: `C' is a `type' but a `variable' was expected
+// Line: 8
-using System;
-
-namespace Test
+class C
{
- public delegate void SomeDel (Action a);
-
- public class TestClass
+ public static void Main ()
{
- public void TestMethod ()
- {
- SomeDel (() => { });
- }
+ int i = (C) +1;
}
-} \ No newline at end of file
+}
diff --git a/mcs/errors/cs0118-12.cs b/mcs/errors/cs0118-12.cs
deleted file mode 100644
index c8d6203b7b3..00000000000
--- a/mcs/errors/cs0118-12.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// CS0118: `A.Test' is a `type' but a `variable' was expected
-// Line: 10
-
-class A
-{
- delegate string Test (string t);
-
- public static void Main ()
- {
- Test ("t");
- }
-}
diff --git a/mcs/errors/cs0119-2.cs b/mcs/errors/cs0119-2.cs
new file mode 100644
index 00000000000..e3fc7da23d5
--- /dev/null
+++ b/mcs/errors/cs0119-2.cs
@@ -0,0 +1,17 @@
+// CS0119: Expression denotes a `type', where a `variable', `value' or `method group' was expected
+// Line: 14
+
+using System;
+
+namespace Test
+{
+ public delegate void SomeDel (Action a);
+
+ public class TestClass
+ {
+ public void TestMethod ()
+ {
+ SomeDel (() => { });
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0119-8.cs b/mcs/errors/cs0119-8.cs
index 2ee38442bb4..7b7f14bf72a 100755..100644
--- a/mcs/errors/cs0119-8.cs
+++ b/mcs/errors/cs0119-8.cs
@@ -1,10 +1,12 @@
// CS0119: Expression denotes a `type', where a `variable', `value' or `method group' was expected
-// Line: 8
+// Line: 10
-class C
+class A
{
+ delegate string Test (string t);
+
public static void Main ()
{
- int i = (C) +1;
+ Test ("t");
}
}
diff --git a/mcs/errors/cs0150-2.cs b/mcs/errors/cs0150-2.cs
new file mode 100644
index 00000000000..7e20f3f572e
--- /dev/null
+++ b/mcs/errors/cs0150-2.cs
@@ -0,0 +1,18 @@
+// CS0150: A constant value is expected
+// Line : 14
+
+using System;
+
+public class Blah
+{
+ static readonly string Test;
+
+ public static void Main ()
+ {
+ string s = null;
+ switch (s) {
+ case Blah.Test:
+ break;
+ }
+ }
+}
diff --git a/mcs/errors/cs0162-18.cs b/mcs/errors/cs0162-18.cs
new file mode 100644
index 00000000000..6b393ae94f6
--- /dev/null
+++ b/mcs/errors/cs0162-18.cs
@@ -0,0 +1,21 @@
+// CS0162: Unreachable code detected
+// Line: 10
+// Compiler options: -warnaserror
+
+public class X
+{
+ public static void Main ()
+ {
+ return;
+
+ switch (8) {
+ case 1:
+ case 2:
+ break;
+ default:
+ return;
+ }
+
+ return;
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0162-19.cs b/mcs/errors/cs0162-19.cs
new file mode 100644
index 00000000000..b1f6ea3cf77
--- /dev/null
+++ b/mcs/errors/cs0162-19.cs
@@ -0,0 +1,14 @@
+// CS0162: Unreachable code detected
+// Line: 12
+// Compiler options: -warnaserror
+
+public class X
+{
+ static void test (int stop)
+ {
+ int pos = 0;
+ do {
+ break;
+ } while (pos < stop);
+ }
+}
diff --git a/mcs/errors/cs0165-21.cs b/mcs/errors/cs0165-21.cs
new file mode 100644
index 00000000000..2f6bbc1a4e6
--- /dev/null
+++ b/mcs/errors/cs0165-21.cs
@@ -0,0 +1,19 @@
+// CS0165: Use of unassigned local variable `v'
+// Line: 17
+
+using System;
+
+class C
+{
+ void Test (int arg)
+ {
+ int v;
+ switch (arg) {
+ case 1:
+ v = 0;
+ break;
+ }
+
+ Console.WriteLine (v);
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0177-13.cs b/mcs/errors/cs0177-13.cs
new file mode 100644
index 00000000000..b655a659c81
--- /dev/null
+++ b/mcs/errors/cs0177-13.cs
@@ -0,0 +1,14 @@
+// CS0177: The out parameter `baz' must be assigned to before control leaves the current method
+// Line: 6
+
+static class A
+{
+ public static void Foo (int i, out object baz)
+ {
+ switch (i) {
+ case 0:
+ baz = 1;
+ return;
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0193.cs b/mcs/errors/cs0193.cs
index 96da3d7d0e7..3eae90ffd6e 100644
--- a/mcs/errors/cs0193.cs
+++ b/mcs/errors/cs0193.cs
@@ -7,8 +7,6 @@ unsafe class X {
{
int a = 0;
if (*a == 0)
- return 1;
-
- return 0;
+ return;
}
}
diff --git a/mcs/errors/cs0208-17.cs b/mcs/errors/cs0208-17.cs
new file mode 100644
index 00000000000..a0127ab9e20
--- /dev/null
+++ b/mcs/errors/cs0208-17.cs
@@ -0,0 +1,12 @@
+// CS0208: Cannot take the address of, get the size of, or declare a pointer to a managed type `T'
+// Line: 7
+// Compiler options: -unsafe
+
+unsafe class Foo<T> where T : struct
+{
+ public T* Elements {
+ get {
+ return null;
+ }
+ }
+}
diff --git a/mcs/errors/cs0429-3.cs b/mcs/errors/cs0429-3.cs
new file mode 100644
index 00000000000..b8572b5ba8b
--- /dev/null
+++ b/mcs/errors/cs0429-3.cs
@@ -0,0 +1,11 @@
+// CS0429: Unreachable expression code detected
+// Line: 9
+// Compiler options: -warn:4 -warnaserror
+
+class Main
+{
+ public void Method (int i)
+ {
+ var x = true ? 1 : i;
+ }
+}
diff --git a/mcs/errors/cs0452-11.cs b/mcs/errors/cs0452-11.cs
new file mode 100644
index 00000000000..f0681aae7e7
--- /dev/null
+++ b/mcs/errors/cs0452-11.cs
@@ -0,0 +1,10 @@
+// CS0452: The type `int' must be a reference type in order to use it as type parameter `T' in the generic type or method `Program.M<T>(T, T)'
+// Line: 8
+
+class Program
+{
+ public static void M<T> (T item1, T item2 = null) where T : class
+ {
+ M (1);
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0458-17.cs b/mcs/errors/cs0458-17.cs
new file mode 100644
index 00000000000..748f7730f37
--- /dev/null
+++ b/mcs/errors/cs0458-17.cs
@@ -0,0 +1,12 @@
+// CS0458: The result of the expression is always `null' of type `int?'
+// Line: 10
+// Compiler options: -warnaserror -warn:2
+
+class C
+{
+ public static void Main ()
+ {
+ int i = 44;
+ i <<= null;
+ }
+}
diff --git a/mcs/errors/cs0472-5.cs b/mcs/errors/cs0472-5.cs
new file mode 100644
index 00000000000..f699d71efee
--- /dev/null
+++ b/mcs/errors/cs0472-5.cs
@@ -0,0 +1,14 @@
+// CS0472: The result of comparing value type `byte' with null is always `false'
+// Line: 9
+// Compiler options: -warnaserror -warn:2
+
+class C
+{
+ public static bool Test (byte value)
+ {
+ if (value == null)
+ return false;
+
+ return true;
+ }
+}
diff --git a/mcs/errors/cs0534-11.cs b/mcs/errors/cs0534-11.cs
new file mode 100644
index 00000000000..7d67ac65158
--- /dev/null
+++ b/mcs/errors/cs0534-11.cs
@@ -0,0 +1,17 @@
+// CS0534: `Foo' does not implement inherited abstract member `SomeAbstract.SomeProperty.get'
+// Line: 13
+
+public class SomeProperty
+{
+}
+
+public abstract class SomeAbstract
+{
+ public abstract SomeProperty SomeProperty { get; }
+}
+
+public class Foo : SomeAbstract
+{
+ public static SomeProperty SomeProperty { get { return null; } }
+}
+
diff --git a/mcs/errors/cs0540-3.cs b/mcs/errors/cs0540-3.cs
new file mode 100644
index 00000000000..99f5f5efa85
--- /dev/null
+++ b/mcs/errors/cs0540-3.cs
@@ -0,0 +1,27 @@
+// CS0540: `Foo.ISomeProp.SomeProperty': containing type does not implement interface `ISomeProp'
+// Line: 18
+
+public class SomeProperty
+{
+}
+
+public abstract class SomeAbstract : ISomeProp
+{
+ public abstract SomeProperty SomeProperty { get; }
+}
+
+interface ISomeProp
+{
+ SomeProperty SomeProperty { get; }
+}
+
+public class Foo : SomeAbstract
+{
+ SomeProperty ISomeProp.SomeProperty { get { return null; } }
+
+ public override SomeProperty SomeProperty { get { return null; } }
+
+ public static void Main ()
+ {
+ }
+}
diff --git a/mcs/errors/cs0576-3.cs b/mcs/errors/cs0576-3.cs
new file mode 100644
index 00000000000..2d18df0eb0d
--- /dev/null
+++ b/mcs/errors/cs0576-3.cs
@@ -0,0 +1,15 @@
+// CS0576: Namespace `global::' contains a definition with same name as alias `A'
+// Line: 12
+
+using A = System;
+
+namespace A.Foo
+{
+ class X
+ {
+ public static void Main ()
+ {
+ A.GG ();
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0658-4.cs b/mcs/errors/cs0658-4.cs
new file mode 100644
index 00000000000..5073abc227c
--- /dev/null
+++ b/mcs/errors/cs0658-4.cs
@@ -0,0 +1,18 @@
+// CS0658: `)' is invalid attribute target. All attributes in this attribute section will be ignored
+// Line : 9
+// Compiler options: -warnaserror -warn:1
+
+namespace CompilerCrashWithAttributes
+{
+ public class Main
+ {
+ [MyAttribute1, MyAttribute1)]
+ public Main ()
+ {
+ }
+ }
+
+ public class MyAttribute1 : Attribute
+ {
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0717-2.cs b/mcs/errors/cs0717-2.cs
new file mode 100644
index 00000000000..f64faa34967
--- /dev/null
+++ b/mcs/errors/cs0717-2.cs
@@ -0,0 +1,7 @@
+// CS0717: `System.Console' is not a valid constraint. Static classes cannot be used as constraints
+// Line: 6
+
+abstract class C
+{
+ public abstract void Foo<U> () where U : System.Console;
+}
diff --git a/mcs/errors/cs1503-14.cs b/mcs/errors/cs1503-14.cs
new file mode 100644
index 00000000000..26422fa367d
--- /dev/null
+++ b/mcs/errors/cs1503-14.cs
@@ -0,0 +1,25 @@
+// CS1503: Argument `#2' cannot convert `IContravariant<object>' expression to type `ICovariant<string>'
+// Line: 23
+
+interface IContravariant<in T>
+{
+}
+
+interface ICovariant<out T>
+{
+}
+
+class C
+{
+ public static void Test<T> (ICovariant<T> e1, ICovariant<T> e2)
+ {
+ }
+
+ public static void Main ()
+ {
+ ICovariant<string> a_2 = null;
+ IContravariant<object> b_2 = null;
+
+ Test (a_2, b_2);
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0411-15.cs b/mcs/errors/cs1503-15.cs
index ed39e457d9b..4313fcf2c8d 100644
--- a/mcs/errors/cs0411-15.cs
+++ b/mcs/errors/cs1503-15.cs
@@ -1,5 +1,5 @@
-// CS0411: The type arguments for method `C.Foo<T>(IFoo<T>, IFoo<T>)' cannot be inferred from the usage. Try specifying the type arguments explicitly
-// Line: 17
+// CS1503: Argument `#2' cannot convert `IFoo<object>' expression to type `IFoo<int>'
+// Line: 18
interface IFoo<in T>
{
diff --git a/mcs/errors/cs0411-7.cs b/mcs/errors/cs1503-16.cs
index c22648e5d8e..24fa1e66628 100644
--- a/mcs/errors/cs0411-7.cs
+++ b/mcs/errors/cs1503-16.cs
@@ -1,4 +1,4 @@
-// CS0411: The type arguments for method `C.Foo<T>(T, System.Collections.Generic.Comparer<T>)' cannot be inferred from the usage. Try specifying the type arguments explicitly
+// CS1503: Argument `#2' cannot convert `method group' expression to type `System.Collections.Generic.Comparer<int>'
// Line: 20
using System;
diff --git a/mcs/errors/cs1648-2.cs b/mcs/errors/cs1648-2.cs
new file mode 100644
index 00000000000..b470e10acec
--- /dev/null
+++ b/mcs/errors/cs1648-2.cs
@@ -0,0 +1,23 @@
+// CS1648: Members of readonly field `Test.p' cannot be modified (except in a constructor or a variable initializer)
+// Line: 17
+
+using System;
+
+public class Test
+{
+ struct Container
+ {
+ public int foo { get; set; }
+ }
+
+ readonly Container p;
+
+ void Foo ()
+ {
+ p.foo = 0;
+ }
+
+ public static void Main ()
+ {
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs1648-3.cs b/mcs/errors/cs1648-3.cs
new file mode 100644
index 00000000000..7afc29f1930
--- /dev/null
+++ b/mcs/errors/cs1648-3.cs
@@ -0,0 +1,26 @@
+// CS1648: Members of readonly field `Test.p' cannot be modified (except in a constructor or a variable initializer)
+// Line: 17
+
+using System;
+
+public class Test
+{
+ struct Container
+ {
+ public int this[int arg] {
+ set {
+ }
+ }
+ }
+
+ readonly Container p;
+
+ void Foo ()
+ {
+ p[0] = 0;
+ }
+
+ public static void Main ()
+ {
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs1650-2.cs b/mcs/errors/cs1650-2.cs
new file mode 100644
index 00000000000..9aa902d435d
--- /dev/null
+++ b/mcs/errors/cs1650-2.cs
@@ -0,0 +1,18 @@
+// CS1650: Fields of static readonly field `C.s' cannot be assigned to (except in a static constructor or a variable initializer)
+// Line: 15
+
+struct S
+{
+ public int x { get; set; }
+}
+
+class C
+{
+ static readonly S s;
+
+ public static void Main (string[] args)
+ {
+ s.x = 42;
+ }
+}
+
diff --git a/mcs/errors/cs1678-2.cs b/mcs/errors/cs1678-2.cs
new file mode 100644
index 00000000000..03a71197aa0
--- /dev/null
+++ b/mcs/errors/cs1678-2.cs
@@ -0,0 +1,16 @@
+// CS1678: Parameter `1' is declared as type `T' but should be `IStream<T>'
+// Line: 14
+
+using System;
+
+interface IStream<T>
+{
+}
+
+static class X
+{
+ public static IStream<U> Select<T, U> (IStream<T> stream, Func<IStream<T>, U> selector)
+ {
+ return Select<T, U> (stream, (T _) => selector(stream));
+ }
+}
diff --git a/mcs/errors/cs1678.cs b/mcs/errors/cs1678.cs
index fae8c192237..dfd5352859a 100644
--- a/mcs/errors/cs1678.cs
+++ b/mcs/errors/cs1678.cs
@@ -1,8 +1,6 @@
// CS1678: Parameter `1' is declared as type `long' but should be `int'
-// Line: 11
-//
-// Signature mismatch.
-//
+// Line: 9
+
delegate void D (int x);
class X {
diff --git a/mcs/errors/cs1739-4.cs b/mcs/errors/cs1739-4.cs
new file mode 100644
index 00000000000..ab18a009beb
--- /dev/null
+++ b/mcs/errors/cs1739-4.cs
@@ -0,0 +1,14 @@
+// CS1739: The best overloaded method match for `Program.M(int, int, int)' does not contain a parameter named `whatever'
+// Line: 8
+
+public class Program
+{
+ public static void Main ()
+ {
+ M (z: 1, whatever: 0);
+ }
+
+ void M (int x = 0, int y = 0, int z = 0)
+ {
+ }
+}
diff --git a/mcs/errors/cs1750-4.cs b/mcs/errors/cs1750-4.cs
new file mode 100644
index 00000000000..44997808ff3
--- /dev/null
+++ b/mcs/errors/cs1750-4.cs
@@ -0,0 +1,23 @@
+// CS1750: Optional parameter expression of type `null' cannot be converted to parameter type `A'
+// Line: 8
+
+using System;
+
+class GenericClass<T>
+{
+ public GenericClass (GenericClass<T> g = null, A a = null)
+ {
+ }
+}
+
+class DerivedClass<T> : GenericClass<T>
+{
+ public DerivedClass (GenericClass<T> g) : base(g)
+ {
+ }
+}
+
+public struct A
+{
+ public int Field;
+}
diff --git a/mcs/errors/known-issues-net_4_5 b/mcs/errors/known-issues-net_4_5
index 5d05d2ad676..cbad5a36cf8 100644
--- a/mcs/errors/known-issues-net_4_5
+++ b/mcs/errors/known-issues-net_4_5
@@ -15,6 +15,7 @@
cs0080.cs
cs0162-7.cs NO ERROR
+cs0165-3.cs
# Operators
cs0457-2.cs
diff --git a/mcs/jay/jay.vcxproj b/mcs/jay/jay.vcxproj
index cd9d1099f65..80468e43cca 100644
--- a/mcs/jay/jay.vcxproj
+++ b/mcs/jay/jay.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -19,10 +19,12 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/mcs/mcs/anonymous.cs b/mcs/mcs/anonymous.cs
index 26a77a41a05..27b1485f56a 100644
--- a/mcs/mcs/anonymous.cs
+++ b/mcs/mcs/anonymous.cs
@@ -191,15 +191,27 @@ namespace Mono.CSharp {
sealed class ThisInitializer : Statement
{
readonly HoistedThis hoisted_this;
+ readonly AnonymousMethodStorey parent;
- public ThisInitializer (HoistedThis hoisted_this)
+ public ThisInitializer (HoistedThis hoisted_this, AnonymousMethodStorey parent)
{
this.hoisted_this = hoisted_this;
+ this.parent = parent;
}
protected override void DoEmit (EmitContext ec)
{
- hoisted_this.EmitAssign (ec, new CompilerGeneratedThis (ec.CurrentType, loc), false, false);
+ Expression source;
+
+ if (parent == null)
+ source = new CompilerGeneratedThis (ec.CurrentType, loc);
+ else {
+ source = new FieldExpr (parent.HoistedThis.Field, Location.Null) {
+ InstanceExpression = new CompilerGeneratedThis (ec.CurrentType, Location.Null)
+ };
+ }
+
+ hoisted_this.EmitAssign (ec, source, false, false);
}
protected override void CloneTo (CloneContext clonectx, Statement target)
@@ -229,22 +241,24 @@ namespace Mono.CSharp {
public Expression Instance;
bool initialize_hoisted_this;
+ AnonymousMethodStorey hoisted_this_parent;
public AnonymousMethodStorey (ExplicitBlock block, TypeDefinition parent, MemberBase host, TypeParameters tparams, string name, MemberKind kind)
- : base (parent, MakeMemberName (host, name, parent.Module.CounterAnonymousContainers, tparams, block.StartLocation),
+ : base (parent, MakeMemberName (host, name, parent.PartialContainer.CounterAnonymousContainers, tparams, block.StartLocation),
tparams, 0, kind)
{
OriginalSourceBlock = block;
- ID = parent.Module.CounterAnonymousContainers++;
+ ID = parent.PartialContainer.CounterAnonymousContainers++;
}
- public void AddCapturedThisField (EmitContext ec)
+ public void AddCapturedThisField (EmitContext ec, AnonymousMethodStorey parent)
{
TypeExpr type_expr = new TypeExpression (ec.CurrentType, Location);
Field f = AddCompilerGeneratedField ("$this", type_expr);
hoisted_this = new HoistedThis (this, f);
initialize_hoisted_this = true;
+ hoisted_this_parent = parent;
}
public Field AddCapturedVariable (string name, TypeSpec type)
@@ -553,7 +567,7 @@ namespace Mono.CSharp {
// referenced indirectly
//
if (initialize_hoisted_this) {
- rc.CurrentBlock.AddScopeStatement (new ThisInitializer (hoisted_this));
+ rc.CurrentBlock.AddScopeStatement (new ThisInitializer (hoisted_this, hoisted_this_parent));
}
//
@@ -956,6 +970,12 @@ namespace Mono.CSharp {
}
}
+ public override bool IsSideEffectFree {
+ get {
+ return true;
+ }
+ }
+
public ParametersCompiled Parameters {
get {
return Block.Parameters;
@@ -1007,9 +1027,9 @@ namespace Mono.CSharp {
return null;
}
- protected bool VerifyExplicitParameters (ResolveContext ec, TypeSpec delegate_type, AParametersCollection parameters)
+ protected bool VerifyExplicitParameters (ResolveContext ec, TypeInferenceContext tic, TypeSpec delegate_type, AParametersCollection parameters)
{
- if (VerifyParameterCompatibility (ec, delegate_type, parameters, ec.IsInProbingMode))
+ if (VerifyParameterCompatibility (ec, tic, delegate_type, parameters, ec.IsInProbingMode))
return true;
if (!ec.IsInProbingMode)
@@ -1020,7 +1040,7 @@ namespace Mono.CSharp {
return false;
}
- protected bool VerifyParameterCompatibility (ResolveContext ec, TypeSpec delegate_type, AParametersCollection invoke_pd, bool ignore_errors)
+ protected bool VerifyParameterCompatibility (ResolveContext ec, TypeInferenceContext tic, TypeSpec delegate_type, AParametersCollection invoke_pd, bool ignore_errors)
{
if (Parameters.Count != invoke_pd.Count) {
if (ignore_errors)
@@ -1053,14 +1073,11 @@ namespace Mono.CSharp {
continue;
TypeSpec type = invoke_pd.Types [i];
+
+ if (tic != null)
+ type = tic.InflateGenericArgument (ec, type);
- //
- // Assumes that generic mvar parameters are always inflated
- //
- if (ImplicitDelegateCreation.ContainsMethodTypeParameter (type))
- continue;
-
- if (!TypeSpecComparer.IsEqual (invoke_pd.Types [i], Parameters.Types [i])) {
+ if (!TypeSpecComparer.IsEqual (type, Parameters.Types [i])) {
if (ignore_errors)
return false;
@@ -1078,7 +1095,7 @@ namespace Mono.CSharp {
//
// Infers type arguments based on explicit arguments
//
- public bool ExplicitTypeInference (ResolveContext ec, TypeInferenceContext type_inference, TypeSpec delegate_type)
+ public bool ExplicitTypeInference (TypeInferenceContext type_inference, TypeSpec delegate_type)
{
if (!HasExplicitParameters)
return false;
@@ -1292,7 +1309,7 @@ namespace Mono.CSharp {
return ParametersCompiled.CreateFullyResolved (fixedpars, delegate_parameters.Types);
}
- if (!VerifyExplicitParameters (ec, delegate_type, delegate_parameters)) {
+ if (!VerifyExplicitParameters (ec, tic, delegate_type, delegate_parameters)) {
return null;
}
@@ -1505,7 +1522,7 @@ namespace Mono.CSharp {
var bc = ec as BlockContext;
if (bc != null)
- aec.FlowOffset = bc.FlowOffset;
+ aec.AssignmentInfoOffset = bc.AssignmentInfoOffset;
var errors = ec.Report.Errors;
@@ -1518,10 +1535,14 @@ namespace Mono.CSharp {
//
// If e is synchronous the inferred return type is T
- // If e is asynchronous the inferred return type is Task<T>
+ // If e is asynchronous and the body of F is either an expression classified as nothing
+ // or a statement block where no return statements have expressions, the inferred return type is Task
+ // If e is async and has an inferred result type T, the inferred return type is Task<T>
//
if (block.IsAsync && ReturnType != null) {
- ReturnType = ec.Module.PredefinedTypes.TaskGeneric.TypeSpec.MakeGenericType (ec, new [] { ReturnType });
+ ReturnType = ReturnType.Kind == MemberKind.Void ?
+ ec.Module.PredefinedTypes.Task.TypeSpec :
+ ec.Module.PredefinedTypes.TaskGeneric.TypeSpec.MakeGenericType (ec, new [] { ReturnType });
}
}
@@ -1660,7 +1681,7 @@ namespace Mono.CSharp {
// enough. No hoisted variables only 'this' and don't need to
// propagate this to value type state machine.
//
- StateMachine sm_parent = null;
+ StateMachine sm_parent;
var pb = src_block.ParametersBlock;
do {
sm_parent = pb.StateMachine;
@@ -1672,18 +1693,17 @@ namespace Mono.CSharp {
} else if (sm_parent.Kind == MemberKind.Struct) {
//
// Special case where parent class is used to emit instance method
- // because currect storey is of value type (async host). We cannot
+ // because currect storey is of value type (async host) and we cannot
// use ldftn on non-boxed instances either to share mutated state
//
parent = sm_parent.Parent.PartialContainer;
+ } else if (sm is IteratorStorey) {
+ //
+ // For iterators we can host everything in one class
+ //
+ parent = storey = sm;
}
}
-
- //
- // For iterators we can host everything in one class
- //
- if (sm is IteratorStorey)
- parent = storey = sm;
}
modifiers = storey != null ? Modifiers.INTERNAL : Modifiers.PRIVATE;
@@ -1698,7 +1718,7 @@ namespace Mono.CSharp {
parent = ec.CurrentTypeDefinition.Parent.PartialContainer;
string name = CompilerGeneratedContainer.MakeName (parent != storey ? block_name : null,
- "m", null, ec.Module.CounterAnonymousMethods++);
+ "m", null, parent.PartialContainer.CounterAnonymousMethods++);
MemberName member_name;
if (storey == null && ec.CurrentTypeParameters != null) {
@@ -1806,12 +1826,8 @@ namespace Mono.CSharp {
// Special case for value type storey where this is not lifted but
// droped off to parent class
//
- for (var b = Block.Parent; b != null; b = b.Parent) {
- if (b.ParametersBlock.StateMachine != null) {
- ec.Emit (OpCodes.Ldfld, b.ParametersBlock.StateMachine.HoistedThis.Field.Spec);
- break;
- }
- }
+ if (ec.CurrentAnonymousMethod != null && ec.AsyncTaskStorey != null)
+ ec.Emit (OpCodes.Ldfld, ec.AsyncTaskStorey.HoistedThis.Field.Spec);
}
var delegate_method = method.Spec;
@@ -1990,7 +2006,7 @@ namespace Mono.CSharp {
Method tostring = new Method (this, new TypeExpression (Compiler.BuiltinTypes.String, loc),
Modifiers.PUBLIC | Modifiers.OVERRIDE | Modifiers.DEBUGGER_HIDDEN, new MemberName ("ToString", loc),
- Mono.CSharp.ParametersCompiled.EmptyReadOnlyParameters, null);
+ ParametersCompiled.EmptyReadOnlyParameters, null);
ToplevelBlock equals_block = new ToplevelBlock (Compiler, equals.ParameterInfo, loc);
@@ -2099,7 +2115,7 @@ namespace Mono.CSharp {
Method hashcode = new Method (this, new TypeExpression (Compiler.BuiltinTypes.Int, loc),
Modifiers.PUBLIC | Modifiers.OVERRIDE | Modifiers.DEBUGGER_HIDDEN,
new MemberName ("GetHashCode", loc),
- Mono.CSharp.ParametersCompiled.EmptyReadOnlyParameters, null);
+ ParametersCompiled.EmptyReadOnlyParameters, null);
//
// Modified FNV with good avalanche behavior and uniform
diff --git a/mcs/mcs/assembly.cs b/mcs/mcs/assembly.cs
index b2e4e9a2018..4bbb7f32313 100644
--- a/mcs/mcs/assembly.cs
+++ b/mcs/mcs/assembly.cs
@@ -919,7 +919,7 @@ namespace Mono.CSharp
return;
}
- var mtype = texpr.Type.MemberDefinition as ClassOrStruct;
+ var mtype = texpr.MemberDefinition as ClassOrStruct;
if (mtype == null) {
Report.Error (1556, "`{0}' specified for Main method must be a valid class or struct", main_class);
return;
@@ -1110,13 +1110,13 @@ namespace Mono.CSharp
}
}
- abstract class AssemblyReferencesLoader<T>
+ abstract class AssemblyReferencesLoader<T> where T : class
{
protected readonly CompilerContext compiler;
protected readonly List<string> paths;
- public AssemblyReferencesLoader (CompilerContext compiler)
+ protected AssemblyReferencesLoader (CompilerContext compiler)
{
this.compiler = compiler;
diff --git a/mcs/mcs/assign.cs b/mcs/mcs/assign.cs
index 61cb8e23927..49595edd0f4 100644
--- a/mcs/mcs/assign.cs
+++ b/mcs/mcs/assign.cs
@@ -807,7 +807,9 @@ namespace Mono.CSharp {
if (b == null) {
if (source is ReducedExpression)
b = ((ReducedExpression) source).OriginalExpression as Binary;
- else if (source is Nullable.LiftedBinaryOperator) {
+ else if (source is ReducedExpression.ReducedConstantExpression) {
+ b = ((ReducedExpression.ReducedConstantExpression) source).OriginalExpression as Binary;
+ } else if (source is Nullable.LiftedBinaryOperator) {
var po = ((Nullable.LiftedBinaryOperator) source);
if (po.UserOperator == null)
b = po.Binary;
diff --git a/mcs/mcs/async.cs b/mcs/mcs/async.cs
index 6997d7ca850..daa00731362 100644
--- a/mcs/mcs/async.cs
+++ b/mcs/mcs/async.cs
@@ -195,7 +195,9 @@ namespace Mono.CSharp
protected override void DoEmit (EmitContext ec)
{
- GetResultExpression (ec).Emit (ec);
+ using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
+ GetResultExpression (ec).Emit (ec);
+ }
}
public Expression GetResultExpression (EmitContext ec)
@@ -219,39 +221,39 @@ namespace Mono.CSharp
public void EmitPrologue (EmitContext ec)
{
- awaiter = ((AsyncTaskStorey) machine_initializer.Storey).AddAwaiter (expr.Type, loc);
+ awaiter = ((AsyncTaskStorey) machine_initializer.Storey).AddAwaiter (expr.Type);
var fe_awaiter = new FieldExpr (awaiter, loc);
fe_awaiter.InstanceExpression = new CompilerGeneratedThis (ec.CurrentType, loc);
- //
- // awaiter = expr.GetAwaiter ();
- //
+ Label skip_continuation = ec.DefineLabel ();
+
using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
+ //
+ // awaiter = expr.GetAwaiter ();
+ //
fe_awaiter.EmitAssign (ec, expr, false, false);
- }
- Label skip_continuation = ec.DefineLabel ();
+ Expression completed_expr;
+ if (IsDynamic) {
+ var rc = new ResolveContext (ec.MemberContext);
- Expression completed_expr;
- if (IsDynamic) {
- var rc = new ResolveContext (ec.MemberContext);
+ Arguments dargs = new Arguments (1);
+ dargs.Add (new Argument (fe_awaiter));
+ completed_expr = new DynamicMemberBinder ("IsCompleted", dargs, loc).Resolve (rc);
- Arguments dargs = new Arguments (1);
- dargs.Add (new Argument (fe_awaiter));
- completed_expr = new DynamicMemberBinder ("IsCompleted", dargs, loc).Resolve (rc);
+ dargs = new Arguments (1);
+ dargs.Add (new Argument (completed_expr));
+ completed_expr = new DynamicConversion (ec.Module.Compiler.BuiltinTypes.Bool, 0, dargs, loc).Resolve (rc);
+ } else {
+ var pe = PropertyExpr.CreatePredefined (awaiter_definition.IsCompleted, loc);
+ pe.InstanceExpression = fe_awaiter;
+ completed_expr = pe;
+ }
- dargs = new Arguments (1);
- dargs.Add (new Argument (completed_expr));
- completed_expr = new DynamicConversion (ec.Module.Compiler.BuiltinTypes.Bool, 0, dargs, loc).Resolve (rc);
- } else {
- var pe = PropertyExpr.CreatePredefined (awaiter_definition.IsCompleted, loc);
- pe.InstanceExpression = fe_awaiter;
- completed_expr = pe;
+ completed_expr.EmitBranchable (ec, skip_continuation, true);
}
- completed_expr.EmitBranchable (ec, skip_continuation, true);
-
base.DoEmit (ec);
//
@@ -407,11 +409,6 @@ namespace Mono.CSharp
return ctx;
}
- public override Expression CreateExpressionTree (ResolveContext ec)
- {
- return base.CreateExpressionTree (ec);
- }
-
public override void Emit (EmitContext ec)
{
throw new NotImplementedException ();
@@ -481,12 +478,12 @@ namespace Mono.CSharp
#endregion
- public Field AddAwaiter (TypeSpec type, Location loc)
+ public Field AddAwaiter (TypeSpec type)
{
if (mutator != null)
type = mutator.Mutate (type);
- List<Field> existing_fields = null;
+ List<Field> existing_fields;
if (awaiter_fields.TryGetValue (type, out existing_fields)) {
foreach (var f in existing_fields) {
if (f.IsAvailableForReuse) {
@@ -741,7 +738,9 @@ namespace Mono.CSharp
var args = new Arguments (2);
args.Add (new Argument (awaiter, Argument.AType.Ref));
args.Add (new Argument (new CompilerGeneratedThis (CurrentType, Location), Argument.AType.Ref));
- mg.EmitCall (ec, args);
+ using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
+ mg.EmitCall (ec, args);
+ }
}
public void EmitInitializer (EmitContext ec)
@@ -817,7 +816,9 @@ namespace Mono.CSharp
Arguments args = new Arguments (1);
args.Add (new Argument (exceptionVariable));
- mg.EmitCall (ec, args);
+ using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
+ mg.EmitCall (ec, args);
+ }
}
public void EmitSetResult (EmitContext ec)
@@ -839,7 +840,9 @@ namespace Mono.CSharp
args.Add (new Argument (new LocalVariableReference (hoisted_return, Location)));
}
- mg.EmitCall (ec, args);
+ using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
+ mg.EmitCall (ec, args);
+ }
}
protected override TypeSpec[] ResolveBaseTypes (out FullNamedExpression base_class)
diff --git a/mcs/mcs/attribute.cs b/mcs/mcs/attribute.cs
index d40665d116a..87174664d48 100644
--- a/mcs/mcs/attribute.cs
+++ b/mcs/mcs/attribute.cs
@@ -1072,7 +1072,7 @@ namespace Mono.CSharp {
cdata = encoder.ToArray ();
}
- if (!ctor.DeclaringType.IsConditionallyExcluded (context, Location)) {
+ if (!ctor.DeclaringType.IsConditionallyExcluded (context)) {
try {
foreach (Attributable target in targets)
target.ApplyAttributeBuilder (this, ctor, cdata, predefined);
@@ -1158,7 +1158,7 @@ namespace Mono.CSharp {
public Attributes (List<Attribute> attrs)
{
- Attrs = attrs;
+ Attrs = attrs ?? new List<Attribute> ();
}
public void AddAttribute (Attribute attr)
@@ -1650,6 +1650,7 @@ namespace Mono.CSharp {
public readonly PredefinedAttribute UnsafeValueType;
public readonly PredefinedAttribute UnmanagedFunctionPointer;
public readonly PredefinedDebuggerBrowsableAttribute DebuggerBrowsable;
+ public readonly PredefinedAttribute DebuggerStepThrough;
// New in .NET 3.5
public readonly PredefinedAttribute Extension;
@@ -1716,6 +1717,7 @@ namespace Mono.CSharp {
UnsafeValueType = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "UnsafeValueTypeAttribute");
UnmanagedFunctionPointer = new PredefinedAttribute (module, "System.Runtime.InteropServices", "UnmanagedFunctionPointerAttribute");
DebuggerBrowsable = new PredefinedDebuggerBrowsableAttribute (module, "System.Diagnostics", "DebuggerBrowsableAttribute");
+ DebuggerStepThrough = new PredefinedAttribute (module, "System.Diagnostics", "DebuggerStepThroughAttribute");
Extension = new PredefinedAttribute (module, "System.Runtime.CompilerServices", "ExtensionAttribute");
diff --git a/mcs/mcs/cfold.cs b/mcs/mcs/cfold.cs
index 36121665288..96062f2748e 100644
--- a/mcs/mcs/cfold.cs
+++ b/mcs/mcs/cfold.cs
@@ -920,7 +920,7 @@ namespace Mono.CSharp {
IntConstant sic = right.ConvertImplicitly (ec.BuiltinTypes.Int) as IntConstant;
if (sic == null){
- Binary.Error_OperatorCannotBeApplied (ec, left, right, oper, loc); ;
+ Binary.Error_OperatorCannotBeApplied (ec, left, right, oper, loc);
return null;
}
int rshift_val = sic.Value;
diff --git a/mcs/mcs/class.cs b/mcs/mcs/class.cs
index 8343e82f2c7..6382365f6fc 100644
--- a/mcs/mcs/class.cs
+++ b/mcs/mcs/class.cs
@@ -53,7 +53,11 @@ namespace Mono.CSharp
protected bool is_defined;
- public TypeContainer (TypeContainer parent, MemberName name, Attributes attrs, MemberKind kind)
+ public int CounterAnonymousMethods { get; set; }
+ public int CounterAnonymousContainers { get; set; }
+ public int CounterSwitchTypes { get; set; }
+
+ protected TypeContainer (TypeContainer parent, MemberName name, Attributes attrs, MemberKind kind)
: base (parent, name, attrs)
{
this.Kind = kind;
@@ -98,9 +102,9 @@ namespace Mono.CSharp
get; set;
}
- public virtual void AddCompilerGeneratedClass (CompilerGeneratedContainer c)
+ public void AddCompilerGeneratedClass (CompilerGeneratedContainer c)
{
- containers.Add (c);
+ AddTypeContainerMember (c);
}
public virtual void AddPartial (TypeDefinition next_part)
@@ -187,15 +191,14 @@ namespace Mono.CSharp
next_part.PartialContainer = existing;
- if (containers == null)
- containers = new List<TypeContainer> ();
+ existing.AddPartialPart (next_part);
- containers.Add (next_part);
+ AddTypeContainerMember (next_part);
}
public virtual void AddTypeContainer (TypeContainer tc)
{
- containers.Add (tc);
+ AddTypeContainerMember (tc);
var tparams = tc.MemberName.TypeParameters;
if (tparams != null && tc.PartialContainer != null) {
@@ -210,6 +213,11 @@ namespace Mono.CSharp
}
}
+ protected virtual void AddTypeContainerMember (TypeContainer tc)
+ {
+ containers.Add (tc);
+ }
+
public virtual void CloseContainer ()
{
if (containers != null) {
@@ -512,6 +520,9 @@ namespace Mono.CSharp
protected List<FullNamedExpression> type_bases;
+ // Partial parts for classes only
+ List<TypeDefinition> class_partial_parts;
+
TypeDefinition InTransit;
public TypeBuilder TypeBuilder;
@@ -549,7 +560,7 @@ namespace Mono.CSharp
/// </remarks>
PendingImplementation pending;
- public TypeDefinition (TypeContainer parent, MemberName name, Attributes attrs, MemberKind kind)
+ protected TypeDefinition (TypeContainer parent, MemberName name, Attributes attrs, MemberKind kind)
: base (parent, name, attrs, kind)
{
PartialContainer = this;
@@ -741,7 +752,7 @@ namespace Mono.CSharp
}
}
- AddNameToContainer (symbol, symbol.MemberName.Basename);
+ AddNameToContainer (symbol, symbol.MemberName.Name);
members.Add (symbol);
}
@@ -749,21 +760,17 @@ namespace Mono.CSharp
{
AddNameToContainer (tc, tc.Basename);
- if (containers == null)
- containers = new List<TypeContainer> ();
-
- members.Add (tc);
base.AddTypeContainer (tc);
}
- public override void AddCompilerGeneratedClass (CompilerGeneratedContainer c)
+ protected override void AddTypeContainerMember (TypeContainer tc)
{
- members.Add (c);
+ members.Add (tc);
if (containers == null)
containers = new List<TypeContainer> ();
- base.AddCompilerGeneratedClass (c);
+ base.AddTypeContainerMember (tc);
}
//
@@ -861,6 +868,17 @@ namespace Mono.CSharp
AddMember (op);
}
+ public void AddPartialPart (TypeDefinition part)
+ {
+ if (Kind != MemberKind.Class)
+ return;
+
+ if (class_partial_parts == null)
+ class_partial_parts = new List<TypeDefinition> ();
+
+ class_partial_parts.Add (part);
+ }
+
public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, PredefinedAttributes pa)
{
if (has_normal_indexers && a.Type == pa.DefaultMember) {
@@ -957,7 +975,7 @@ namespace Mono.CSharp
if (s == null) {
s = EmptyExpressionStatement.Instance;
} else if (!fi.IsSideEffectFree) {
- has_complex_initializer |= true;
+ has_complex_initializer = true;
}
init [i] = s;
@@ -1429,6 +1447,14 @@ namespace Mono.CSharp
protected bool DefineBaseTypes ()
{
+ if (IsPartialPart && Kind == MemberKind.Class)
+ return true;
+
+ return DoDefineBaseType ();
+ }
+
+ bool DoDefineBaseType ()
+ {
iface_exprs = ResolveBaseTypes (out base_type_expr);
bool set_base_type;
@@ -1517,19 +1543,43 @@ namespace Mono.CSharp
}
if (set_base_type) {
- if (base_type != null) {
- spec.BaseType = base_type;
+ SetBaseType ();
+ }
+
+ //
+ // Base type of partial container has to be resolved before we
+ // resolve any nested types of the container. We need to know
+ // partial parts because the base type can be specified in file
+ // defined after current container
+ //
+ if (class_partial_parts != null) {
+ foreach (var pp in class_partial_parts)
+ pp.DoDefineBaseType ();
- // Set base type after type creation
- TypeBuilder.SetParent (base_type.GetMetaInfo ());
- } else {
- TypeBuilder.SetParent (null);
- }
}
return true;
}
+ void SetBaseType ()
+ {
+ if (base_type == null) {
+ TypeBuilder.SetParent (null);
+ return;
+ }
+
+ if (spec.BaseType == base_type)
+ return;
+
+ spec.BaseType = base_type;
+
+ if (IsPartialPart)
+ spec.UpdateInflatedInstancesBaseType ();
+
+ // Set base type after type creation
+ TypeBuilder.SetParent (base_type.GetMetaInfo ());
+ }
+
public override void ExpandBaseInterfaces ()
{
if (!IsPartialPart)
@@ -1774,7 +1824,7 @@ namespace Mono.CSharp
if (iface_type.Arity > 0) {
// TODO: passing `this' is wrong, should be base type iface instead
- TypeManager.CheckTypeVariance (iface_type, Variance.Covariant, this);
+ VarianceDecl.CheckTypeVariance (iface_type, Variance.Covariant, this);
if (((InflatedTypeSpec) iface_type).HasDynamicArgument () && !IsCompilerGenerated) {
Report.Error (1966, Location,
@@ -2081,8 +2131,13 @@ namespace Mono.CSharp
base.Emit ();
- for (int i = 0; i < members.Count; i++)
- members[i].Emit ();
+ for (int i = 0; i < members.Count; i++) {
+ var m = members[i];
+ if ((m.caching_flags & Flags.CloseTypeCreated) != 0)
+ continue;
+
+ m.Emit ();
+ }
EmitIndexerName ();
CheckAttributeClsCompliance ();
@@ -2252,11 +2307,20 @@ namespace Mono.CSharp
/// </summary>
public bool VerifyImplements (InterfaceMemberBase mb)
{
- var ifaces = spec.Interfaces;
+ var ifaces = PartialContainer.Interfaces;
if (ifaces != null) {
foreach (TypeSpec t in ifaces){
if (t == mb.InterfaceType)
return true;
+
+ var expanded_base = t.Interfaces;
+ if (expanded_base == null)
+ continue;
+
+ foreach (var bt in expanded_base) {
+ if (bt == mb.InterfaceType)
+ return true;
+ }
}
}
@@ -2423,7 +2487,7 @@ namespace Mono.CSharp
SecurityType declarative_security;
- public ClassOrStruct (TypeContainer parent, MemberName name, Attributes attrs, MemberKind kind)
+ protected ClassOrStruct (TypeContainer parent, MemberName name, Attributes attrs, MemberKind kind)
: base (parent, name, attrs, kind)
{
}
@@ -2606,7 +2670,7 @@ namespace Mono.CSharp
return;
}
- if (a.Type.IsConditionallyExcluded (this, Location))
+ if (a.Type.IsConditionallyExcluded (this))
return;
base.ApplyAttributeBuilder (a, ctor, cdata, pa);
@@ -3086,7 +3150,7 @@ namespace Mono.CSharp
readonly Modifiers explicit_mod_flags;
public MethodAttributes flags;
- public InterfaceMemberBase (TypeDefinition parent, FullNamedExpression type, Modifiers mod, Modifiers allowed_mod, MemberName name, Attributes attrs)
+ protected InterfaceMemberBase (TypeDefinition parent, FullNamedExpression type, Modifiers mod, Modifiers allowed_mod, MemberName name, Attributes attrs)
: base (parent, type, mod, allowed_mod, Modifiers.PRIVATE, name, attrs)
{
IsInterface = parent.Kind == MemberKind.Interface;
@@ -3204,7 +3268,7 @@ namespace Mono.CSharp
}
}
- if (!IsInterface && base_member.IsAbstract && !overrides) {
+ if (!IsInterface && base_member.IsAbstract && !overrides && !IsStatic) {
Report.SymbolRelatedToPreviousError (base_member);
Report.Error (533, Location, "`{0}' hides inherited abstract member `{1}'",
GetSignatureForError (), base_member.GetSignatureForError ());
@@ -3330,7 +3394,11 @@ namespace Mono.CSharp
Parent.PartialContainer.VerifyImplements (this);
}
- ModifiersExtensions.Check (Modifiers.AllowedExplicitImplFlags, explicit_mod_flags, 0, Location, Report);
+ Modifiers allowed_explicit = Modifiers.AllowedExplicitImplFlags;
+ if (this is Method)
+ allowed_explicit |= Modifiers.ASYNC;
+
+ ModifiersExtensions.Check (allowed_explicit, explicit_mod_flags, 0, Location, Report);
}
return base.Define ();
@@ -3374,7 +3442,7 @@ namespace Mono.CSharp
{
base.DoMemberTypeDependentChecks ();
- TypeManager.CheckTypeVariance (MemberType, ExpectedMemberTypeVariance, this);
+ VarianceDecl.CheckTypeVariance (MemberType, ExpectedMemberTypeVariance, this);
}
public override void Emit()
diff --git a/mcs/mcs/codegen.cs b/mcs/mcs/codegen.cs
index f2b22b9547c..319151bd093 100644
--- a/mcs/mcs/codegen.cs
+++ b/mcs/mcs/codegen.cs
@@ -248,6 +248,21 @@ namespace Mono.CSharp
return true;
}
+ public void MarkCallEntry (Location loc)
+ {
+ if (!EmitAccurateDebugInfo)
+ return;
+
+ //
+ // TODO: This should emit different kind of sequence point to make
+ // step-over work for statement over multiple lines
+ //
+ // Debugging experience for Foo (A () + B ()) where A and B are
+ // on separate lines is not great
+ //
+ Mark (loc);
+ }
+
public void DefineLocalVariable (string name, LocalBuilder builder)
{
if ((flags & Options.OmitDebugInfo) != 0)
@@ -284,6 +299,16 @@ namespace Mono.CSharp
#endif
}
+ public void BeginCompilerScope ()
+ {
+ if ((flags & Options.OmitDebugInfo) != 0)
+ return;
+
+#if NET_4_0
+ methodSymbols.StartBlock (CodeBlockEntry.Type.CompilerGenerated, ig.ILOffset);
+#endif
+ }
+
public void EndExceptionBlock ()
{
ig.EndExceptionBlock ();
@@ -944,7 +969,7 @@ namespace Mono.CSharp
public void Emit (EmitContext ec, MethodSpec method, Arguments Arguments, Location loc)
{
// Speed up the check by not doing it on not allowed targets
- if (method.ReturnType.Kind == MemberKind.Void && method.IsConditionallyExcluded (ec.MemberContext, loc))
+ if (method.ReturnType.Kind == MemberKind.Void && method.IsConditionallyExcluded (ec.MemberContext))
return;
EmitPredefined (ec, method, Arguments, loc);
@@ -1014,11 +1039,7 @@ namespace Mono.CSharp
// Emit explicit sequence point for expressions like Foo.Bar () to help debugger to
// break at right place when LHS expression can be stepped-into
//
- // TODO: The list is probably not comprehensive, need to do more testing
- //
- if (InstanceExpression is PropertyExpr || InstanceExpression is Invocation || InstanceExpression is IndexerExpr ||
- InstanceExpression is New || InstanceExpression is DelegateInvocation)
- ec.Mark (loc.Value);
+ ec.MarkCallEntry (loc.Value);
}
//
diff --git a/mcs/mcs/complete.cs b/mcs/mcs/complete.cs
index a1bb8ec00f4..6eb42cddada 100644
--- a/mcs/mcs/complete.cs
+++ b/mcs/mcs/complete.cs
@@ -109,28 +109,56 @@ namespace Mono.CSharp {
this.targs = targs;
}
- protected override Expression DoResolve (ResolveContext ec)
+ protected override Expression DoResolve (ResolveContext rc)
{
- Expression expr_resolved = expr.Resolve (ec,
- ResolveFlags.VariableOrValue | ResolveFlags.Type);
+ var sn = expr as SimpleName;
+ const ResolveFlags flags = ResolveFlags.VariableOrValue | ResolveFlags.Type;
+
+ //
+ // Resolve the expression with flow analysis turned off, we'll do the definite
+ // assignment checks later. This is because we don't know yet what the expression
+ // will resolve to - it may resolve to a FieldExpr and in this case we must do the
+ // definite assignment check on the actual field and not on the whole struct.
+ //
+ using (rc.Set (ResolveContext.Options.OmitStructFlowAnalysis)) {
+ if (sn != null) {
+ expr = sn.LookupNameExpression (rc, MemberLookupRestrictions.ReadAccess | MemberLookupRestrictions.ExactArity);
+
+ //
+ // Resolve expression which does have type set as we need expression type
+ // with disable flow analysis as we don't know whether left side expression
+ // is used as variable or type
+ //
+ if (expr is VariableReference || expr is ConstantExpr || expr is Linq.TransparentMemberAccess) {
+ using (rc.With (ResolveContext.Options.DoFlowAnalysis, false)) {
+ expr = expr.Resolve (rc);
+ }
+ } else if (expr is TypeParameterExpr) {
+ expr.Error_UnexpectedKind (rc, flags, sn.Location);
+ expr = null;
+ }
+ } else {
+ expr = expr.Resolve (rc, flags);
+ }
+ }
- if (expr_resolved == null)
+ if (expr == null)
return null;
- TypeSpec expr_type = expr_resolved.Type;
+ TypeSpec expr_type = expr.Type;
if (expr_type.IsPointer || expr_type.Kind == MemberKind.Void || expr_type == InternalType.NullLiteral || expr_type == InternalType.AnonymousMethod) {
- expr_resolved.Error_OperatorCannotBeApplied (ec, loc, ".", expr_type);
+ expr.Error_OperatorCannotBeApplied (rc, loc, ".", expr_type);
return null;
}
if (targs != null) {
- if (!targs.Resolve (ec))
+ if (!targs.Resolve (rc))
return null;
}
var results = new List<string> ();
- if (expr_resolved is Namespace){
- Namespace nexpr = expr_resolved as Namespace;
+ if (expr is Namespace) {
+ Namespace nexpr = expr as Namespace;
string namespaced_partial;
if (partial_name == null)
@@ -138,11 +166,11 @@ namespace Mono.CSharp {
else
namespaced_partial = nexpr.Name + "." + partial_name;
- ec.CurrentMemberDefinition.GetCompletionStartingWith (namespaced_partial, results);
+ rc.CurrentMemberDefinition.GetCompletionStartingWith (namespaced_partial, results);
if (partial_name != null)
results = results.Select (l => l.Substring (partial_name.Length)).ToList ();
} else {
- var r = MemberCache.GetCompletitionMembers (ec, expr_type, partial_name).Select (l => l.Name);
+ var r = MemberCache.GetCompletitionMembers (rc, expr_type, partial_name).Select (l => l.Name);
AppendResults (results, partial_name, r);
}
diff --git a/mcs/mcs/constant.cs b/mcs/mcs/constant.cs
index 397d72c9a4a..799d81bfac6 100644
--- a/mcs/mcs/constant.cs
+++ b/mcs/mcs/constant.cs
@@ -70,7 +70,7 @@ namespace Mono.CSharp {
}
}
- public Constant ImplicitConversionRequired (ResolveContext ec, TypeSpec type, Location loc)
+ public Constant ImplicitConversionRequired (ResolveContext ec, TypeSpec type)
{
Constant c = ConvertImplicitly (type);
if (c == null)
@@ -89,7 +89,7 @@ namespace Mono.CSharp {
if (this.type == type)
return this;
- if (!Convert.ImplicitNumericConversionExists (this.type, type))
+ if (!Convert.ImplicitNumericConversionExists (this.type, type))
return null;
bool fail;
@@ -162,6 +162,88 @@ namespace Mono.CSharp {
#endif
}
+ //
+ // Returns a constant instance based on value and type. This is probing version of
+ // CreateConstantFromValue
+ //
+ public static Constant ExtractConstantFromValue (TypeSpec t, object v, Location loc)
+ {
+ switch (t.BuiltinType) {
+ case BuiltinTypeSpec.Type.Int:
+ if (v is int)
+ return new IntConstant (t, (int) v, loc);
+ break;
+ case BuiltinTypeSpec.Type.String:
+ if (v is string)
+ return new StringConstant (t, (string) v, loc);
+ break;
+ case BuiltinTypeSpec.Type.UInt:
+ if (v is uint)
+ return new UIntConstant (t, (uint) v, loc);
+ break;
+ case BuiltinTypeSpec.Type.Long:
+ if (v is long)
+ return new LongConstant (t, (long) v, loc);
+ break;
+ case BuiltinTypeSpec.Type.ULong:
+ if (v is ulong)
+ return new ULongConstant (t, (ulong) v, loc);
+ break;
+ case BuiltinTypeSpec.Type.Float:
+ if (v is float)
+ return new FloatConstant (t, (float) v, loc);
+ break;
+ case BuiltinTypeSpec.Type.Double:
+ if (v is double)
+ return new DoubleConstant (t, (double) v, loc);
+ break;
+ case BuiltinTypeSpec.Type.Short:
+ if (v is short)
+ return new ShortConstant (t, (short) v, loc);
+ break;
+ case BuiltinTypeSpec.Type.UShort:
+ if (v is ushort)
+ return new UShortConstant (t, (ushort) v, loc);
+ break;
+ case BuiltinTypeSpec.Type.SByte:
+ if (v is sbyte)
+ return new SByteConstant (t, (sbyte) v, loc);
+ break;
+ case BuiltinTypeSpec.Type.Byte:
+ if (v is byte)
+ return new ByteConstant (t, (byte) v, loc);
+ break;
+ case BuiltinTypeSpec.Type.Char:
+ if (v is char)
+ return new CharConstant (t, (char) v, loc);
+ break;
+ case BuiltinTypeSpec.Type.Bool:
+ if (v is bool)
+ return new BoolConstant (t, (bool) v, loc);
+ break;
+ case BuiltinTypeSpec.Type.Decimal:
+ if (v is decimal)
+ return new DecimalConstant (t, (decimal) v, loc);
+ break;
+ }
+
+ if (t.IsEnum) {
+ var real_type = EnumSpec.GetUnderlyingType (t);
+ return new EnumConstant (CreateConstantFromValue (real_type, v, loc), t);
+ }
+
+ if (v == null) {
+ if (t.IsNullableType)
+ return Nullable.LiftedNull.Create (t, loc);
+
+ if (TypeSpec.IsReferenceType (t))
+ return new NullConstant (t, loc);
+ }
+
+ return null;
+ }
+
+
public override Expression CreateExpressionTree (ResolveContext ec)
{
Arguments args = new Arguments (2);
@@ -2019,6 +2101,14 @@ namespace Mono.CSharp {
{
return null;
}
+
+ public override Constant ConvertImplicitly (TypeSpec type)
+ {
+ if (IsDefaultValue && type.BuiltinType == BuiltinTypeSpec.Type.Object)
+ return new NullConstant (type, loc);
+
+ return base.ConvertImplicitly (type);
+ }
}
//
diff --git a/mcs/mcs/context.cs b/mcs/mcs/context.cs
index 276a95ee83f..897066b28be 100644
--- a/mcs/mcs/context.cs
+++ b/mcs/mcs/context.cs
@@ -73,7 +73,10 @@ namespace Mono.CSharp
readonly TypeSpec return_type;
- public int FlowOffset;
+ //
+ // Tracks the last offset used by VariableInfo
+ //
+ public int AssignmentInfoOffset;
public BlockContext (IMemberContext mc, ExplicitBlock block, TypeSpec returnType)
: base (mc)
@@ -325,7 +328,7 @@ namespace Mono.CSharp
// it's public so that we can use a struct at the callsite
public struct FlagsHandle : IDisposable
{
- ResolveContext ec;
+ readonly ResolveContext ec;
readonly Options invmask, oldval;
public FlagsHandle (ResolveContext ec, Options flagsToSet)
@@ -513,10 +516,12 @@ namespace Mono.CSharp
//
// Capture only if this or any of child blocks contain await
- // or it's a parameter
+ // or it's a parameter or we need to access variable from
+ // different parameter block
//
if (CurrentAnonymousMethod is AsyncInitializer)
- return local.IsParameter || local.Block.Explicit.HasAwait || CurrentBlock.Explicit.HasAwait;
+ return local.IsParameter || local.Block.Explicit.HasAwait || CurrentBlock.Explicit.HasAwait ||
+ local.Block.ParametersBlock != CurrentBlock.ParametersBlock.Original;
return local.Block.ParametersBlock != CurrentBlock.ParametersBlock.Original;
}
@@ -758,7 +763,7 @@ namespace Mono.CSharp
// it's public so that we can use a struct at the callsite
public struct FlagsHandle : IDisposable
{
- BuilderContext ec;
+ readonly BuilderContext ec;
readonly Options invmask, oldval;
public FlagsHandle (BuilderContext ec, Options flagsToSet)
diff --git a/mcs/mcs/convert.cs b/mcs/mcs/convert.cs
index bfbfe037495..63e87ebc32c 100644
--- a/mcs/mcs/convert.cs
+++ b/mcs/mcs/convert.cs
@@ -34,7 +34,7 @@ namespace Mono.CSharp {
//
static bool ArrayToIList (ArrayContainer array, TypeSpec list, bool isExplicit)
{
- if (array.Rank != 1 || !list.IsGenericIterateInterface)
+ if (array.Rank != 1 || !list.IsArrayGenericInterface)
return false;
var arg_type = list.TypeArguments[0];
@@ -55,7 +55,7 @@ namespace Mono.CSharp {
static bool IList_To_Array(TypeSpec list, ArrayContainer array)
{
- if (array.Rank != 1 || !list.IsGenericIterateInterface)
+ if (array.Rank != 1 || !list.IsArrayGenericInterface)
return false;
var arg_type = list.TypeArguments[0];
diff --git a/mcs/mcs/cs-parser.jay b/mcs/mcs/cs-parser.jay
index e3220878a1c..0c4aa6be32a 100644
--- a/mcs/mcs/cs-parser.jay
+++ b/mcs/mcs/cs-parser.jay
@@ -564,6 +564,7 @@ namespace_name
{
var lt = (LocatedToken) $3;
$$ = new MemberName ((MemberName) $1, lt.Value, lt.Location);
+ lbag.AddLocation ($$, GetLocation ($2));
}
| error
{
@@ -972,7 +973,11 @@ struct_declaration
}
opt_semicolon
{
- lbag.AppendToMember (current_container, GetLocation ($11), GetLocation ($14), GetLocation ($16));
+ if ($16 == null) {
+ lbag.AppendToMember (current_container, GetLocation ($11), GetLocation ($14));
+ } else {
+ lbag.AppendToMember (current_container, GetLocation ($11), GetLocation ($14), GetLocation ($16));
+ }
$$ = pop_current_class ();
}
| opt_attributes opt_modifiers opt_partial STRUCT error
@@ -1140,6 +1145,7 @@ opt_field_initializer
{
--lexer.parsing_block;
current_field.Initializer = (Expression) $3;
+ lbag.AppendToMember (current_field, GetLocation ($1));
end_block (lexer.Location);
current_local_parameters = null;
}
@@ -1940,7 +1946,11 @@ interface_declaration
}
opt_semicolon
{
- lbag.AppendToMember (current_container, GetLocation ($11), GetLocation ($13));
+ if ($15 == null) {
+ lbag.AppendToMember (current_container, GetLocation ($11), GetLocation ($13));
+ } else {
+ lbag.AppendToMember (current_container, GetLocation ($11), GetLocation ($13), GetLocation ($15));
+ }
$$ = pop_current_class ();
}
| opt_attributes opt_modifiers opt_partial INTERFACE error
@@ -2923,7 +2933,7 @@ type_parameter
: opt_attributes opt_type_parameter_variance IDENTIFIER
{
var lt = (LocatedToken)$3;
- $$ = new TypeParameter (new MemberName (lt.Value, lt.Location), (Attributes)$1, (Variance) $2);
+ $$ = new TypeParameter (new MemberName (lt.Value, lt.Location), (Attributes)$1, (VarianceDecl) $2);
}
| error
{
@@ -2932,7 +2942,7 @@ type_parameter
else
Error_SyntaxError (yyToken);
- $$ = new TypeParameter (MemberName.Null, null, Variance.None);
+ $$ = new TypeParameter (MemberName.Null, null, null);
}
;
@@ -3302,14 +3312,17 @@ member_initializer
| OPEN_BRACE expression_list CLOSE_BRACE
{
if ($2 == null)
- $$ = null;
+ $$ = new CollectionElementInitializer (GetLocation ($1));
else
$$ = new CollectionElementInitializer ((List<Expression>)$2, GetLocation ($1));
+
+ lbag.AddLocation ($$, GetLocation ($2));
}
| OPEN_BRACE CLOSE_BRACE
{
report.Error (1920, GetLocation ($1), "An element initializer cannot be empty");
- $$ = null;
+ $$ = new CollectionElementInitializer (GetLocation ($1));
+ lbag.AddLocation ($$, GetLocation ($2));
}
;
@@ -3925,7 +3938,7 @@ unary_expression
if (current_anonymous_method is LambdaExpression) {
report.Error (4034, GetLocation ($1),
"The `await' operator can only be used when its containing lambda expression is marked with the `async' modifier");
- } else if (current_anonymous_method is AnonymousMethodExpression) {
+ } else if (current_anonymous_method != null) {
report.Error (4035, GetLocation ($1),
"The `await' operator can only be used when its containing anonymous method is marked with the `async' modifier");
} else if (interactive_async != null) {
@@ -4652,7 +4665,11 @@ class_declaration
}
opt_semicolon
{
- lbag.AppendToMember (current_container, GetLocation ($11), GetLocation ($13), GetLocation ($15));
+ if ($15 == null) {
+ lbag.AppendToMember (current_container, GetLocation ($11), GetLocation ($13));
+ } else {
+ lbag.AppendToMember (current_container, GetLocation ($11), GetLocation ($13), GetLocation ($15));
+ }
$$ = pop_current_class ();
}
;
@@ -4901,7 +4918,7 @@ type_parameter_constraint
opt_type_parameter_variance
: /* empty */
{
- $$ = Variance.None;
+ $$ = null;
}
| type_parameter_variance
{
@@ -4915,11 +4932,11 @@ opt_type_parameter_variance
type_parameter_variance
: OUT
{
- $$ = Variance.Covariant;
+ $$ = new VarianceDecl (Variance.Covariant, GetLocation ($1));
}
| IN
{
- $$ = Variance.Contravariant;
+ $$ = new VarianceDecl (Variance.Contravariant, GetLocation ($1));
}
;
@@ -6045,6 +6062,7 @@ fixed_statement
Fixed f = new Fixed ((Fixed.VariableDeclaration) $9, (Statement) $10, GetLocation ($1));
current_block.AddStatement (f);
+ lbag.AddStatement (f, GetLocation ($2), GetLocation ($8));
$$ = end_block (GetLocation ($8));
}
;
@@ -6161,7 +6179,9 @@ first_from_clause
var lt = (LocatedToken) $2;
var rv = new Linq.RangeVariable (lt.Value, lt.Location);
- $$ = new Linq.QueryExpression (new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)$4, rv, GetLocation ($1)));
+ var clause = new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)$4, rv, GetLocation ($1));
+ lbag.AddLocation (clause, GetLocation ($3));
+ $$ = new Linq.QueryExpression (clause);
}
| FROM_FIRST type identifier_inside_body IN expression
{
@@ -6169,11 +6189,11 @@ first_from_clause
var lt = (LocatedToken) $3;
var rv = new Linq.RangeVariable (lt.Value, lt.Location);
- $$ = new Linq.QueryExpression (
- new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)$5, rv, GetLocation ($1)) {
+ var clause = new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)$5, rv, GetLocation ($1)) {
IdentifierType = (FullNamedExpression)$2
- }
- );
+ };
+ lbag.AddLocation (clause, GetLocation ($4));
+ $$ = new Linq.QueryExpression (clause);
}
;
@@ -6184,7 +6204,9 @@ nested_from_clause
var lt = (LocatedToken) $2;
var rv = new Linq.RangeVariable (lt.Value, lt.Location);
- $$ = new Linq.QueryExpression (new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)$4, rv, GetLocation ($1)));
+ var clause = new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)$4, rv, GetLocation ($1));
+ lbag.AddLocation (clause, GetLocation ($3));
+ $$ = new Linq.QueryExpression (clause);
}
| FROM type identifier_inside_body IN expression
{
@@ -6192,11 +6214,11 @@ nested_from_clause
var lt = (LocatedToken) $3;
var rv = new Linq.RangeVariable (lt.Value, lt.Location);
- $$ = new Linq.QueryExpression (
- new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)$5, rv, GetLocation ($1)) {
+ var clause = new Linq.QueryStartClause ((Linq.QueryBlock)current_block, (Expression)$5, rv, GetLocation ($1)) {
IdentifierType = (FullNamedExpression)$2
- }
- );
+ };
+ lbag.AddLocation (clause, GetLocation ($4));
+ $$ = new Linq.QueryExpression (clause);
}
;
@@ -6215,6 +6237,7 @@ from_clause
current_block = current_block.Parent;
((Linq.QueryBlock)current_block).AddRangeVariable (sn);
+ lbag.AddLocation ($$, GetLocation ($3));
}
| FROM type identifier_inside_body IN
{
@@ -6233,6 +6256,8 @@ from_clause
current_block = current_block.Parent;
((Linq.QueryBlock)current_block).AddRangeVariable (sn);
+
+ lbag.AddLocation ($$, GetLocation ($4));
}
;
@@ -6482,6 +6507,7 @@ join_clause
$$ = new Linq.Join (block, sn, (Expression)$6, outer_selector, (Linq.QueryBlock) current_block, GetLocation ($1)) {
IdentifierType = (FullNamedExpression)$2
};
+ lbag.AddLocation ($$, GetLocation ($3), GetLocation ($6), GetLocation ($9));
} else {
//
// Set equals right side parent to beginning of linq query, it is not accessible therefore cannot cause name collisions
@@ -7012,7 +7038,7 @@ public CSharpParser (SeekableStreamReader reader, CompilationSourceFile file, Re
lang_version = settings.Version;
yacc_verbose_flag = settings.VerboseParserFlag;
doc_support = settings.DocumentationFile != null;
- lexer = new Tokenizer (reader, file, session);
+ lexer = new Tokenizer (reader, file, session, report);
oob_stack = new Stack<object> ();
lbag = session.LocationsBag;
use_global_stacks = session.UseJayGlobalArrays;
diff --git a/mcs/mcs/cs-tokenizer.cs b/mcs/mcs/cs-tokenizer.cs
index 37447f6df9b..2018829ed04 100644
--- a/mcs/mcs/cs-tokenizer.cs
+++ b/mcs/mcs/cs-tokenizer.cs
@@ -188,6 +188,8 @@ namespace Mono.CSharp
readonly SeekableStreamReader reader;
readonly CompilationSourceFile source_file;
readonly CompilerContext context;
+ readonly Report Report;
+
SourceFile current_source;
Location hidden_block_start;
@@ -430,7 +432,7 @@ namespace Mono.CSharp
}
}
- public Tokenizer (SeekableStreamReader input, CompilationSourceFile file, ParserSession session)
+ public Tokenizer (SeekableStreamReader input, CompilationSourceFile file, ParserSession session, Report report)
{
this.source_file = file;
this.context = file.Compiler;
@@ -439,6 +441,7 @@ namespace Mono.CSharp
this.id_builder = session.IDBuilder;
this.number_builder = session.NumberBuilder;
this.ltb = new LocatedTokenBuffer (session.LocatedTokens);
+ this.Report = report;
reader = input;
@@ -2391,7 +2394,7 @@ namespace Mono.CSharp
/// <summary>
/// Handles #pragma directive
/// </summary>
- void ParsePragmaDirective (string arg)
+ void ParsePragmaDirective ()
{
int c;
int length = TokenizePreprocessorIdentifier (out c);
@@ -2861,7 +2864,7 @@ namespace Mono.CSharp
Report.FeatureIsNotAvailable (context, Location, "#pragma");
}
- ParsePragmaDirective (arg);
+ ParsePragmaDirective ();
return true;
case PreprocessorDirective.Line:
@@ -3730,10 +3733,6 @@ namespace Mono.CSharp
return null;
}
- Report Report {
- get { return context.Report; }
- }
-
void reset_doc_comment ()
{
xml_comment_buffer.Length = 0;
diff --git a/mcs/mcs/decl.cs b/mcs/mcs/decl.cs
index 5b7dcba2dd8..b20fe39a82e 100644
--- a/mcs/mcs/decl.cs
+++ b/mcs/mcs/decl.cs
@@ -305,7 +305,7 @@ namespace Mono.CSharp {
/// </summary>
internal Flags caching_flags;
- public MemberCore (TypeContainer parent, MemberName name, Attributes attrs)
+ protected MemberCore (TypeContainer parent, MemberName name, Attributes attrs)
{
this.Parent = parent;
member_name = name;
@@ -437,7 +437,7 @@ namespace Mono.CSharp {
if ((mod_flags & Modifiers.COMPILER_GENERATED) != 0)
return true;
- return Parent == null ? false : Parent.IsCompilerGenerated;
+ return Parent != null && Parent.IsCompilerGenerated;
}
}
@@ -886,7 +886,7 @@ namespace Mono.CSharp {
if (GetAttributeObsolete () != null)
return true;
- return Parent == null ? false : Parent.IsObsolete;
+ return Parent != null && Parent.IsObsolete;
}
}
@@ -895,7 +895,7 @@ namespace Mono.CSharp {
if ((ModFlags & Modifiers.UNSAFE) != 0)
return true;
- return Parent == null ? false : Parent.IsUnsafe;
+ return Parent != null && Parent.IsUnsafe;
}
}
@@ -1087,7 +1087,12 @@ namespace Mono.CSharp {
// will contain types only but it can have numerous values for members
// like methods where both return type and all parameters are checked
//
- public List<TypeSpec> GetMissingDependencies ()
+ public List<MissingTypeSpecReference> GetMissingDependencies ()
+ {
+ return GetMissingDependencies (this);
+ }
+
+ public List<MissingTypeSpecReference> GetMissingDependencies (MemberSpec caller)
{
if ((state & (StateFlags.MissingDependency | StateFlags.MissingDependency_Undetected)) == 0)
return null;
@@ -1095,11 +1100,11 @@ namespace Mono.CSharp {
state &= ~StateFlags.MissingDependency_Undetected;
var imported = definition as ImportedDefinition;
- List<TypeSpec> missing;
+ List<MissingTypeSpecReference> missing;
if (imported != null) {
- missing = ResolveMissingDependencies ();
+ missing = ResolveMissingDependencies (caller);
} else if (this is ElementTypeSpec) {
- missing = ((ElementTypeSpec) this).Element.GetMissingDependencies ();
+ missing = ((ElementTypeSpec) this).Element.GetMissingDependencies (caller);
} else {
missing = null;
}
@@ -1111,7 +1116,7 @@ namespace Mono.CSharp {
return missing;
}
- public abstract List<TypeSpec> ResolveMissingDependencies ();
+ public abstract List<MissingTypeSpecReference> ResolveMissingDependencies (MemberSpec caller);
protected virtual bool IsNotCLSCompliant (out bool attrValue)
{
@@ -1163,7 +1168,7 @@ namespace Mono.CSharp {
var ctype = ctx.CurrentType;
if (ma == Modifiers.PRIVATE) {
- if (ctype == null)
+ if (ctype == null || parentType == null)
return false;
//
// It's only accessible to the current class or children
@@ -1229,7 +1234,7 @@ namespace Mono.CSharp {
return (state & StateFlags.CLSCompliant) != 0;
}
- public bool IsConditionallyExcluded (IMemberContext ctx, Location loc)
+ public bool IsConditionallyExcluded (IMemberContext ctx)
{
if ((Kind & (MemberKind.Class | MemberKind.Method)) == 0)
return false;
diff --git a/mcs/mcs/delegate.cs b/mcs/mcs/delegate.cs
index 329e04eec3c..cabb7dff00e 100644
--- a/mcs/mcs/delegate.cs
+++ b/mcs/mcs/delegate.cs
@@ -181,7 +181,7 @@ namespace Mono.CSharp {
return false;
}
- TypeManager.CheckTypeVariance (ret_type, Variance.Covariant, this);
+ VarianceDecl.CheckTypeVariance (ret_type, Variance.Covariant, this);
var resolved_rt = new TypeExpression (ret_type, Location);
InvokeBuilder = new Method (this, resolved_rt, MethodModifiers, new MemberName (InvokeMethodName), p, null);
@@ -191,13 +191,13 @@ namespace Mono.CSharp {
// Don't emit async method for compiler generated delegates (e.g. dynamic site containers)
//
if (!IsCompilerGenerated) {
- DefineAsyncMethods (Parameters.CallingConvention, resolved_rt);
+ DefineAsyncMethods (resolved_rt);
}
return true;
}
- void DefineAsyncMethods (CallingConventions cc, TypeExpression returnType)
+ void DefineAsyncMethods (TypeExpression returnType)
{
var iasync_result = Module.PredefinedTypes.IAsyncResult;
var async_callback = Module.PredefinedTypes.AsyncCallback;
@@ -454,7 +454,7 @@ namespace Mono.CSharp {
Arguments delegate_arguments = new Arguments (pd.Count);
for (int i = 0; i < pd.Count; ++i) {
Argument.AType atype_modifier;
- switch (pd.FixedParameters [i].ModFlags) {
+ switch (pd.FixedParameters [i].ModFlags & Parameter.Modifier.RefOutMask) {
case Parameter.Modifier.REF:
atype_modifier = Argument.AType.Ref;
break;
@@ -541,7 +541,7 @@ namespace Mono.CSharp {
Error_ConversionFailed (ec, delegate_method, ret_expr);
}
- if (delegate_method.IsConditionallyExcluded (ec, loc)) {
+ if (delegate_method.IsConditionallyExcluded (ec)) {
ec.Report.SymbolRelatedToPreviousError (delegate_method);
MethodOrOperator m = delegate_method.MemberDefinition as MethodOrOperator;
if (m != null && m.IsPartialDefinition) {
@@ -686,7 +686,7 @@ namespace Mono.CSharp {
{
var expr = base.DoResolve (ec);
if (expr == null)
- return null;
+ return ErrorExpression.Instance;
if (ec.IsInProbingMode)
return expr;
@@ -857,7 +857,7 @@ namespace Mono.CSharp {
//
var call = new CallEmitter ();
call.InstanceExpression = InstanceExpr;
- call.EmitPredefined (ec, method, arguments);
+ call.EmitPredefined (ec, method, arguments, loc);
}
public override void EmitStatement (EmitContext ec)
diff --git a/mcs/mcs/doc.cs b/mcs/mcs/doc.cs
index 46fdb3c9e15..4abcf6a0ef4 100644
--- a/mcs/mcs/doc.cs
+++ b/mcs/mcs/doc.cs
@@ -147,16 +147,13 @@ namespace Mono.CSharp
}
// FIXME: it could be done with XmlReader
- var ds_target = mc as TypeContainer;
- if (ds_target == null)
- ds_target = mc.Parent;
foreach (XmlElement see in n.SelectNodes (".//see"))
- HandleSee (mc, ds_target, see);
+ HandleSee (mc, see);
foreach (XmlElement seealso in n.SelectNodes (".//seealso"))
- HandleSeeAlso (mc, ds_target, seealso);
+ HandleSeeAlso (mc, seealso);
foreach (XmlElement see in n.SelectNodes (".//exception"))
- HandleException (mc, ds_target, see);
+ HandleException (mc, see);
foreach (XmlElement node in n.SelectNodes (".//typeparam"))
HandleTypeParam (mc, node);
foreach (XmlElement node in n.SelectNodes (".//typeparamref"))
@@ -228,25 +225,25 @@ namespace Mono.CSharp
//
// Handles <see> elements.
//
- void HandleSee (MemberCore mc, TypeContainer ds, XmlElement see)
+ void HandleSee (MemberCore mc, XmlElement see)
{
- HandleXrefCommon (mc, ds, see);
+ HandleXrefCommon (mc, see);
}
//
// Handles <seealso> elements.
//
- void HandleSeeAlso (MemberCore mc, TypeContainer ds, XmlElement seealso)
+ void HandleSeeAlso (MemberCore mc, XmlElement seealso)
{
- HandleXrefCommon (mc, ds, seealso);
+ HandleXrefCommon (mc, seealso);
}
//
// Handles <exception> elements.
//
- void HandleException (MemberCore mc, TypeContainer ds, XmlElement seealso)
+ void HandleException (MemberCore mc, XmlElement seealso)
{
- HandleXrefCommon (mc, ds, seealso);
+ HandleXrefCommon (mc, seealso);
}
//
@@ -319,7 +316,7 @@ namespace Mono.CSharp
//
// Processes "see" or "seealso" elements from cref attribute.
//
- void HandleXrefCommon (MemberCore mc, TypeContainer ds, XmlElement xref)
+ void HandleXrefCommon (MemberCore mc, XmlElement xref)
{
string cref = xref.GetAttribute ("cref");
// when, XmlReader, "if (cref == null)"
@@ -340,7 +337,7 @@ namespace Mono.CSharp
var report = new Report (doc_module.Compiler, new NullReportPrinter ());
if (session == null)
- session = new ParserSession () {
+ session = new ParserSession {
UseJayGlobalArrays = true
};
diff --git a/mcs/mcs/driver.cs b/mcs/mcs/driver.cs
index 0771bf5d0bf..09a25841e6a 100644
--- a/mcs/mcs/driver.cs
+++ b/mcs/mcs/driver.cs
@@ -57,7 +57,7 @@ namespace Mono.CSharp
SeekableStreamReader reader = new SeekableStreamReader (input, ctx.Settings.Encoding);
var file = new CompilationSourceFile (module, sourceFile);
- Tokenizer lexer = new Tokenizer (reader, file, session);
+ Tokenizer lexer = new Tokenizer (reader, file, session, ctx.Report);
int token, tokens = 0, errors = 0;
while ((token = lexer.token ()) != Token.EOF){
@@ -78,7 +78,7 @@ namespace Mono.CSharp
Location.Initialize (sources);
- var session = new ParserSession () {
+ var session = new ParserSession {
UseJayGlobalArrays = true,
LocatedTokens = new LocatedToken[15000]
};
diff --git a/mcs/mcs/dynamic.cs b/mcs/mcs/dynamic.cs
index 0246c43a1b6..2124f0fda08 100644
--- a/mcs/mcs/dynamic.cs
+++ b/mcs/mcs/dynamic.cs
@@ -224,8 +224,8 @@ namespace Mono.CSharp
//
protected class BinderFlags : EnumConstant
{
- DynamicExpressionStatement statement;
- CSharpBinderFlags flags;
+ readonly DynamicExpressionStatement statement;
+ readonly CSharpBinderFlags flags;
public BinderFlags (CSharpBinderFlags flags, DynamicExpressionStatement statement)
: base (statement.loc)
@@ -391,7 +391,7 @@ namespace Mono.CSharp
if (!has_ref_out_argument) {
string d_name = isStatement ? "Action" : "Func";
- TypeExpr te = null;
+ TypeSpec te = null;
Namespace type_ns = module.GlobalRootNamespace.GetNamespace ("System", true);
if (type_ns != null) {
te = type_ns.LookupType (module, d_name, dyn_args_count + default_args, LookupMode.Normal, loc);
@@ -412,9 +412,9 @@ namespace Mono.CSharp
targs[targs.Length - 1] = new TypeExpression (t, loc);
}
- del_type = new GenericTypeExpr (te.Type, new TypeArguments (targs), loc);
+ del_type = new GenericTypeExpr (te, new TypeArguments (targs), loc);
if (targs_for_instance != null)
- del_type_instance_access = new GenericTypeExpr (te.Type, new TypeArguments (targs_for_instance), loc);
+ del_type_instance_access = new GenericTypeExpr (te, new TypeArguments (targs_for_instance), loc);
else
del_type_instance_access = del_type;
}
diff --git a/mcs/mcs/ecore.cs b/mcs/mcs/ecore.cs
index e24e008e809..0e2cb2a6bca 100644
--- a/mcs/mcs/ecore.cs
+++ b/mcs/mcs/ecore.cs
@@ -315,7 +315,7 @@ namespace Mono.CSharp {
}
}
- public void Error_TypeArgumentsCannotBeUsed (IMemberContext context, MemberSpec member, int arity, Location loc)
+ public void Error_TypeArgumentsCannotBeUsed (IMemberContext context, MemberSpec member, Location loc)
{
// Better message for possible generic expressions
if (member != null && (member.Kind & MemberKind.GenericMask) != 0) {
@@ -339,7 +339,7 @@ namespace Mono.CSharp {
}
}
- public void Error_TypeArgumentsCannotBeUsed (IMemberContext context, string exprType, string name, Location loc)
+ public static void Error_TypeArgumentsCannotBeUsed (IMemberContext context, string exprType, string name, Location loc)
{
context.Module.Compiler.Report.Error (307, loc, "The {0} `{1}' cannot be used with type arguments",
exprType, name);
@@ -373,6 +373,11 @@ namespace Mono.CSharp {
rc.Report.Error (242, loc, "The operation in question is undefined on void pointers");
}
+ public static void Warning_UnreachableExpression (ResolveContext rc, Location loc)
+ {
+ rc.Report.Warning (429, 4, loc, "Unreachable expression code detected");
+ }
+
public ResolveFlags ExprClassToResolveFlags {
get {
switch (eclass) {
@@ -435,8 +440,14 @@ namespace Mono.CSharp {
/// </remarks>
public Expression Resolve (ResolveContext ec, ResolveFlags flags)
{
- if (eclass != ExprClass.Unresolved)
+ if (eclass != ExprClass.Unresolved) {
+ if ((flags & ExprClassToResolveFlags) == 0) {
+ Error_UnexpectedKind (ec, flags, loc);
+ return null;
+ }
+
return this;
+ }
Expression e;
try {
@@ -455,7 +466,8 @@ namespace Mono.CSharp {
return e;
} catch (Exception ex) {
- if (loc.IsNull || ec.Module.Compiler.Settings.DebugFlags > 0 || ex is CompletionResult || ec.Report.IsDisabled || ex is FatalException)
+ if (loc.IsNull || ec.Module.Compiler.Settings.DebugFlags > 0 || ex is CompletionResult || ec.Report.IsDisabled || ex is FatalException ||
+ ec.Report.Printer is NullReportPrinter)
throw;
ec.Report.Error (584, loc, "Internal compiler error: {0}", ex.Message);
@@ -519,8 +531,8 @@ namespace Mono.CSharp {
Constant c = expr as Constant;
if (c == null) {
- if (c.type != InternalType.ErrorType)
- rc.Report.Error (150, StartLocation, "A constant value is expected");
+ if (expr.type != InternalType.ErrorType)
+ rc.Report.Error (150, expr.StartLocation, "A constant value is expected");
return null;
}
@@ -778,8 +790,18 @@ namespace Mono.CSharp {
}
if ((restrictions & MemberLookupRestrictions.InvocableOnly) != 0) {
- if (member is MethodSpec)
+ if (member is MethodSpec) {
+ //
+ // Interface members that are hidden by class members are removed from the set. This
+ // step only has an effect if T is a type parameter and T has both an effective base
+ // class other than object and a non-empty effective interface set
+ //
+ var tps = queried_type as TypeParameterSpec;
+ if (tps != null && tps.HasTypeConstraint)
+ members = RemoveHiddenTypeParameterMethods (members);
+
return new MethodGroupExpr (members, queried_type, loc);
+ }
if (!Invocation.IsMemberInvocable (member))
continue;
@@ -834,6 +856,54 @@ namespace Mono.CSharp {
return null;
}
+ static IList<MemberSpec> RemoveHiddenTypeParameterMethods (IList<MemberSpec> members)
+ {
+ if (members.Count < 2)
+ return members;
+
+ //
+ // If M is a method, then all non-method members declared in an interface declaration
+ // are removed from the set, and all methods with the same signature as M declared in
+ // an interface declaration are removed from the set
+ //
+
+ bool copied = false;
+ for (int i = 0; i < members.Count; ++i) {
+ var method = members[i] as MethodSpec;
+ if (method == null) {
+ if (!copied) {
+ copied = true;
+ members = new List<MemberSpec> (members);
+ }
+
+ members.RemoveAt (i--);
+ continue;
+ }
+
+ if (!method.DeclaringType.IsInterface)
+ continue;
+
+ for (int ii = 0; ii < members.Count; ++ii) {
+ var candidate = members[ii] as MethodSpec;
+ if (candidate == null || !candidate.DeclaringType.IsClass)
+ continue;
+
+ if (!TypeSpecComparer.Override.IsEqual (candidate.Parameters, method.Parameters))
+ continue;
+
+ if (!copied) {
+ copied = true;
+ members = new List<MemberSpec> (members);
+ }
+
+ members.RemoveAt (i--);
+ break;
+ }
+ }
+
+ return members;
+ }
+
protected virtual void Error_NegativeArrayIndex (ResolveContext ec, Location loc)
{
throw new NotImplementedException ();
@@ -924,7 +994,7 @@ namespace Mono.CSharp {
/// <summary>
/// Reports that we were expecting `expr' to be of class `expected'
/// </summary>
- public void Error_UnexpectedKind (IMemberContext ctx, Expression memberExpr, string expected, string was, Location loc)
+ public static void Error_UnexpectedKind (IMemberContext ctx, Expression memberExpr, string expected, string was, Location loc)
{
var name = memberExpr.GetSignatureForError ();
@@ -1992,6 +2062,12 @@ namespace Mono.CSharp {
this.orig_expr = orig_expr;
}
+ public Expression OriginalExpression {
+ get {
+ return orig_expr;
+ }
+ }
+
public override Constant ConvertImplicitly (TypeSpec target_type)
{
Constant c = base.ConvertImplicitly (target_type);
@@ -2394,7 +2470,7 @@ namespace Mono.CSharp {
protected override Expression DoResolve (ResolveContext rc)
{
- var e = SimpleNameResolve (rc, null, false);
+ var e = SimpleNameResolve (rc, null);
var fe = e as FieldExpr;
if (fe != null) {
@@ -2406,7 +2482,7 @@ namespace Mono.CSharp {
public override Expression DoResolveLValue (ResolveContext ec, Expression right_side)
{
- return SimpleNameResolve (ec, right_side, false);
+ return SimpleNameResolve (ec, right_side);
}
protected virtual void Error_TypeOrNamespaceNotFound (IMemberContext ctx)
@@ -2414,7 +2490,7 @@ namespace Mono.CSharp {
if (ctx.CurrentType != null) {
var member = MemberLookup (ctx, false, ctx.CurrentType, Name, 0, MemberLookupRestrictions.ExactArity, loc) as MemberExpr;
if (member != null) {
- member.Error_UnexpectedKind (ctx, member, "type", member.KindName, loc);
+ Error_UnexpectedKind (ctx, member, "type", member.KindName, loc);
return;
}
}
@@ -2430,7 +2506,7 @@ namespace Mono.CSharp {
retval = ctx.LookupNamespaceOrType (Name, -System.Math.Max (1, Arity), LookupMode.Probing, loc);
if (retval != null) {
- Error_TypeArgumentsCannotBeUsed (ctx, retval.Type, Arity, loc);
+ Error_TypeArgumentsCannotBeUsed (ctx, retval.Type, loc);
return;
}
@@ -2659,7 +2735,7 @@ namespace Mono.CSharp {
} else {
var me = MemberLookup (rc, false, rc.CurrentType, Name, Arity, restrictions & ~MemberLookupRestrictions.InvocableOnly, loc) as MemberExpr;
if (me != null) {
- me.Error_UnexpectedKind (rc, me, "method group", me.KindName, loc);
+ Error_UnexpectedKind (rc, me, "method group", me.KindName, loc);
return ErrorExpression.Instance;
}
}
@@ -2667,12 +2743,15 @@ namespace Mono.CSharp {
e = rc.LookupNamespaceOrType (Name, -System.Math.Max (1, Arity), LookupMode.Probing, loc);
if (e != null) {
if (e.Type.Arity != Arity) {
- Error_TypeArgumentsCannotBeUsed (rc, e.Type, Arity, loc);
+ Error_TypeArgumentsCannotBeUsed (rc, e.Type, loc);
return e;
}
if (e is TypeExpr) {
- e.Error_UnexpectedKind (rc, e, "variable", e.ExprClassName, loc);
+ // TypeExpression does not have correct location
+ if (e is TypeExpression)
+ e = new TypeExpression (e.Type, loc);
+
return e;
}
}
@@ -2694,19 +2773,19 @@ namespace Mono.CSharp {
}
}
- Expression SimpleNameResolve (ResolveContext ec, Expression right_side, bool intermediate)
+ Expression SimpleNameResolve (ResolveContext ec, Expression right_side)
{
Expression e = LookupNameExpression (ec, right_side == null ? MemberLookupRestrictions.ReadAccess : MemberLookupRestrictions.None);
if (e == null)
return null;
- if (right_side != null) {
- if (e is FullNamedExpression && e.eclass != ExprClass.Unresolved) {
- e.Error_UnexpectedKind (ec, e, "variable", e.ExprClassName, loc);
- return null;
- }
+ if (e is FullNamedExpression && e.eclass != ExprClass.Unresolved) {
+ Error_UnexpectedKind (ec, e, "variable", e.ExprClassName, loc);
+ return e;
+ }
+ if (right_side != null) {
e = e.ResolveLValue (ec, right_side);
} else {
e = e.Resolve (ec);
@@ -2759,7 +2838,7 @@ namespace Mono.CSharp {
TypeExpr te = fne as TypeExpr;
if (te == null) {
- fne.Error_UnexpectedKind (mc, fne, "type", fne.ExprClassName, loc);
+ Error_UnexpectedKind (mc, fne, "type", fne.ExprClassName, loc);
return null;
}
@@ -2923,7 +3002,21 @@ namespace Mono.CSharp {
//
TypeSpec[] targs = null;
if (method.DeclaringType != InstanceExpression.Type) {
- var base_override = MemberCache.FindMember (InstanceExpression.Type, new MemberFilter (method), BindingRestriction.InstanceOnly | BindingRestriction.OverrideOnly) as MethodSpec;
+ //
+ // Candidate can have inflated MVAR parameters and we need to find
+ // base match for original definition not inflated parameter types
+ //
+ var parameters = method.Parameters;
+ if (method.Arity > 0) {
+ parameters = ((IParametersMember) method.MemberDefinition).Parameters;
+ var inflated = method.DeclaringType as InflatedTypeSpec;
+ if (inflated != null) {
+ parameters = parameters.Inflate (inflated.CreateLocalInflator (rc));
+ }
+ }
+
+ var filter = new MemberFilter (method.Name, method.Arity, MemberKind.Method, parameters, null);
+ var base_override = MemberCache.FindMember (InstanceExpression.Type, filter, BindingRestriction.InstanceOnly | BindingRestriction.OverrideOnly) as MethodSpec;
if (base_override != null && base_override.DeclaringType != method.DeclaringType) {
if (base_override.IsGeneric)
targs = method.TypeArguments;
@@ -2967,6 +3060,7 @@ namespace Mono.CSharp {
// Only base will allow this invocation to happen.
//
if (method.IsAbstract) {
+ rc.Report.SymbolRelatedToPreviousError (method);
Error_CannotCallAbstractBase (rc, method.GetSignatureForError ());
}
@@ -3076,16 +3170,28 @@ namespace Mono.CSharp {
//
// Check intermediate value modification which won't have any effect
//
- if (rhs != null && InstanceExpression.Type.IsStruct &&
- (InstanceExpression is PropertyExpr || InstanceExpression is IndexerExpr || InstanceExpression is Invocation)) {
-
- if (rc.CurrentInitializerVariable != null) {
- rc.Report.Error (1918, loc, "Members of value type `{0}' cannot be assigned using a property `{1}' object initializer",
- InstanceExpression.Type.GetSignatureForError (), InstanceExpression.GetSignatureForError ());
- } else {
- rc.Report.Error (1612, loc,
- "Cannot modify a value type return value of `{0}'. Consider storing the value in a temporary variable",
- InstanceExpression.GetSignatureForError ());
+ if (rhs != null && InstanceExpression.Type.IsStruct) {
+ var fexpr = InstanceExpression as FieldExpr;
+ if (fexpr != null) {
+ if (!fexpr.Spec.IsReadOnly || rc.HasAny (ResolveContext.Options.FieldInitializerScope | ResolveContext.Options.ConstructorScope))
+ return true;
+
+ if (fexpr.IsStatic) {
+ rc.Report.Error (1650, loc, "Fields of static readonly field `{0}' cannot be assigned to (except in a static constructor or a variable initializer)",
+ fexpr.GetSignatureForError ());
+ } else {
+ rc.Report.Error (1648, loc, "Members of readonly field `{0}' cannot be modified (except in a constructor or a variable initializer)",
+ fexpr.GetSignatureForError ());
+ }
+ } else if (InstanceExpression is PropertyExpr || InstanceExpression is IndexerExpr || InstanceExpression is Invocation) {
+ if (rc.CurrentInitializerVariable != null) {
+ rc.Report.Error (1918, loc, "Members of value type `{0}' cannot be assigned using a property `{1}' object initializer",
+ InstanceExpression.Type.GetSignatureForError (), InstanceExpression.GetSignatureForError ());
+ } else {
+ rc.Report.Error (1612, loc,
+ "Cannot modify a value type return value of `{0}'. Consider storing the value in a temporary variable",
+ InstanceExpression.GetSignatureForError ());
+ }
}
}
@@ -3453,6 +3559,12 @@ namespace Mono.CSharp {
}
}
+ public override bool IsSideEffectFree {
+ get {
+ return InstanceExpression == null || InstanceExpression.IsSideEffectFree;
+ }
+ }
+
public override bool IsStatic {
get {
if (best_candidate != null)
@@ -3507,7 +3619,7 @@ namespace Mono.CSharp {
return null;
}
- if (best_candidate.IsConditionallyExcluded (ec, loc))
+ if (best_candidate.IsConditionallyExcluded (ec))
ec.Report.Error (765, loc,
"Partial methods with only a defining declaration or removed conditional methods cannot be used in an expression tree");
@@ -3602,7 +3714,7 @@ namespace Mono.CSharp {
InstanceExpression = ProbeIdenticalTypeName (ec, InstanceExpression, simple_name);
}
- InstanceExpression.Resolve (ec);
+ InstanceExpression.Resolve (ec, ResolveFlags.VariableOrValue | ResolveFlags.MethodGroup | ResolveFlags.Type);
}
}
@@ -3676,10 +3788,9 @@ namespace Mono.CSharp {
//
public virtual MethodGroupExpr LookupExtensionMethod (ResolveContext rc)
{
- if (InstanceExpression == null)
+ if (InstanceExpression == null || InstanceExpression.eclass == ExprClass.Type)
return null;
- InstanceExpression = InstanceExpression.Resolve (rc);
if (!IsExtensionMethodArgument (InstanceExpression))
return null;
@@ -4397,6 +4508,11 @@ namespace Mono.CSharp {
arg_moved = true;
}
+ if (arguments == orig_args) {
+ arguments = new Arguments (orig_args.Count);
+ arguments.AddRange (orig_args);
+ }
+
arguments[index] = arguments[i];
arguments[i] = temp;
@@ -4912,8 +5028,7 @@ namespace Mono.CSharp {
}
// Restore expanded arguments
- if (candidate_args != args)
- candidate_args = args;
+ candidate_args = args;
}
} while (best_candidate_rate != 0 && (type_members = base_provider.GetBaseMembers (type_members[0].DeclaringType.BaseType)) != null);
@@ -5118,7 +5233,7 @@ namespace Mono.CSharp {
if (ta_count != best_candidate.Arity && (ta_count > 0 || ((IParametersMember) best_candidate).Parameters.IsEmpty)) {
var mg = new MethodGroupExpr (new [] { best_candidate }, best_candidate.DeclaringType, loc);
- mg.Error_TypeArgumentsCannotBeUsed (rc, best_candidate, ta_count, loc);
+ mg.Error_TypeArgumentsCannotBeUsed (rc, best_candidate, loc);
return;
}
@@ -5151,7 +5266,7 @@ namespace Mono.CSharp {
if (ms.TypeArguments != null)
constr_ok = new ConstraintChecker (rc.MemberContext).CheckAll (ms.GetGenericMethodDefinition (), ms.TypeArguments, ms.Constraints, loc);
- if (ta_count == 0) {
+ if (ta_count == 0 && ms.TypeArguments == null) {
if (custom_errors != null && custom_errors.TypeInferenceFailed (rc, best_candidate))
return;
@@ -5206,6 +5321,9 @@ namespace Mono.CSharp {
for (; a_idx < arg_count; a_idx++, ++a_pos) {
a = args[a_idx];
+ if (a == null)
+ continue;
+
if (p_mod != Parameter.Modifier.PARAMS) {
p_mod = pd.FixedParameters[a_idx].ModFlags;
pt = ptypes[a_idx];
@@ -5247,7 +5365,7 @@ namespace Mono.CSharp {
"The best overloaded method match for `{0}' does not contain a parameter named `{1}'",
TypeManager.CSharpSignature (member), na.Name);
}
- } else if (args[name_index] != a) {
+ } else if (args[name_index] != a && args[name_index] != null) {
if (IsDelegateInvoke)
ec.Report.SymbolRelatedToPreviousError (DelegateType);
else
@@ -5267,7 +5385,7 @@ namespace Mono.CSharp {
return false;
}
- Expression conv = null;
+ Expression conv;
if (a.ArgType == Argument.AType.ExtensionType) {
if (a.Expr.Type == pt || TypeSpecComparer.IsEqual (a.Expr.Type, pt)) {
conv = a.Expr;
@@ -5292,6 +5410,7 @@ namespace Mono.CSharp {
params_initializers.Add (a.Expr);
args.RemoveAt (a_idx--);
--arg_count;
+ a.Expr = conv;
continue;
}
@@ -5645,43 +5764,50 @@ namespace Mono.CSharp {
} while (fe != null);
}
- static readonly int [] codes = {
- 191, // instance, write access
- 192, // instance, out access
- 198, // static, write access
- 199, // static, out access
- 1648, // member of value instance, write access
- 1649, // member of value instance, out access
- 1650, // member of value static, write access
- 1651 // member of value static, out access
- };
-
- static readonly string [] msgs = {
- /*0191*/ "A readonly field `{0}' cannot be assigned to (except in a constructor or a variable initializer)",
- /*0192*/ "A readonly field `{0}' cannot be passed ref or out (except in a constructor)",
- /*0198*/ "A static readonly field `{0}' cannot be assigned to (except in a static constructor or a variable initializer)",
- /*0199*/ "A static readonly field `{0}' cannot be passed ref or out (except in a static constructor)",
- /*1648*/ "Members of readonly field `{0}' cannot be modified (except in a constructor or a variable initializer)",
- /*1649*/ "Members of readonly field `{0}' cannot be passed ref or out (except in a constructor)",
- /*1650*/ "Fields of static readonly field `{0}' cannot be assigned to (except in a static constructor or a variable initializer)",
- /*1651*/ "Fields of static readonly field `{0}' cannot be passed ref or out (except in a static constructor)"
- };
-
- // The return value is always null. Returning a value simplifies calling code.
- Expression Report_AssignToReadonly (ResolveContext ec, Expression right_side)
- {
- int i = 0;
- if (right_side == EmptyExpression.OutAccess || right_side == EmptyExpression.LValueMemberOutAccess)
- i += 1;
- if (IsStatic)
- i += 2;
- if (right_side == EmptyExpression.LValueMemberAccess || right_side == EmptyExpression.LValueMemberOutAccess)
- i += 4;
- ec.Report.Error (codes [i], loc, msgs [i], GetSignatureForError ());
+ Expression Error_AssignToReadonly (ResolveContext rc, Expression right_side)
+ {
+ // The return value is always null. Returning a value simplifies calling code.
+
+ if (right_side == EmptyExpression.OutAccess) {
+ if (IsStatic) {
+ rc.Report.Error (199, loc, "A static readonly field `{0}' cannot be passed ref or out (except in a static constructor)",
+ GetSignatureForError ());
+ } else {
+ rc.Report.Error (192, loc, "A readonly field `{0}' cannot be passed ref or out (except in a constructor)",
+ GetSignatureForError ());
+ }
+
+ return null;
+ }
+
+ if (right_side == EmptyExpression.LValueMemberAccess) {
+ // Already reported as CS1648/CS1650
+ return null;
+ }
+
+ if (right_side == EmptyExpression.LValueMemberOutAccess) {
+ if (IsStatic) {
+ rc.Report.Error (1651, loc, "Fields of static readonly field `{0}' cannot be passed ref or out (except in a static constructor)",
+ GetSignatureForError ());
+ } else {
+ rc.Report.Error (1649, loc, "Members of readonly field `{0}' cannot be passed ref or out (except in a constructor)",
+ GetSignatureForError ());
+ }
+
+ return null;
+ }
+
+ if (IsStatic) {
+ rc.Report.Error (198, loc, "A static readonly field `{0}' cannot be assigned to (except in a static constructor or a variable initializer)",
+ GetSignatureForError ());
+ } else {
+ rc.Report.Error (191, loc, "A readonly field `{0}' cannot be assigned to (except in a constructor or a variable initializer)",
+ GetSignatureForError ());
+ }
return null;
}
-
+
override public Expression DoResolveLValue (ResolveContext ec, Expression right_side)
{
if (spec is FixedFieldSpec) {
@@ -5706,19 +5832,19 @@ namespace Mono.CSharp {
if (spec.IsReadOnly) {
// InitOnly fields can only be assigned in constructors or initializers
if (!ec.HasAny (ResolveContext.Options.FieldInitializerScope | ResolveContext.Options.ConstructorScope))
- return Report_AssignToReadonly (ec, right_side);
+ return Error_AssignToReadonly (ec, right_side);
if (ec.HasSet (ResolveContext.Options.ConstructorScope)) {
// InitOnly fields cannot be assigned-to in a different constructor from their declaring type
if (ec.CurrentMemberDefinition.Parent.PartialContainer.Definition != spec.DeclaringType.GetDefinition ())
- return Report_AssignToReadonly (ec, right_side);
+ return Error_AssignToReadonly (ec, right_side);
// static InitOnly fields cannot be assigned-to in an instance constructor
if (IsStatic && !ec.IsStatic)
- return Report_AssignToReadonly (ec, right_side);
+ return Error_AssignToReadonly (ec, right_side);
// instance constructors can't modify InitOnly fields of other instances of the same type
if (!IsStatic && !(InstanceExpression is This))
- return Report_AssignToReadonly (ec, right_side);
+ return Error_AssignToReadonly (ec, right_side);
}
}
@@ -6139,7 +6265,7 @@ namespace Mono.CSharp {
}
}
} else {
- args = arguments == null ? new Arguments (1) : arguments;
+ args = arguments ?? new Arguments (1);
if (leave_copy) {
source.Emit (ec);
@@ -6353,7 +6479,7 @@ namespace Mono.CSharp {
best_candidate.GetSignatureForError ());
return false;
}
- } else if (!best_candidate.Get.IsAccessible (rc)) {
+ } else if (!best_candidate.Get.IsAccessible (rc) || !best_candidate.Get.DeclaringType.IsAccessible (rc)) {
if (best_candidate.HasDifferentAccessibility) {
rc.Report.SymbolRelatedToPreviousError (best_candidate.Get);
rc.Report.Error (271, loc, "The property or indexer `{0}' cannot be used in this context because the get accessor is inaccessible",
@@ -6380,7 +6506,7 @@ namespace Mono.CSharp {
return false;
}
- if (!best_candidate.Set.IsAccessible (rc)) {
+ if (!best_candidate.Set.IsAccessible (rc) || !best_candidate.Set.DeclaringType.IsAccessible (rc)) {
if (best_candidate.HasDifferentAccessibility) {
rc.Report.SymbolRelatedToPreviousError (best_candidate.Set);
rc.Report.Error (272, loc, "The property or indexer `{0}' cannot be used in this context because the set accessor is inaccessible",
@@ -6643,7 +6769,7 @@ namespace Mono.CSharp {
// Don't capture temporary variables except when using
// state machine redirection and block yields
//
- if (ec.CurrentAnonymousMethod != null && ec.CurrentAnonymousMethod is StateMachineInitializer &&
+ if (ec.CurrentAnonymousMethod is StateMachineInitializer &&
(ec.CurrentBlock.Explicit.HasYield || ec.CurrentBlock.Explicit.HasAwait) &&
ec.IsVariableCapturingRequired) {
AnonymousMethodStorey storey = li.Block.Explicit.CreateAnonymousMethodStorey (ec);
@@ -6702,7 +6828,7 @@ namespace Mono.CSharp {
get { return null; }
}
- public override void VerifyAssigned (ResolveContext rc)
+ public override void VerifyDefiniteAssignment (ResolveContext rc)
{
}
}
diff --git a/mcs/mcs/enum.cs b/mcs/mcs/enum.cs
index 1081e0e551e..d2a031bd019 100644
--- a/mcs/mcs/enum.cs
+++ b/mcs/mcs/enum.cs
@@ -66,7 +66,7 @@ namespace Mono.CSharp {
var underlying = ((Enum) Parent).UnderlyingType;
if (expr != null) {
- expr = expr.ImplicitConversionRequired (rc, underlying, Location);
+ expr = expr.ImplicitConversionRequired (rc, underlying);
if (expr != null && !IsValidEnumType (expr.Type)) {
Enum.Error_1008 (Location, Report);
expr = null;
diff --git a/mcs/mcs/eval.cs b/mcs/mcs/eval.cs
index 9607ffd8b79..3ae03c0f14b 100644
--- a/mcs/mcs/eval.cs
+++ b/mcs/mcs/eval.cs
@@ -459,7 +459,7 @@ namespace Mono.CSharp
//
InputKind ToplevelOrStatement (SeekableStreamReader seekable)
{
- Tokenizer tokenizer = new Tokenizer (seekable, source_file, new ParserSession ());
+ Tokenizer tokenizer = new Tokenizer (seekable, source_file, new ParserSession (), ctx.Report);
// Prefer contextual block keywords over identifiers
tokenizer.parsing_block++;
@@ -1216,10 +1216,6 @@ namespace Mono.CSharp
public class Undo
{
List<Action> undo_actions;
-
- public Undo ()
- {
- }
public void AddTypeContainer (TypeContainer current_container, TypeDefinition tc)
{
diff --git a/mcs/mcs/expression.cs b/mcs/mcs/expression.cs
index 14776484844..5729d7581ba 100644
--- a/mcs/mcs/expression.cs
+++ b/mcs/mcs/expression.cs
@@ -80,7 +80,7 @@ namespace Mono.CSharp
public override void Emit (EmitContext ec)
{
var call = new CallEmitter ();
- call.EmitPredefined (ec, oper, arguments);
+ call.EmitPredefined (ec, oper, arguments, loc);
}
public override SLE.Expression MakeExpression (BuilderContext ctx)
@@ -1319,7 +1319,7 @@ namespace Mono.CSharp
protected Expression expr;
protected TypeSpec probe_type_expr;
- public Probe (Expression expr, Expression probe_type, Location l)
+ protected Probe (Expression expr, Expression probe_type, Location l)
{
ProbeType = probe_type;
loc = l;
@@ -1505,9 +1505,16 @@ namespace Mono.CSharp
//
if (Convert.ExplicitReferenceConversionExists (d, t))
return this;
+
+ //
+ // open generic type
+ //
+ if (d is InflatedTypeSpec && InflatedTypeSpec.ContainsTypeParameter (d))
+ return this;
} else {
- if (TypeManager.IsGenericParameter (t))
- return ResolveGenericParameter (ec, d, (TypeParameterSpec) t);
+ var tps = t as TypeParameterSpec;
+ if (tps != null)
+ return ResolveGenericParameter (ec, d, tps);
if (t.BuiltinType == BuiltinTypeSpec.Type.Dynamic) {
ec.Report.Warning (1981, 3, loc,
@@ -1529,11 +1536,17 @@ namespace Mono.CSharp
}
} else {
if (Convert.ImplicitReferenceConversionExists (d, t)) {
+ var c = expr as Constant;
+ if (c != null)
+ return CreateConstantResult (ec, !c.IsNull);
+
//
// Do not optimize for imported type
//
- if (d.MemberDefinition.IsImported && d.BuiltinType != BuiltinTypeSpec.Type.None)
+ if (d.MemberDefinition.IsImported && d.BuiltinType != BuiltinTypeSpec.Type.None &&
+ d.MemberDefinition.DeclaringAssembly != t.MemberDefinition.DeclaringAssembly) {
return this;
+ }
//
// Turn is check into simple null check for implicitly convertible reference types
@@ -1543,9 +1556,14 @@ namespace Mono.CSharp
this).Resolve (ec);
}
- if (Convert.ExplicitReferenceConversionExists (d, t)) {
+ if (Convert.ExplicitReferenceConversionExists (d, t))
+ return this;
+
+ //
+ // open generic type
+ //
+ if ((d is InflatedTypeSpec || d.IsArray) && InflatedTypeSpec.ContainsTypeParameter (d))
return this;
- }
}
}
@@ -1559,8 +1577,8 @@ namespace Mono.CSharp
return CreateConstantResult (ec, false);
}
- if (TypeManager.IsGenericParameter (expr.Type)) {
- if (expr.Type == d && TypeSpec.IsValueType (t))
+ if (expr.Type.IsGenericParameter) {
+ if (expr.Type == d && TypeSpec.IsValueType (t) && TypeSpec.IsValueType (d))
return CreateConstantResult (ec, true);
expr = new BoxedCast (expr, d);
@@ -1662,8 +1680,10 @@ namespace Mono.CSharp
return this;
}
- ec.Report.Error (39, loc, "Cannot convert type `{0}' to `{1}' via a built-in conversion",
- etype.GetSignatureForError (), type.GetSignatureForError ());
+ if (etype != InternalType.ErrorType) {
+ ec.Report.Error (39, loc, "Cannot convert type `{0}' to `{1}' via a built-in conversion",
+ etype.GetSignatureForError (), type.GetSignatureForError ());
+ }
return null;
}
@@ -1930,8 +1950,8 @@ namespace Mono.CSharp
if (right_expr.IsNull) {
if ((b.oper & Operator.EqualityMask) != 0) {
- if (!left_expr.Type.IsNullableType && left_expr.Type == left_unwrap)
- return b.CreateLiftedValueTypeResult (rc, left_unwrap);
+ if (!left_expr.Type.IsNullableType && BuiltinTypeSpec.IsPrimitiveType (left_expr.Type))
+ return b.CreateLiftedValueTypeResult (rc, left_expr.Type);
} else if ((b.oper & Operator.BitwiseMask) != 0) {
if (left_unwrap.BuiltinType != BuiltinTypeSpec.Type.Bool)
return Nullable.LiftedNull.CreateFromExpression (rc, b);
@@ -1946,8 +1966,8 @@ namespace Mono.CSharp
}
} else if (left_expr.IsNull) {
if ((b.oper & Operator.EqualityMask) != 0) {
- if (!right_expr.Type.IsNullableType && right_expr.Type == right_unwrap)
- return b.CreateLiftedValueTypeResult (rc, right_unwrap);
+ if (!right_expr.Type.IsNullableType && BuiltinTypeSpec.IsPrimitiveType (right_expr.Type))
+ return b.CreateLiftedValueTypeResult (rc, right_expr.Type);
} else if ((b.oper & Operator.BitwiseMask) != 0) {
if (right_unwrap.BuiltinType != BuiltinTypeSpec.Type.Bool)
return Nullable.LiftedNull.CreateFromExpression (rc, b);
@@ -1990,11 +2010,17 @@ namespace Mono.CSharp
b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
return ReducedExpression.Create (b.left, b).Resolve (rc);
}
- } else {
+
//
- // Optimizes
+ // Optimizes (value &/&& 0) to 0
//
- // (bool? & true) to bool?
+ if ((b.oper == Operator.BitwiseAnd || b.oper == Operator.LogicalAnd) && !IsLifted) {
+ Constant side_effect = new SideEffectConstant (c, b.left, c.Location);
+ return ReducedExpression.Create (side_effect, b);
+ }
+ } else {
+ //
+ // Optimizes (bool? & true) to bool?
//
if (IsLifted && left_unwrap.BuiltinType == BuiltinTypeSpec.Type.Bool && b.oper == Operator.BitwiseAnd) {
return ReducedExpression.Create (b.left, b).Resolve (rc);
@@ -2023,15 +2049,39 @@ namespace Mono.CSharp
b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
return ReducedExpression.Create (b.right, b).Resolve (rc);
}
- } else {
+
//
- // Optimizes
+ // Optimizes (false && expr) to false
+ //
+ if (b.oper == Operator.LogicalAnd && c.Type.BuiltinType == BuiltinTypeSpec.Type.Bool) {
+ // No rhs side-effects
+ Expression.Warning_UnreachableExpression (rc, b.right.StartLocation);
+ return ReducedExpression.Create (c, b);
+ }
+
+ //
+ // Optimizes (0 & value) to 0
//
- // (true & bool?) to bool?
+ if (b.oper == Operator.BitwiseAnd && !IsLifted) {
+ Constant side_effect = new SideEffectConstant (c, b.right, c.Location);
+ return ReducedExpression.Create (side_effect, b);
+ }
+ } else {
+ //
+ // Optimizes (true & bool?) to bool?
//
if (IsLifted && left_unwrap.BuiltinType == BuiltinTypeSpec.Type.Bool && b.oper == Operator.BitwiseAnd) {
return ReducedExpression.Create (b.right, b).Resolve (rc);
}
+
+ //
+ // Optimizes (true || expr) to true
+ //
+ if (b.oper == Operator.LogicalOr && c.Type.BuiltinType == BuiltinTypeSpec.Type.Bool) {
+ // No rhs side-effects
+ Expression.Warning_UnreachableExpression (rc, b.right.StartLocation);
+ return ReducedExpression.Create (c, b);
+ }
}
if (b.oper == Operator.Multiply && c.IsOneInteger)
@@ -2312,6 +2362,7 @@ namespace Mono.CSharp
NullableMask = 1 << 20,
}
+ [Flags]
enum State : byte
{
None = 0,
@@ -2752,6 +2803,12 @@ namespace Mono.CSharp
if (l.IsPointer || r.IsPointer)
return ResolveOperatorPointer (rc, l, r);
+ // User operators
+ expr = ResolveUserOperator (rc, left, right);
+ if (expr != null)
+ return expr;
+
+
bool lenum = l.IsEnum;
bool renum = r.IsEnum;
if ((oper & (Operator.ComparisonMask | Operator.BitwiseMask)) != 0) {
@@ -2805,11 +2862,6 @@ namespace Mono.CSharp
return expr;
}
}
-
- // User operators
- expr = ResolveUserOperator (rc, left, right);
- if (expr != null)
- return expr;
}
//
@@ -2840,7 +2892,7 @@ namespace Mono.CSharp
// at least one of 'left' or 'right' is an enumeration constant (EnumConstant or SideEffectConstant or ...)
// if 'left' is not an enumeration constant, create one from the type of 'right'
- Constant EnumLiftUp (ResolveContext ec, Constant left, Constant right, Location loc)
+ Constant EnumLiftUp (ResolveContext ec, Constant left, Constant right)
{
switch (oper) {
case Operator.BitwiseOr:
@@ -3211,30 +3263,18 @@ namespace Mono.CSharp
if (left == null)
return null;
- Constant lc = left as Constant;
-
- if (lc != null && lc.Type.BuiltinType == BuiltinTypeSpec.Type.Bool &&
- ((oper == Operator.LogicalAnd && lc.IsDefaultValue) ||
- (oper == Operator.LogicalOr && !lc.IsDefaultValue))) {
-
- // FIXME: resolve right expression as unreachable
- // right.Resolve (ec);
-
- ec.Report.Warning (429, 4, right.StartLocation, "Unreachable expression code detected");
- return left;
- }
-
right = right.Resolve (ec);
if (right == null)
return null;
+ Constant lc = left as Constant;
Constant rc = right as Constant;
// The conversion rules are ignored in enum context but why
if (!ec.HasSet (ResolveContext.Options.EnumScope) && lc != null && rc != null && (left.Type.IsEnum || right.Type.IsEnum)) {
- lc = EnumLiftUp (ec, lc, rc, loc);
+ lc = EnumLiftUp (ec, lc, rc);
if (lc != null)
- rc = EnumLiftUp (ec, rc, lc, loc);
+ rc = EnumLiftUp (ec, rc, lc);
}
if (rc != null && lc != null) {
@@ -3253,80 +3293,84 @@ namespace Mono.CSharp
CheckOutOfRangeComparison (ec, rc, left.Type);
}
- if (left.Type.BuiltinType == BuiltinTypeSpec.Type.Dynamic || right.Type.BuiltinType == BuiltinTypeSpec.Type.Dynamic) {
- var lt = left.Type;
- var rt = right.Type;
- if (lt.Kind == MemberKind.Void || lt == InternalType.MethodGroup || lt == InternalType.AnonymousMethod ||
- rt.Kind == MemberKind.Void || rt == InternalType.MethodGroup || rt == InternalType.AnonymousMethod) {
- Error_OperatorCannotBeApplied (ec, left, right);
- return null;
- }
+ if (left.Type.BuiltinType == BuiltinTypeSpec.Type.Dynamic || right.Type.BuiltinType == BuiltinTypeSpec.Type.Dynamic)
+ return DoResolveDynamic (ec);
- Arguments args;
+ return DoResolveCore (ec, left, right);
+ }
- //
- // Special handling for logical boolean operators which require rhs not to be
- // evaluated based on lhs value
- //
- if ((oper & Operator.LogicalMask) != 0) {
- Expression cond_left, cond_right, expr;
+ Expression DoResolveDynamic (ResolveContext rc)
+ {
+ var lt = left.Type;
+ var rt = right.Type;
+ if (lt.Kind == MemberKind.Void || lt == InternalType.MethodGroup || lt == InternalType.AnonymousMethod ||
+ rt.Kind == MemberKind.Void || rt == InternalType.MethodGroup || rt == InternalType.AnonymousMethod) {
+ Error_OperatorCannotBeApplied (rc, left, right);
+ return null;
+ }
+
+ Arguments args;
- args = new Arguments (2);
+ //
+ // Special handling for logical boolean operators which require rhs not to be
+ // evaluated based on lhs value
+ //
+ if ((oper & Operator.LogicalMask) != 0) {
+ Expression cond_left, cond_right, expr;
- if (lt.BuiltinType == BuiltinTypeSpec.Type.Dynamic) {
- LocalVariable temp = LocalVariable.CreateCompilerGenerated (lt, ec.CurrentBlock, loc);
+ args = new Arguments (2);
- var cond_args = new Arguments (1);
- cond_args.Add (new Argument (new SimpleAssign (temp.CreateReferenceExpression (ec, loc), left).Resolve (ec)));
+ if (lt.BuiltinType == BuiltinTypeSpec.Type.Dynamic) {
+ LocalVariable temp = LocalVariable.CreateCompilerGenerated (lt, rc.CurrentBlock, loc);
- //
- // dynamic && bool => IsFalse (temp = left) ? temp : temp && right;
- // dynamic || bool => IsTrue (temp = left) ? temp : temp || right;
- //
- left = temp.CreateReferenceExpression (ec, loc);
- if (oper == Operator.LogicalAnd) {
- expr = DynamicUnaryConversion.CreateIsFalse (ec, cond_args, loc);
- cond_left = left;
- } else {
- expr = DynamicUnaryConversion.CreateIsTrue (ec, cond_args, loc);
- cond_left = left;
- }
+ var cond_args = new Arguments (1);
+ cond_args.Add (new Argument (new SimpleAssign (temp.CreateReferenceExpression (rc, loc), left).Resolve (rc)));
- args.Add (new Argument (left));
- args.Add (new Argument (right));
- cond_right = new DynamicExpressionStatement (this, args, loc);
+ //
+ // dynamic && bool => IsFalse (temp = left) ? temp : temp && right;
+ // dynamic || bool => IsTrue (temp = left) ? temp : temp || right;
+ //
+ left = temp.CreateReferenceExpression (rc, loc);
+ if (oper == Operator.LogicalAnd) {
+ expr = DynamicUnaryConversion.CreateIsFalse (rc, cond_args, loc);
+ cond_left = left;
} else {
- LocalVariable temp = LocalVariable.CreateCompilerGenerated (ec.BuiltinTypes.Bool, ec.CurrentBlock, loc);
+ expr = DynamicUnaryConversion.CreateIsTrue (rc, cond_args, loc);
+ cond_left = left;
+ }
- args.Add (new Argument (temp.CreateReferenceExpression (ec, loc).Resolve (ec)));
- args.Add (new Argument (right));
- right = new DynamicExpressionStatement (this, args, loc);
+ args.Add (new Argument (left));
+ args.Add (new Argument (right));
+ cond_right = new DynamicExpressionStatement (this, args, loc);
+ } else {
+ LocalVariable temp = LocalVariable.CreateCompilerGenerated (rc.BuiltinTypes.Bool, rc.CurrentBlock, loc);
- //
- // bool && dynamic => (temp = left) ? temp && right : temp;
- // bool || dynamic => (temp = left) ? temp : temp || right;
- //
- if (oper == Operator.LogicalAnd) {
- cond_left = right;
- cond_right = temp.CreateReferenceExpression (ec, loc);
- } else {
- cond_left = temp.CreateReferenceExpression (ec, loc);
- cond_right = right;
- }
+ args.Add (new Argument (temp.CreateReferenceExpression (rc, loc).Resolve (rc)));
+ args.Add (new Argument (right));
+ right = new DynamicExpressionStatement (this, args, loc);
- expr = new BooleanExpression (new SimpleAssign (temp.CreateReferenceExpression (ec, loc), left));
+ //
+ // bool && dynamic => (temp = left) ? temp && right : temp;
+ // bool || dynamic => (temp = left) ? temp : temp || right;
+ //
+ if (oper == Operator.LogicalAnd) {
+ cond_left = right;
+ cond_right = temp.CreateReferenceExpression (rc, loc);
+ } else {
+ cond_left = temp.CreateReferenceExpression (rc, loc);
+ cond_right = right;
}
- return new Conditional (expr, cond_left, cond_right, loc).Resolve (ec);
+ expr = new BooleanExpression (new SimpleAssign (temp.CreateReferenceExpression (rc, loc), left));
}
- args = new Arguments (2);
- args.Add (new Argument (left));
- args.Add (new Argument (right));
- return new DynamicExpressionStatement (this, args, loc).Resolve (ec);
+ return new Conditional (expr, cond_left, cond_right, loc).Resolve (rc);
}
- return DoResolveCore (ec, left, right);
+ args = new Arguments (2);
+ args.Add (new Argument (left));
+ args.Add (new Argument (right));
+ return new DynamicExpressionStatement (this, args, loc).Resolve (rc);
}
Expression DoResolveCore (ResolveContext ec, Expression left_orig, Expression right_orig)
@@ -3351,8 +3395,6 @@ namespace Mono.CSharp
public SLE.Expression MakeExpression (BuilderContext ctx, Expression left, Expression right)
{
- Console.WriteLine ("{0} x {1}", left.Type.GetSignatureForError (), right.Type.GetSignatureForError ());
-
var le = left.MakeExpression (ctx);
var re = right.MakeExpression (ctx);
bool is_checked = ctx.HasSet (BuilderContext.Options.CheckedScope);
@@ -3707,7 +3749,7 @@ namespace Mono.CSharp
TypeSpec result_type;
if (left.Type == right.Type) {
var c = right as EnumConstant;
- if (c != null && c.IsZeroInteger) {
+ if (c != null && c.IsZeroInteger && !right.Type.IsEnum) {
//
// LAMESPEC: This is quite unexpected for expression E - 0 the return type is
// E which is not what expressions E - 1 or 0 - E return
@@ -3718,10 +3760,15 @@ namespace Mono.CSharp
Nullable.NullableInfo.GetEnumUnderlyingType (rc.Module, left.Type) :
EnumSpec.GetUnderlyingType (left.Type);
}
- } else if (IsEnumOrNullableEnum (left.Type)) {
- result_type = left.Type;
} else {
- result_type = right.Type;
+ if (IsEnumOrNullableEnum (left.Type)) {
+ result_type = left.Type;
+ } else {
+ result_type = right.Type;
+ }
+
+ if (expr is Nullable.LiftedBinaryOperator && !result_type.IsNullableType)
+ result_type = rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc.Module, new[] { result_type });
}
return EmptyCast.Create (expr, result_type);
@@ -3865,9 +3912,15 @@ namespace Mono.CSharp
//
// Now try lifted version of predefined operators
//
- result = ResolveOperatorPredefined (ec, ec.Module.OperatorsBinaryEqualityLifted, no_arg_conv);
- if (result != null)
- return result;
+ if (no_arg_conv && !l.IsNullableType) {
+ //
+ // Optimizes cases which won't match
+ //
+ } else {
+ result = ResolveOperatorPredefined (ec, ec.Module.OperatorsBinaryEqualityLifted, no_arg_conv);
+ if (result != null)
+ return result;
+ }
//
// The == and != operators permit one operand to be a value of a nullable
@@ -3994,17 +4047,11 @@ namespace Mono.CSharp
if (best_operator == null)
return null;
- var expr = best_operator.ConvertResult (ec, this);
-
- if ((oper == Operator.BitwiseAnd || oper == Operator.LogicalAnd) && !best_operator.IsLifted) {
- expr = OptimizeAndOperation (expr);
- }
-
- return expr;
+ return best_operator.ConvertResult (ec, this);
}
//
- // Optimize &/&& constant expressions with 0 value
+ // Optimize & constant expressions with 0 value
//
Expression OptimizeAndOperation (Expression expr)
{
@@ -4330,6 +4377,14 @@ namespace Mono.CSharp
/// </remarks>
public override void EmitBranchable (EmitContext ec, Label target, bool on_true)
{
+ if (ec.HasSet (BuilderContext.Options.AsyncBody) && right.ContainsEmitWithAwait ()) {
+ left = left.EmitToField (ec);
+
+ if ((oper & Operator.LogicalMask) == 0) {
+ right = right.EmitToField (ec);
+ }
+ }
+
//
// This is more complicated than it looks, but its just to avoid
// duplicated tests: basically, we allow ==, !=, >, <, >= and <=
@@ -4924,7 +4979,7 @@ namespace Mono.CSharp
public class PointerArithmetic : Expression {
Expression left, right;
- Binary.Operator op;
+ readonly Binary.Operator op;
//
// We assume that `l' is always a pointer
@@ -5299,8 +5354,8 @@ namespace Mono.CSharp
// Don't issue the warning for constant expressions
//
if (!(is_false ? true_expr is Constant : false_expr is Constant)) {
- ec.Report.Warning (429, 4, is_false ? true_expr.Location : false_expr.Location,
- "Unreachable expression code detected");
+ // CSC: Missing warning
+ Warning_UnreachableExpression (ec, is_false ? true_expr.Location : false_expr.Location);
}
return ReducedExpression.Create (
@@ -5354,7 +5409,7 @@ namespace Mono.CSharp
#region Abstract
public abstract HoistedVariable GetHoistedVariable (AnonymousExpression ae);
public abstract void SetHasAddressTaken ();
- public abstract void VerifyAssigned (ResolveContext rc);
+ public abstract void VerifyDefiniteAssignment (ResolveContext rc);
public abstract bool IsLockedByStatement { get; set; }
@@ -5587,9 +5642,9 @@ namespace Mono.CSharp
#endregion
- public override void VerifyAssigned (ResolveContext rc)
+ public override void VerifyDefiniteAssignment (ResolveContext rc)
{
- VariableInfo variable_info = local_info.VariableInfo;
+ VariableInfo variable_info = VariableInfo;
if (variable_info == null)
return;
@@ -5634,7 +5689,7 @@ namespace Mono.CSharp
{
local_info.SetIsUsed ();
- VerifyAssigned (ec);
+ VerifyDefiniteAssignment (ec);
DoResolveBase (ec);
return this;
@@ -5854,24 +5909,12 @@ namespace Mono.CSharp
return Parameter.ExpressionTreeVariableReference ();
}
- //
- // Notice that for ref/out parameters, the type exposed is not the
- // same type exposed externally.
- //
- // for "ref int a":
- // externally we expose "int&"
- // here we expose "int".
- //
- // We record this in "is_ref". This means that the type system can treat
- // the type as it is expected, but when we generate the code, we generate
- // the alternate kind of code.
- //
protected override Expression DoResolve (ResolveContext ec)
{
if (!DoResolveBase (ec))
return null;
- VerifyAssigned (ec);
+ VerifyDefiniteAssignment (ec);
return this;
}
@@ -5884,15 +5927,17 @@ namespace Mono.CSharp
return base.DoResolveLValue (ec, right_side);
}
- public override void VerifyAssigned (ResolveContext rc)
+ public override void VerifyDefiniteAssignment (ResolveContext rc)
{
- // HACK: Variables are not captured in probing mode
- if (rc.IsInProbingMode)
+ VariableInfo variable_info = VariableInfo;
+ if (variable_info == null)
return;
- if (HasOutModifier && !VariableInfo.IsAssigned (rc)) {
- rc.Report.Error (269, loc, "Use of unassigned out parameter `{0}'", Name);
- }
+ if (variable_info.IsAssigned (rc))
+ return;
+
+ rc.Report.Error (269, loc, "Use of unassigned out parameter `{0}'", Name);
+ variable_info.SetAssigned (rc);
}
}
@@ -5969,7 +6014,17 @@ namespace Mono.CSharp
var emg = MethodGroup as ExtensionMethodGroupExpr;
if (emg != null) {
- return MethodGroupExpr.CreatePredefined (candidate, candidate.DeclaringType, MethodGroup.Location);
+ var mg = MethodGroupExpr.CreatePredefined (candidate, candidate.DeclaringType, MethodGroup.Location);
+ if (candidate.IsGeneric) {
+ var targs = new TypeExpression [candidate.Arity];
+ for (int i = 0; i < targs.Length; ++i) {
+ targs[i] = new TypeExpression (candidate.TypeArguments[i], MethodGroup.Location);
+ }
+
+ mg.SetTypeArguments (null, new TypeArguments (targs));
+ }
+
+ return mg;
}
return MethodGroup;
@@ -6015,7 +6070,7 @@ namespace Mono.CSharp
if (member_expr != null)
member_expr = member_expr.Resolve (ec);
} else {
- member_expr = expr.Resolve (ec, ResolveFlags.VariableOrValue | ResolveFlags.MethodGroup);
+ member_expr = expr.Resolve (ec);
}
if (member_expr == null)
@@ -6044,7 +6099,7 @@ namespace Mono.CSharp
} else {
if (member_expr is RuntimeValueExpression) {
ec.Report.Error (Report.RuntimeErrorId, loc, "Cannot invoke a non-delegate type `{0}'",
- member_expr.Type.GetSignatureForError ()); ;
+ member_expr.Type.GetSignatureForError ());
return null;
}
@@ -6533,14 +6588,16 @@ namespace Mono.CSharp
}
if (vr != null) {
+ ec.MarkCallEntry (loc);
ec.Emit (OpCodes.Call, method);
return false;
}
}
if (type is TypeParameterSpec)
- return DoEmitTypeParameter (ec);
+ return DoEmitTypeParameter (ec);
+ ec.MarkCallEntry (loc);
ec.Emit (OpCodes.Newobj, method);
return true;
}
@@ -6758,7 +6815,7 @@ namespace Mono.CSharp
protected List<Expression> arguments;
protected TypeSpec array_element_type;
- int num_arguments = 0;
+ int num_arguments;
protected int dimensions;
protected readonly ComposedTypeSpecifier rank;
Expression first_emit;
@@ -7772,7 +7829,7 @@ namespace Mono.CSharp
// Nothing
}
- public override void VerifyAssigned (ResolveContext rc)
+ public override void VerifyDefiniteAssignment (ResolveContext rc)
{
}
@@ -8598,7 +8655,7 @@ namespace Mono.CSharp
e = e.ResolveLValue (rc, right_side);
} else {
- e = e.Resolve (rc, ResolveFlags.VariableOrValue | ResolveFlags.Type);
+ e = e.Resolve (rc, ResolveFlags.VariableOrValue | ResolveFlags.Type | ResolveFlags.MethodGroup);
}
return e;
@@ -8685,7 +8742,7 @@ namespace Mono.CSharp
if (sn != null) {
var vr = expr as VariableReference;
if (vr != null)
- vr.VerifyAssigned (rc);
+ vr.VerifyDefiniteAssignment (rc);
}
Arguments args = new Arguments (1);
@@ -8725,7 +8782,7 @@ namespace Mono.CSharp
if (sn != null && !errorMode) {
var vr = expr as VariableReference;
if (vr != null)
- vr.VerifyAssigned (rc);
+ vr.VerifyDefiniteAssignment (rc);
}
// TODO: it should really skip the checks bellow
@@ -8807,7 +8864,7 @@ namespace Mono.CSharp
if (sn != null && !(me is FieldExpr && TypeSpec.IsValueType (expr_type))) {
var vr = expr as VariableReference;
if (vr != null)
- vr.VerifyAssigned (rc);
+ vr.VerifyDefiniteAssignment (rc);
}
return me;
@@ -8910,13 +8967,13 @@ namespace Mono.CSharp
var nested = MemberCache.FindNestedType (expr_type, Name, -System.Math.Max (1, Arity));
if (nested != null) {
- Error_TypeArgumentsCannotBeUsed (rc, nested, Arity, expr.Location);
+ Error_TypeArgumentsCannotBeUsed (rc, nested, expr.Location);
return;
}
var any_other_member = MemberLookup (rc, false, expr_type, Name, 0, MemberLookupRestrictions.None, loc);
if (any_other_member != null) {
- any_other_member.Error_UnexpectedKind (rc, any_other_member, "type", any_other_member.ExprClassName, loc);
+ Error_UnexpectedKind (rc, any_other_member, "type", any_other_member.ExprClassName, loc);
return;
}
@@ -8934,7 +8991,7 @@ namespace Mono.CSharp
if (ec.Module.Compiler.Settings.Version > LanguageVersion.ISO_2 && !ec.IsRuntimeBinder && MethodGroupExpr.IsExtensionMethodArgument (expr)) {
ec.Report.SymbolRelatedToPreviousError (type);
- var cand = ec.Module.GlobalRootNamespace.FindExtensionMethodNamespaces (ec, type, name, Arity);
+ var cand = ec.Module.GlobalRootNamespace.FindExtensionMethodNamespaces (ec, name, Arity);
string missing;
// a using directive or an assembly reference
if (cand != null) {
@@ -10037,6 +10094,7 @@ namespace Mono.CSharp
public override void Emit (EmitContext ec)
{
source.Emit (ec);
+ ec.MarkCallEntry (loc);
ec.Emit (OpCodes.Call, method);
}
@@ -10553,6 +10611,12 @@ namespace Mono.CSharp
this.loc = loc;
}
+ public CollectionElementInitializer (Location loc)
+ : base (null, null)
+ {
+ this.loc = loc;
+ }
+
public override Expression CreateExpressionTree (ResolveContext ec)
{
Arguments args = new Arguments (2);
@@ -11051,11 +11115,6 @@ namespace Mono.CSharp
eclass = ExprClass.Value;
return this;
}
-
- public override void EmitStatement (EmitContext ec)
- {
- base.EmitStatement (ec);
- }
public override object Accept (StructuralVisitor visitor)
{
diff --git a/mcs/mcs/field.cs b/mcs/mcs/field.cs
index 95c561980ab..fa3b07334da 100644
--- a/mcs/mcs/field.cs
+++ b/mcs/mcs/field.cs
@@ -358,9 +358,9 @@ namespace Mono.CSharp
return fs;
}
- public override List<TypeSpec> ResolveMissingDependencies ()
+ public override List<MissingTypeSpecReference> ResolveMissingDependencies (MemberSpec caller)
{
- return memberType.ResolveMissingDependencies ();
+ return memberType.ResolveMissingDependencies (this);
}
}
@@ -370,7 +370,7 @@ namespace Mono.CSharp
public class FixedField : FieldBase
{
public const string FixedElementName = "FixedElementField";
- static int GlobalCounter = 0;
+ static int GlobalCounter;
TypeBuilder fixed_buffer_type;
@@ -400,7 +400,7 @@ namespace Mono.CSharp
public override Constant ConvertInitializer (ResolveContext rc, Constant expr)
{
- return expr.ImplicitConversionRequired (rc, rc.BuiltinTypes.Int, Location);
+ return expr.ImplicitConversionRequired (rc, rc.BuiltinTypes.Int);
}
public override bool Define ()
diff --git a/mcs/mcs/flowanalysis.cs b/mcs/mcs/flowanalysis.cs
index 4fee5a1f707..3e2b2c82dab 100644
--- a/mcs/mcs/flowanalysis.cs
+++ b/mcs/mcs/flowanalysis.cs
@@ -1317,14 +1317,16 @@ namespace Mono.CSharp
}
}
- // <summary>
- // This is used by the flow analysis code to store information about a single local variable
- // or parameter. Depending on the variable's type, we need to allocate one or more elements
- // in the BitVector - if it's a fundamental or reference type, we just need to know whether
- // it has been assigned or not, but for structs, we need this information for each of its fields.
- // </summary>
- public class VariableInfo {
+ //
+ // This is used by definite assignment analysis code to store information about a local variable
+ // or parameter. Depending on the variable's type, we need to allocate one or more elements
+ // in the BitVector - if it's a fundamental or reference type, we just need to know whether
+ // it has been assigned or not, but for structs, we need this information for each of its fields.
+ //
+ public class VariableInfo
+ {
readonly string Name;
+
readonly TypeInfo TypeInfo;
// <summary>
@@ -1337,12 +1339,12 @@ namespace Mono.CSharp
// The first bit always specifies whether the variable as such has been assigned while
// the remaining bits contain this information for each of a struct's fields.
// </summary>
- public readonly int Length;
+ readonly int Length;
// <summary>
// If this is a parameter of local variable.
// </summary>
- public readonly bool IsParameter;
+ public bool IsParameter;
VariableInfo[] sub_info;
@@ -1369,7 +1371,7 @@ namespace Mono.CSharp
Initialize ();
}
- protected void Initialize ()
+ void Initialize ()
{
TypeInfo[] sub_fields = TypeInfo.SubStructInfo;
if (sub_fields != null) {
@@ -1382,16 +1384,21 @@ namespace Mono.CSharp
sub_info = new VariableInfo [0];
}
- public VariableInfo (LocalVariable local_info, int offset)
- : this (local_info.Name, local_info.Type, offset)
+ public static VariableInfo Create (BlockContext bc, LocalVariable variable)
{
- this.IsParameter = false;
+ var info = new VariableInfo (variable.Name, variable.Type, bc.AssignmentInfoOffset);
+ bc.AssignmentInfoOffset += info.Length;
+ return info;
}
- public VariableInfo (ParametersCompiled ip, int i, int offset)
- : this (ip.FixedParameters [i].Name, ip.Types [i], offset)
+ public static VariableInfo Create (BlockContext bc, Parameter parameter)
{
- this.IsParameter = true;
+ var info = new VariableInfo (parameter.Name, parameter.Type, bc.AssignmentInfoOffset) {
+ IsParameter = true
+ };
+
+ bc.AssignmentInfoOffset += info.Length;
+ return info;
}
public bool IsAssigned (ResolveContext ec)
diff --git a/mcs/mcs/generic.cs b/mcs/mcs/generic.cs
index 88771a8d4e1..5a24c6898b5 100644
--- a/mcs/mcs/generic.cs
+++ b/mcs/mcs/generic.cs
@@ -28,6 +28,50 @@ using System.Reflection.Emit;
#endif
namespace Mono.CSharp {
+ public class VarianceDecl
+ {
+ public VarianceDecl (Variance variance, Location loc)
+ {
+ this.Variance = variance;
+ this.Location = loc;
+ }
+
+ public Variance Variance { get; private set; }
+ public Location Location { get; private set; }
+
+ public static Variance CheckTypeVariance (TypeSpec t, Variance expected, IMemberContext member)
+ {
+ var tp = t as TypeParameterSpec;
+ if (tp != null) {
+ var v = tp.Variance;
+ if (expected == Variance.None && v != expected ||
+ expected == Variance.Covariant && v == Variance.Contravariant ||
+ expected == Variance.Contravariant && v == Variance.Covariant) {
+ ((TypeParameter) tp.MemberDefinition).ErrorInvalidVariance (member, expected);
+ }
+
+ return expected;
+ }
+
+ if (t.TypeArguments.Length > 0) {
+ var targs_definition = t.MemberDefinition.TypeParameters;
+ TypeSpec[] targs = TypeManager.GetTypeArguments (t);
+ for (int i = 0; i < targs.Length; ++i) {
+ var v = targs_definition[i].Variance;
+ CheckTypeVariance (targs[i], (Variance) ((int) v * (int) expected), member);
+ }
+
+ return expected;
+ }
+
+ var ac = t as ArrayContainer;
+ if (ac != null)
+ return CheckTypeVariance (ac.Element, expected, member);
+
+ return Variance.None;
+ }
+ }
+
public enum Variance
{
//
@@ -73,9 +117,9 @@ namespace Mono.CSharp {
//
public class Constraints
{
- SimpleMemberName tparam;
- List<FullNamedExpression> constraints;
- Location loc;
+ readonly SimpleMemberName tparam;
+ readonly List<FullNamedExpression> constraints;
+ readonly Location loc;
bool resolved;
bool resolving;
@@ -235,7 +279,7 @@ namespace Mono.CSharp {
// is valid with respect to T
//
if (tp.IsMethodTypeParameter) {
- TypeManager.CheckTypeVariance (type, Variance.Contravariant, context);
+ VarianceDecl.CheckTypeVariance (type, Variance.Contravariant, context);
}
var tp_def = constraint_tp.MemberDefinition as TypeParameter;
@@ -354,26 +398,28 @@ namespace Mono.CSharp {
//
public class TypeParameter : MemberCore, ITypeDefinition
{
- static readonly string[] attribute_target = new string [] { "type parameter" };
+ static readonly string[] attribute_target = { "type parameter" };
Constraints constraints;
GenericTypeParameterBuilder builder;
readonly TypeParameterSpec spec;
- public TypeParameter (int index, MemberName name, Constraints constraints, Attributes attrs, Variance variance)
+ public TypeParameter (int index, MemberName name, Constraints constraints, Attributes attrs, Variance Variance)
: base (null, name, attrs)
{
this.constraints = constraints;
- this.spec = new TypeParameterSpec (null, index, this, SpecialConstraint.None, variance, null);
+ this.spec = new TypeParameterSpec (null, index, this, SpecialConstraint.None, Variance, null);
}
//
// Used by parser
//
- public TypeParameter (MemberName name, Attributes attrs, Variance variance)
+ public TypeParameter (MemberName name, Attributes attrs, VarianceDecl variance)
: base (null, name, attrs)
{
- this.spec = new TypeParameterSpec (null, -1, this, SpecialConstraint.None, variance, null);
+ var var = variance == null ? Variance.None : variance.Variance;
+ this.spec = new TypeParameterSpec (null, -1, this, SpecialConstraint.None, var, null);
+ this.VarianceDecl = variance;
}
public TypeParameter (TypeParameterSpec spec, TypeSpec parentSpec, MemberName name, Attributes attrs)
@@ -482,6 +528,8 @@ namespace Mono.CSharp {
}
}
+ public VarianceDecl VarianceDecl { get; private set; }
+
#endregion
//
@@ -511,7 +559,7 @@ namespace Mono.CSharp {
// Copy constraint from resolved part to partial container
spec.SpecialConstraint = tp.spec.SpecialConstraint;
- spec.Interfaces = tp.spec.Interfaces;
+ spec.InterfacesDefined = tp.spec.InterfacesDefined;
spec.TypeArguments = tp.spec.TypeArguments;
spec.BaseType = tp.spec.BaseType;
@@ -583,8 +631,21 @@ namespace Mono.CSharp {
if (spec.InterfacesDefined != null)
builder.SetInterfaceConstraints (spec.InterfacesDefined.Select (l => l.GetMetaInfo ()).ToArray ());
- if (spec.TypeArguments != null)
- builder.SetInterfaceConstraints (spec.TypeArguments.Select (l => l.GetMetaInfo ()).ToArray ());
+ if (spec.TypeArguments != null) {
+ var meta_constraints = new List<MetaType> (spec.TypeArguments.Length);
+ foreach (var c in spec.TypeArguments) {
+ //
+ // Inflated type parameters can collide with special constraint types, don't
+ // emit any such type parameter.
+ //
+ if (c.BuiltinType == BuiltinTypeSpec.Type.Object || c.BuiltinType == BuiltinTypeSpec.Type.ValueType)
+ continue;
+
+ meta_constraints.Add (c.GetMetaInfo ());
+ }
+
+ builder.SetInterfaceConstraints (meta_constraints.ToArray ());
+ }
builder.SetGenericParameterAttributes (attr);
}
@@ -812,10 +873,7 @@ namespace Mono.CSharp {
public TypeSpec[] InterfacesDefined {
get {
if (ifaces_defined == null) {
- if (ifaces == null)
- return null;
-
- ifaces_defined = ifaces.ToArray ();
+ ifaces_defined = ifaces == null ? TypeSpec.EmptyTypes : ifaces.ToArray ();
}
return ifaces_defined.Length == 0 ? null : ifaces_defined;
@@ -1189,6 +1247,8 @@ namespace Mono.CSharp {
tps.ifaces_defined = new TypeSpec[defined.Length];
for (int i = 0; i < defined.Length; ++i)
tps.ifaces_defined [i] = inflator.Inflate (defined[i]);
+ } else if (ifaces_defined == TypeSpec.EmptyTypes) {
+ tps.ifaces_defined = TypeSpec.EmptyTypes;
}
var ifaces = Interfaces;
@@ -1196,6 +1256,7 @@ namespace Mono.CSharp {
tps.ifaces = new List<TypeSpec> (ifaces.Count);
for (int i = 0; i < ifaces.Count; ++i)
tps.ifaces.Add (inflator.Inflate (ifaces[i]));
+ tps.state |= StateFlags.InterfacesExpanded;
}
if (targs != null) {
@@ -1208,6 +1269,10 @@ namespace Mono.CSharp {
public override MemberSpec InflateMember (TypeParameterInflator inflator)
{
var tps = (TypeParameterSpec) MemberwiseClone ();
+#if DEBUG
+ tps.ID += 1000000;
+#endif
+
InflateConstraints (inflator, tps);
return tps;
}
@@ -1665,7 +1730,7 @@ namespace Mono.CSharp {
}
}
- public override bool IsGenericIterateInterface {
+ public override bool IsArrayGenericInterface {
get {
return (open_type.state & StateFlags.GenericIterateInterface) != 0;
}
@@ -1722,7 +1787,7 @@ namespace Mono.CSharp {
return false;
}
- TypeParameterInflator CreateLocalInflator (IModuleContext context)
+ public TypeParameterInflator CreateLocalInflator (IModuleContext context)
{
TypeParameterSpec[] tparams_full;
TypeSpec[] targs_full = targs;
@@ -1774,7 +1839,7 @@ namespace Mono.CSharp {
return new TypeParameterInflator (context, this, tparams_full, targs_full);
}
- MetaType CreateMetaInfo (TypeParameterMutator mutator)
+ MetaType CreateMetaInfo ()
{
//
// Converts nested type arguments into right order
@@ -1824,7 +1889,7 @@ namespace Mono.CSharp {
public override MetaType GetMetaInfo ()
{
if (info == null)
- info = CreateMetaInfo (null);
+ info = CreateMetaInfo ();
return info;
}
@@ -2494,8 +2559,8 @@ namespace Mono.CSharp {
//
// Check the interfaces constraints
//
- if (tparam.Interfaces != null) {
- foreach (TypeSpec iface in tparam.Interfaces) {
+ if (tparam.InterfacesDefined != null) {
+ foreach (TypeSpec iface in tparam.InterfacesDefined) {
if (!CheckConversion (mc, context, atype, tparam, iface, loc)) {
if (mc == null)
return false;
@@ -2638,40 +2703,6 @@ namespace Mono.CSharp {
}
}
- public partial class TypeManager
- {
- public static Variance CheckTypeVariance (TypeSpec t, Variance expected, IMemberContext member)
- {
- var tp = t as TypeParameterSpec;
- if (tp != null) {
- Variance v = tp.Variance;
- if (expected == Variance.None && v != expected ||
- expected == Variance.Covariant && v == Variance.Contravariant ||
- expected == Variance.Contravariant && v == Variance.Covariant) {
- ((TypeParameter)tp.MemberDefinition).ErrorInvalidVariance (member, expected);
- }
-
- return expected;
- }
-
- if (t.TypeArguments.Length > 0) {
- var targs_definition = t.MemberDefinition.TypeParameters;
- TypeSpec[] targs = GetTypeArguments (t);
- for (int i = 0; i < targs.Length; ++i) {
- Variance v = targs_definition[i].Variance;
- CheckTypeVariance (targs[i], (Variance) ((int)v * (int)expected), member);
- }
-
- return expected;
- }
-
- if (t.IsArray)
- return CheckTypeVariance (GetElementType (t), expected, member);
-
- return Variance.None;
- }
- }
-
//
// Implements C# type inference
//
@@ -2752,7 +2783,7 @@ namespace Mono.CSharp {
//
AnonymousMethodExpression am = a.Expr as AnonymousMethodExpression;
if (am != null) {
- if (am.ExplicitTypeInference (ec, tic, method_parameter))
+ if (am.ExplicitTypeInference (tic, method_parameter))
--score;
continue;
}
@@ -2818,7 +2849,7 @@ namespace Mono.CSharp {
var mi = Delegate.GetInvokeMethod (t_i);
TypeSpec rtype = mi.ReturnType;
- if (tic.IsReturnTypeNonDependent (ec, mi, rtype)) {
+ if (tic.IsReturnTypeNonDependent (mi, rtype)) {
// It can be null for default arguments
if (arguments[i] == null)
continue;
@@ -2917,15 +2948,20 @@ namespace Mono.CSharp {
public void AddCommonTypeBound (TypeSpec type)
{
- AddToBounds (new BoundInfo (type, BoundKind.Lower), 0);
+ AddToBounds (new BoundInfo (type, BoundKind.Lower), 0, false);
+ }
+
+ public void AddCommonTypeBoundAsync (TypeSpec type)
+ {
+ AddToBounds (new BoundInfo (type, BoundKind.Lower), 0, true);
}
- void AddToBounds (BoundInfo bound, int index)
+ void AddToBounds (BoundInfo bound, int index, bool voidAllowed)
{
//
// Some types cannot be used as type arguments
//
- if (bound.Type.Kind == MemberKind.Void || bound.Type.IsPointer || bound.Type.IsSpecialRuntimeType ||
+ if ((bound.Type.Kind == MemberKind.Void && !voidAllowed) || bound.Type.IsPointer || bound.Type.IsSpecialRuntimeType ||
bound.Type == InternalType.MethodGroup || bound.Type == InternalType.AnonymousMethod)
return;
@@ -2999,7 +3035,7 @@ namespace Mono.CSharp {
if (pos == -1)
return 0;
- AddToBounds (new BoundInfo (u, BoundKind.Exact), pos);
+ AddToBounds (new BoundInfo (u, BoundKind.Exact), pos, false);
return 1;
}
@@ -3106,87 +3142,100 @@ namespace Mono.CSharp {
}
//
- // Determines a unique type from which there is
- // a standard implicit conversion to all the other
- // candidate types.
+ // The set of candidate types Uj starts out as the set of
+ // all types in the set of bounds for Xi
//
- TypeSpec best_candidate = null;
- int cii;
- int candidates_count = candidates.Count;
- for (int ci = 0; ci < candidates_count; ++ci) {
- BoundInfo bound = candidates [ci];
- for (cii = 0; cii < candidates_count; ++cii) {
- if (cii == ci)
- continue;
+ var applicable = new bool [candidates.Count];
+ for (int ci = 0; ci < applicable.Length; ++ci)
+ applicable [ci] = true;
+
+ for (int ci = 0; ci < applicable.Length; ++ci) {
+ var bound = candidates [ci];
+ int cii = 0;
+
+ switch (bound.Kind) {
+ case BoundKind.Exact:
+ for (; cii != applicable.Length; ++cii) {
+ if (ci == cii)
+ continue;
- BoundInfo cbound = candidates[cii];
-
- // Same type parameters with different bounds
- if (cbound.Type == bound.Type) {
- if (bound.Kind != BoundKind.Exact)
- bound = cbound;
+ if (!applicable[cii])
+ break;
- continue;
+ //
+ // For each exact bound U of Xi all types Uj which are not identical
+ // to U are removed from the candidate set
+ //
+ if (candidates [cii].Type != bound.Type)
+ applicable[cii] = false;
}
- if (bound.Kind == BoundKind.Exact || cbound.Kind == BoundKind.Exact) {
- if (cbound.Kind == BoundKind.Lower) {
- if (!Convert.ImplicitConversionExists (ec, cbound.GetTypeExpression (), bound.Type)) {
- break;
- }
-
+ break;
+ case BoundKind.Lower:
+ for (; cii != applicable.Length; ++cii) {
+ if (ci == cii)
continue;
- }
- if (cbound.Kind == BoundKind.Upper) {
- if (!Convert.ImplicitConversionExists (ec, bound.GetTypeExpression (), cbound.Type)) {
- break;
- }
- continue;
+ if (!applicable[cii])
+ break;
+
+ //
+ // For each lower bound U of Xi all types Uj to which there is not an implicit conversion
+ // from U are removed from the candidate set
+ //
+ if (!Convert.ImplicitConversionExists (ec, bound.GetTypeExpression (), candidates [cii].Type)) {
+ applicable[cii] = false;
}
-
- if (bound.Kind != BoundKind.Exact) {
- if (!Convert.ImplicitConversionExists (ec, bound.GetTypeExpression (), cbound.Type)) {
- break;
- }
+ }
- bound = cbound;
+ break;
+
+ case BoundKind.Upper:
+ for (; cii != applicable.Length; ++cii) {
+ if (ci == cii)
continue;
- }
-
- break;
+
+ if (!applicable[cii])
+ break;
+
+ //
+ // For each upper bound U of Xi all types Uj from which there is not an implicit conversion
+ // to U are removed from the candidate set
+ //
+ if (!Convert.ImplicitConversionExists (ec, candidates[cii].GetTypeExpression (), bound.Type))
+ applicable[cii] = false;
}
- if (bound.Kind == BoundKind.Lower) {
- if (cbound.Kind == BoundKind.Lower) {
- if (!Convert.ImplicitConversionExists (ec, cbound.GetTypeExpression (), bound.Type)) {
- break;
- }
- } else {
- if (!Convert.ImplicitConversionExists (ec, bound.GetTypeExpression (), cbound.Type)) {
- break;
- }
+ break;
+ }
+ }
- bound = cbound;
- }
+ TypeSpec best_candidate = null;
+ for (int ci = 0; ci < applicable.Length; ++ci) {
+ if (!applicable[ci])
+ continue;
+ var bound = candidates [ci];
+ if (bound.Type == best_candidate)
+ continue;
+
+ int cii = 0;
+ for (; cii < applicable.Length; ++cii) {
+ if (ci == cii)
continue;
- }
- if (bound.Kind == BoundKind.Upper) {
- if (!Convert.ImplicitConversionExists (ec, bound.GetTypeExpression (), cbound.Type)) {
- break;
- }
- } else {
- throw new NotImplementedException ("variance conversion");
- }
+ if (!applicable[cii])
+ continue;
+
+ if (!Convert.ImplicitConversionExists (ec, candidates[cii].GetTypeExpression (), bound.Type))
+ break;
}
- if (cii != candidates_count)
+ if (cii != applicable.Length)
continue;
//
- // We already have the best candidate, break if thet are different
+ // We already have the best candidate, break if it's different (non-unique)
//
// Dynamic is never ambiguous as we prefer dynamic over other best candidate types
//
@@ -3265,8 +3314,13 @@ namespace Mono.CSharp {
// Tests whether all delegate input arguments are fixed and generic output type
// requires output type inference
//
- public bool IsReturnTypeNonDependent (ResolveContext ec, MethodSpec invoke, TypeSpec returnType)
+ public bool IsReturnTypeNonDependent (MethodSpec invoke, TypeSpec returnType)
{
+ AParametersCollection d_parameters = invoke.Parameters;
+
+ if (d_parameters.IsEmpty)
+ return true;
+
while (returnType.IsArray)
returnType = ((ArrayContainer) returnType).Element;
@@ -3274,11 +3328,6 @@ namespace Mono.CSharp {
if (IsFixed (returnType))
return false;
} else if (TypeManager.IsGenericType (returnType)) {
- if (returnType.IsDelegate) {
- invoke = Delegate.GetInvokeMethod (returnType);
- return IsReturnTypeNonDependent (ec, invoke, invoke.ReturnType);
- }
-
TypeSpec[] g_args = TypeManager.GetTypeArguments (returnType);
// At least one unfixed return type has to exist
@@ -3289,7 +3338,6 @@ namespace Mono.CSharp {
}
// All generic input arguments have to be fixed
- AParametersCollection d_parameters = invoke.Parameters;
return AllTypesAreFixed (d_parameters.Types);
}
@@ -3331,7 +3379,7 @@ namespace Mono.CSharp {
// If V is one of the unfixed type arguments
int pos = IsUnfixed (v);
if (pos != -1) {
- AddToBounds (new BoundInfo (u, inversed ? BoundKind.Upper : BoundKind.Lower), pos);
+ AddToBounds (new BoundInfo (u, inversed ? BoundKind.Upper : BoundKind.Lower), pos, false);
return 1;
}
@@ -3349,7 +3397,7 @@ namespace Mono.CSharp {
return LowerBoundInference (u_ac.Element, v_ac.Element, inversed);
}
- if (u_ac.Rank != 1 || !v.IsGenericIterateInterface)
+ if (u_ac.Rank != 1 || !v.IsArrayGenericInterface)
return 0;
var v_i = TypeManager.GetTypeArguments (v) [0];
@@ -3499,7 +3547,7 @@ namespace Mono.CSharp {
var invoke = Delegate.GetInvokeMethod (t);
TypeSpec rtype = invoke.ReturnType;
- if (!IsReturnTypeNonDependent (ec, invoke, rtype))
+ if (!IsReturnTypeNonDependent (invoke, rtype))
return 0;
// LAMESPEC: Standard does not specify that all methodgroup arguments
diff --git a/mcs/mcs/ikvm.cs b/mcs/mcs/ikvm.cs
index 12894a0cc75..3204ed11a08 100644
--- a/mcs/mcs/ikvm.cs
+++ b/mcs/mcs/ikvm.cs
@@ -91,12 +91,12 @@ namespace Mono.CSharp
public void ImportAssembly (Assembly assembly, RootNamespace targetNamespace)
{
- // It can be used more than once when importing same assembly
- // into 2 or more global aliases
- // TODO: Should be just Add
- GetAssemblyDefinition (assembly);
-
try {
+ // It can be used more than once when importing same assembly
+ // into 2 or more global aliases
+ // TODO: Should be just Add
+ GetAssemblyDefinition (assembly);
+
var all_types = assembly.GetTypes ();
ImportTypes (all_types, targetNamespace, true);
@@ -226,7 +226,7 @@ namespace Mono.CSharp
readonly StaticImporter importer;
readonly Universe domain;
Assembly corlib;
- List<Tuple<AssemblyName, string, Assembly>> loaded_names;
+ readonly List<Tuple<AssemblyName, string, Assembly>> loaded_names;
static readonly Dictionary<string, string[]> sdk_directory;
static StaticLoader ()
@@ -241,7 +241,7 @@ namespace Mono.CSharp
: base (compiler)
{
this.importer = importer;
- domain = new Universe (UniverseOptions.MetadataOnly | UniverseOptions.ResolveMissingMembers);
+ domain = new Universe (UniverseOptions.MetadataOnly | UniverseOptions.ResolveMissingMembers | UniverseOptions.DisableFusion);
domain.AssemblyResolve += AssemblyReferenceResolver;
loaded_names = new List<Tuple<AssemblyName, string, Assembly>> ();
@@ -307,7 +307,7 @@ namespace Mono.CSharp
foreach (var assembly in domain.GetAssemblies ()) {
AssemblyComparisonResult result;
- if (!Fusion.CompareAssemblyIdentityPure (refname, false, assembly.FullName, false, out result)) {
+ if (!domain.CompareAssemblyIdentity (refname, false, assembly.FullName, false, out result)) {
if ((result == AssemblyComparisonResult.NonEquivalentVersion || result == AssemblyComparisonResult.NonEquivalentPartialVersion) &&
(version_mismatch == null || version_mismatch.GetName ().Version < assembly.GetName ().Version) &&
!is_fx_assembly) {
diff --git a/mcs/mcs/import.cs b/mcs/mcs/import.cs
index 3576f28a7b7..72538a2da18 100644
--- a/mcs/mcs/import.cs
+++ b/mcs/mcs/import.cs
@@ -56,10 +56,10 @@ namespace Mono.CSharp
//
// Returns true when object at local position has dynamic attribute flag
//
- public bool IsDynamicObject (MetadataImporter importer)
+ public bool IsDynamicObject ()
{
if (provider != null)
- ReadAttribute (importer);
+ ReadAttribute ();
return flags != null && Position < flags.Length && flags[Position];
}
@@ -67,15 +67,15 @@ namespace Mono.CSharp
//
// Returns true when DynamicAttribute exists
//
- public bool HasDynamicAttribute (MetadataImporter importer)
+ public bool HasDynamicAttribute ()
{
if (provider != null)
- ReadAttribute (importer);
+ ReadAttribute ();
return flags != null;
}
- void ReadAttribute (MetadataImporter importer)
+ void ReadAttribute ()
{
IList<CustomAttributeData> cad;
if (provider is MemberInfo) {
@@ -152,7 +152,7 @@ namespace Mono.CSharp
public FieldSpec CreateField (FieldInfo fi, TypeSpec declaringType)
{
- Modifiers mod = 0;
+ Modifiers mod;
var fa = fi.Attributes;
switch (fa & FieldAttributes.FieldAccessMask) {
case FieldAttributes.Public:
@@ -324,10 +324,9 @@ namespace Mono.CSharp
// IFoo<A<T>> foo; // A<T> is definition in this case
// }
//
- // TODO: Is full logic from CreateType needed here as well?
- //
if (!IsMissingType (type) && type.IsGenericTypeDefinition) {
- var targs = CreateGenericArguments (0, type.GetGenericArguments (), dtype);
+ var start_pos = spec.DeclaringType == null ? 0 : spec.DeclaringType.MemberDefinition.TypeParametersCount;
+ var targs = CreateGenericArguments (start_pos, type.GetGenericArguments (), dtype);
spec = spec.MakeGenericType (module, targs);
}
}
@@ -714,7 +713,7 @@ namespace Mono.CSharp
TypeSpec spec;
if (import_cache.TryGetValue (type, out spec)) {
if (spec.BuiltinType == BuiltinTypeSpec.Type.Object) {
- if (dtype.IsDynamicObject (this))
+ if (dtype.IsDynamicObject ())
return module.Compiler.BuiltinTypes.Dynamic;
return spec;
@@ -723,7 +722,7 @@ namespace Mono.CSharp
if (!spec.IsGeneric || type.IsGenericTypeDefinition)
return spec;
- if (!dtype.HasDynamicAttribute (this))
+ if (!dtype.HasDynamicAttribute ())
return spec;
// We've found same object in the cache but this one has a dynamic custom attribute
@@ -857,9 +856,10 @@ namespace Mono.CSharp
if (kind == MemberKind.Class) {
if ((ma & TypeAttributes.Sealed) != 0) {
- mod |= Modifiers.SEALED;
if ((ma & TypeAttributes.Abstract) != 0)
mod |= Modifiers.STATIC;
+ else
+ mod |= Modifiers.SEALED;
} else if ((ma & TypeAttributes.Abstract) != 0) {
mod |= Modifiers.ABSTRACT;
}
@@ -1372,7 +1372,7 @@ namespace Mono.CSharp
protected AttributesBag cattrs;
protected readonly MetadataImporter importer;
- public ImportedDefinition (MemberInfo provider, MetadataImporter importer)
+ protected ImportedDefinition (MemberInfo provider, MetadataImporter importer)
{
this.provider = provider;
this.importer = importer;
@@ -1893,7 +1893,7 @@ namespace Mono.CSharp
}
- public static void Error_MissingDependency (IMemberContext ctx, List<TypeSpec> types, Location loc)
+ public static void Error_MissingDependency (IMemberContext ctx, List<MissingTypeSpecReference> missing, Location loc)
{
//
// Report details about missing type and most likely cause of the problem.
@@ -1904,8 +1904,8 @@ namespace Mono.CSharp
var report = ctx.Module.Compiler.Report;
- for (int i = 0; i < types.Count; ++i) {
- var t = types [i];
+ for (int i = 0; i < missing.Count; ++i) {
+ var t = missing [i].Type;
//
// Report missing types only once
@@ -1915,6 +1915,10 @@ namespace Mono.CSharp
string name = t.GetSignatureForError ();
+ var caller = missing[i].Caller;
+ if (caller.Kind != MemberKind.MissingType)
+ report.SymbolRelatedToPreviousError (caller);
+
if (t.MemberDefinition.DeclaringAssembly == ctx.Module.DeclaringAssembly) {
report.Error (1683, loc,
"Reference to type `{0}' claims it is defined in this assembly, but it is not defined in source or any added modules",
@@ -2107,7 +2111,13 @@ namespace Mono.CSharp
if (get == null && set == null)
continue;
- imported = importer.CreateProperty (p, declaringType, get, set);
+ try {
+ imported = importer.CreateProperty (p, declaringType, get, set);
+ } catch (Exception ex) {
+ throw new InternalErrorException (ex, "Could not import property `{0}' inside `{1}'",
+ p.Name, declaringType.GetSignatureForError ());
+ }
+
if (imported == null)
continue;
diff --git a/mcs/mcs/lambda.cs b/mcs/mcs/lambda.cs
index 0241978e2a4..7868c6a2c9d 100644
--- a/mcs/mcs/lambda.cs
+++ b/mcs/mcs/lambda.cs
@@ -65,7 +65,7 @@ namespace Mono.CSharp {
AParametersCollection d_params = Delegate.GetParameters (delegateType);
if (HasExplicitParameters) {
- if (!VerifyExplicitParameters (ec, delegateType, d_params))
+ if (!VerifyExplicitParameters (ec, tic, delegateType, d_params))
return null;
return Parameters;
@@ -75,7 +75,7 @@ namespace Mono.CSharp {
// If L has an implicitly typed parameter list we make implicit parameters explicit
// Set each parameter of L is given the type of the corresponding parameter in D
//
- if (!VerifyParameterCompatibility (ec, delegateType, d_params, ec.IsInProbingMode))
+ if (!VerifyParameterCompatibility (ec, tic, delegateType, d_params, ec.IsInProbingMode))
return null;
TypeSpec [] ptypes = new TypeSpec [Parameters.Count];
diff --git a/mcs/mcs/membercache.cs b/mcs/mcs/membercache.cs
index 5da68dc7357..89e94af3963 100644
--- a/mcs/mcs/membercache.cs
+++ b/mcs/mcs/membercache.cs
@@ -226,7 +226,7 @@ namespace Mono.CSharp {
continue;
if (list is MemberSpec[]) {
- list = new List<MemberSpec> () { list [0] };
+ list = new List<MemberSpec> { list [0] };
member_hash[entry.Key] = list;
}
@@ -335,7 +335,7 @@ namespace Mono.CSharp {
member_hash[name] = list;
} else {
if (list.Count == 1) {
- list = new List<MemberSpec> () { list[0] };
+ list = new List<MemberSpec> { list[0] };
member_hash[name] = list;
}
@@ -390,7 +390,7 @@ namespace Mono.CSharp {
}
if (existing.Count == 1) {
- existing = new List<MemberSpec> () { existing[0], member };
+ existing = new List<MemberSpec> { existing[0], member };
return true;
}
@@ -502,7 +502,7 @@ namespace Mono.CSharp {
//
// Looks for extension methods with defined name and extension type
//
- public List<MethodSpec> FindExtensionMethods (IMemberContext invocationContext, TypeSpec extensionType, string name, int arity)
+ public List<MethodSpec> FindExtensionMethods (IMemberContext invocationContext, string name, int arity)
{
IList<MemberSpec> entries;
if (!member_hash.TryGetValue (name, out entries))
diff --git a/mcs/mcs/method.cs b/mcs/mcs/method.cs
index bda1909d2d6..03568fa9230 100644
--- a/mcs/mcs/method.cs
+++ b/mcs/mcs/method.cs
@@ -47,7 +47,7 @@ namespace Mono.CSharp {
protected ToplevelBlock block;
protected MethodSpec spec;
- public MethodCore (TypeDefinition parent, FullNamedExpression type, Modifiers mod, Modifiers allowed_mod,
+ protected MethodCore (TypeDefinition parent, FullNamedExpression type, Modifiers mod, Modifiers allowed_mod,
MemberName name, Attributes attrs, ParametersCompiled parameters)
: base (parent, type, mod, allowed_mod, name, attrs)
{
@@ -493,29 +493,29 @@ namespace Mono.CSharp {
return ms;
}
- public override List<TypeSpec> ResolveMissingDependencies ()
+ public override List<MissingTypeSpecReference> ResolveMissingDependencies (MemberSpec caller)
{
- var missing = returnType.ResolveMissingDependencies ();
+ var missing = returnType.ResolveMissingDependencies (this);
foreach (var pt in parameters.Types) {
- var m = pt.GetMissingDependencies ();
+ var m = pt.GetMissingDependencies (this);
if (m == null)
continue;
if (missing == null)
- missing = new List<TypeSpec> ();
+ missing = new List<MissingTypeSpecReference> ();
missing.AddRange (m);
}
if (Arity > 0) {
foreach (var tp in GenericDefinition.TypeParameters) {
- var m = tp.GetMissingDependencies ();
+ var m = tp.GetMissingDependencies (this);
if (m == null)
continue;
if (missing == null)
- missing = new List<TypeSpec> ();
+ missing = new List<MissingTypeSpecReference> ();
missing.AddRange (m);
}
@@ -685,6 +685,8 @@ namespace Mono.CSharp {
Module.PredefinedAttributes.CompilerGenerated.EmitAttribute (MethodBuilder);
if ((ModFlags & Modifiers.DEBUGGER_HIDDEN) != 0)
Module.PredefinedAttributes.DebuggerHidden.EmitAttribute (MethodBuilder);
+ if ((ModFlags & Modifiers.DEBUGGER_STEP_THROUGH) != 0)
+ Module.PredefinedAttributes.DebuggerStepThrough.EmitAttribute (MethodBuilder);
if (ReturnType.BuiltinType == BuiltinTypeSpec.Type.Dynamic) {
return_attributes = new ReturnParameter (this, MethodBuilder, Location);
@@ -1232,7 +1234,7 @@ namespace Mono.CSharp {
}
block = (ToplevelBlock) block.ConvertToAsyncTask (this, Parent.PartialContainer, parameters, ReturnType, null, Location);
- ModFlags |= Modifiers.DEBUGGER_HIDDEN;
+ ModFlags |= Modifiers.DEBUGGER_STEP_THROUGH;
}
if (Compiler.Settings.WriteMetadataOnly)
@@ -1403,7 +1405,7 @@ namespace Mono.CSharp {
Arguments argument_list;
MethodSpec base_ctor;
- public ConstructorInitializer (Arguments argument_list, Location loc)
+ protected ConstructorInitializer (Arguments argument_list, Location loc)
{
this.argument_list = argument_list;
this.loc = loc;
@@ -2124,13 +2126,11 @@ namespace Mono.CSharp {
{
DefineOverride (parent);
- var mc = (IMemberContext) method;
-
- method.ParameterInfo.ApplyAttributes (mc, MethodBuilder);
+ method.ParameterInfo.ApplyAttributes (method, MethodBuilder);
ToplevelBlock block = method.Block;
if (block != null) {
- BlockContext bc = new BlockContext (mc, block, method.ReturnType);
+ BlockContext bc = new BlockContext (method, block, method.ReturnType);
if (block.Resolve (null, bc, method)) {
debug_builder = member.Parent.CreateMethodSymbolEntry ();
EmitContext ec = method.CreateEmitContext (MethodBuilder.GetILGenerator (), debug_builder);
@@ -2267,7 +2267,7 @@ namespace Mono.CSharp {
ReturnParameter return_attributes;
- public AbstractPropertyEventMethod (InterfaceMemberBase member, string prefix, Attributes attrs, Location loc)
+ protected AbstractPropertyEventMethod (InterfaceMemberBase member, string prefix, Attributes attrs, Location loc)
: base (member.Parent, SetupName (prefix, member, loc), attrs)
{
this.prefix = prefix;
diff --git a/mcs/mcs/modifiers.cs b/mcs/mcs/modifiers.cs
index f842410c7f7..970e8dedd71 100644
--- a/mcs/mcs/modifiers.cs
+++ b/mcs/mcs/modifiers.cs
@@ -51,6 +51,7 @@ namespace Mono.CSharp
COMPILER_GENERATED = 0x100000,
BACKING_FIELD = 0x200000,
DEBUGGER_HIDDEN = 0x400000,
+ DEBUGGER_STEP_THROUGH = 0x800000,
AccessibilityMask = PUBLIC | PROTECTED | INTERNAL | PRIVATE,
AllowedExplicitImplFlags = UNSAFE | EXTERN,
diff --git a/mcs/mcs/module.cs b/mcs/mcs/module.cs
index 4eeb37d59fa..e7e02a0bf14 100644
--- a/mcs/mcs/module.cs
+++ b/mcs/mcs/module.cs
@@ -187,9 +187,6 @@ namespace Mono.CSharp
}
public int CounterAnonymousTypes { get; set; }
- public int CounterAnonymousMethods { get; set; }
- public int CounterAnonymousContainers { get; set; }
- public int CounterSwitchTypes { get; set; }
public AssemblyDefinition DeclaringAssembly {
get {
@@ -314,7 +311,7 @@ namespace Mono.CSharp
public override void AddTypeContainer (TypeContainer tc)
{
- containers.Add (tc);
+ AddTypeContainerMember (tc);
}
public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, PredefinedAttributes pa)
diff --git a/mcs/mcs/namespace.cs b/mcs/mcs/namespace.cs
index d9b6a602437..6a6f17e8e9d 100644
--- a/mcs/mcs/namespace.cs
+++ b/mcs/mcs/namespace.cs
@@ -64,12 +64,12 @@ namespace Mono.CSharp {
//
// For better error reporting where compiler tries to guess missing using directive
//
- public List<string> FindExtensionMethodNamespaces (IMemberContext ctx, TypeSpec extensionType, string name, int arity)
+ public List<string> FindExtensionMethodNamespaces (IMemberContext ctx, string name, int arity)
{
List<string> res = null;
foreach (var ns in all_namespaces) {
- var methods = ns.Value.LookupExtensionMethod (ctx, extensionType, name, arity);
+ var methods = ns.Value.LookupExtensionMethod (ctx, name, arity);
if (methods != null) {
if (res == null)
res = new List<string> ();
@@ -125,7 +125,7 @@ namespace Mono.CSharp {
protected Dictionary<string, Namespace> namespaces;
protected Dictionary<string, IList<TypeSpec>> types;
List<TypeSpec> extension_method_types;
- Dictionary<string, TypeExpr> cached_types;
+ Dictionary<string, TypeSpec> cached_types;
RootNamespace root;
bool cls_checked;
@@ -171,7 +171,7 @@ namespace Mono.CSharp {
MemberName = new MemberName (name, Location.Null);
namespaces = new Dictionary<string, Namespace> ();
- cached_types = new Dictionary<string, TypeExpr> ();
+ cached_types = new Dictionary<string, TypeSpec> ();
root.RegisterNamespace (this);
}
@@ -204,20 +204,20 @@ namespace Mono.CSharp {
{
var retval = LookupType (ctx, name, arity, LookupMode.IgnoreAccessibility, loc);
if (retval != null) {
- ctx.Module.Compiler.Report.SymbolRelatedToPreviousError (retval.Type);
+// ctx.Module.Compiler.Report.SymbolRelatedToPreviousError (retval.MemberDefinition);
ErrorIsInaccesible (ctx, retval.GetSignatureForError (), loc);
return;
}
retval = LookupType (ctx, name, -System.Math.Max (1, arity), LookupMode.Probing, loc);
if (retval != null) {
- Error_TypeArgumentsCannotBeUsed (ctx, retval.Type, arity, loc);
+ Error_TypeArgumentsCannotBeUsed (ctx, retval, loc);
return;
}
Namespace ns;
if (arity > 0 && namespaces.TryGetValue (name, out ns)) {
- ns.Error_TypeArgumentsCannotBeUsed (ctx, null, arity, loc);
+ ns.Error_TypeArgumentsCannotBeUsed (ctx, null, loc);
return;
}
@@ -327,20 +327,21 @@ namespace Mono.CSharp {
return found;
}
- public TypeExpr LookupType (IMemberContext ctx, string name, int arity, LookupMode mode, Location loc)
+ public TypeSpec LookupType (IMemberContext ctx, string name, int arity, LookupMode mode, Location loc)
{
if (types == null)
return null;
- TypeExpr te;
- if (arity == 0 && cached_types.TryGetValue (name, out te))
- return te;
+ TypeSpec best = null;
+ if (arity == 0 && cached_types.TryGetValue (name, out best)) {
+ if (best != null || mode != LookupMode.IgnoreAccessibility)
+ return best;
+ }
IList<TypeSpec> found;
if (!types.TryGetValue (name, out found))
return null;
- TypeSpec best = null;
foreach (var ts in found) {
if (ts.Arity == arity) {
if (best == null) {
@@ -391,16 +392,11 @@ namespace Mono.CSharp {
}
}
- if (best == null)
- return null;
-
- te = new TypeExpression (best, Location.Null);
-
// TODO MemberCache: Cache more
if (arity == 0 && mode == LookupMode.Normal)
- cached_types.Add (name, te);
+ cached_types.Add (name, best);
- return te;
+ return best;
}
public FullNamedExpression LookupTypeOrNamespace (IMemberContext ctx, string name, int arity, LookupMode mode, Location loc)
@@ -413,18 +409,21 @@ namespace Mono.CSharp {
return ns;
if (mode != LookupMode.Probing) {
- ctx.Module.Compiler.Report.SymbolRelatedToPreviousError (texpr.Type);
+ //ctx.Module.Compiler.Report.SymbolRelatedToPreviousError (texpr.Type);
// ctx.Module.Compiler.Report.SymbolRelatedToPreviousError (ns.loc, "");
ctx.Module.Compiler.Report.Warning (437, 2, loc,
"The type `{0}' conflicts with the imported namespace `{1}'. Using the definition found in the source file",
texpr.GetSignatureForError (), ns.GetSignatureForError ());
}
- if (texpr.Type.MemberDefinition.IsImported)
+ if (texpr.MemberDefinition.IsImported)
return ns;
}
- return texpr;
+ if (texpr == null)
+ return null;
+
+ return new TypeExpression (texpr, loc);
}
//
@@ -448,7 +447,7 @@ namespace Mono.CSharp {
//
// Looks for extension method in this namespace
//
- public List<MethodSpec> LookupExtensionMethod (IMemberContext invocationContext, TypeSpec extensionType, string name, int arity)
+ public List<MethodSpec> LookupExtensionMethod (IMemberContext invocationContext, string name, int arity)
{
if (extension_method_types == null)
return null;
@@ -471,7 +470,7 @@ namespace Mono.CSharp {
continue;
}
- var res = ts.MemberCache.FindExtensionMethods (invocationContext, extensionType, name, arity);
+ var res = ts.MemberCache.FindExtensionMethods (invocationContext, name, arity);
if (res == null)
continue;
@@ -730,7 +729,7 @@ namespace Mono.CSharp {
void CreateUnitSymbolInfo (MonoSymbolFile symwriter)
{
var si = file.CreateSymbolInfo (symwriter);
- comp_unit = new CompileUnitEntry (symwriter, si);;
+ comp_unit = new CompileUnitEntry (symwriter, si);
if (include_files != null) {
foreach (SourceFile include in include_files.Values) {
@@ -873,7 +872,7 @@ namespace Mono.CSharp {
public override void AddPartial (TypeDefinition next_part)
{
var existing = ns.LookupType (this, next_part.MemberName.Name, next_part.MemberName.Arity, LookupMode.Probing, Location.Null);
- var td = existing != null ? existing.Type.MemberDefinition as TypeDefinition : null;
+ var td = existing != null ? existing.MemberDefinition as TypeDefinition : null;
AddPartial (next_part, td);
}
@@ -892,7 +891,7 @@ namespace Mono.CSharp {
MemberCore mc;
if (names_container.DefinedNames.TryGetValue (name, out mc)) {
if (tc is NamespaceContainer && mc is NamespaceContainer) {
- containers.Add (tc);
+ AddTypeContainerMember (tc);
return;
}
@@ -969,7 +968,7 @@ namespace Mono.CSharp {
ExtensionMethodCandidates candidates;
var container = this;
do {
- candidates = container.LookupExtensionMethodCandidates (invocationContext, extensionType, name, arity, ref position);
+ candidates = container.LookupExtensionMethodCandidates (invocationContext, name, arity, ref position);
if (candidates != null || container.MemberName == null)
return candidates;
@@ -984,7 +983,7 @@ namespace Mono.CSharp {
while (mn != null) {
++position;
- var methods = container_ns.LookupExtensionMethod (invocationContext, extensionType, name, arity);
+ var methods = container_ns.LookupExtensionMethod (invocationContext, name, arity);
if (methods != null) {
return new ExtensionMethodCandidates (invocationContext, methods, container, position);
}
@@ -1000,14 +999,14 @@ namespace Mono.CSharp {
return null;
}
- ExtensionMethodCandidates LookupExtensionMethodCandidates (IMemberContext invocationContext, TypeSpec extensionType, string name, int arity, ref int position)
+ ExtensionMethodCandidates LookupExtensionMethodCandidates (IMemberContext invocationContext, string name, int arity, ref int position)
{
List<MethodSpec> candidates = null;
if (position == 0) {
++position;
- candidates = ns.LookupExtensionMethod (invocationContext, extensionType, name, arity);
+ candidates = ns.LookupExtensionMethod (invocationContext, name, arity);
if (candidates != null) {
return new ExtensionMethodCandidates (invocationContext, candidates, this, position);
}
@@ -1017,7 +1016,7 @@ namespace Mono.CSharp {
++position;
foreach (Namespace n in namespace_using_table) {
- var a = n.LookupExtensionMethod (invocationContext, extensionType, name, arity);
+ var a = n.LookupExtensionMethod (invocationContext, name, arity);
if (a == null)
continue;
@@ -1062,6 +1061,9 @@ namespace Mono.CSharp {
public override void GetCompletionStartingWith (string prefix, List<string> results)
{
+ if (Usings == null)
+ return;
+
foreach (var un in Usings) {
if (un.Alias != null)
continue;
@@ -1137,7 +1139,7 @@ namespace Mono.CSharp {
if (aliases != null && arity == 0) {
UsingAliasNamespace uan;
if (aliases.TryGetValue (name, out uan)) {
- if (fne != null) {
+ if (fne != null && mode != LookupMode.Probing) {
// TODO: Namespace has broken location
//Report.SymbolRelatedToPreviousError (fne.Location, null);
Compiler.Report.SymbolRelatedToPreviousError (uan.Location, null);
@@ -1169,10 +1171,11 @@ namespace Mono.CSharp {
// A using directive imports only types contained in the namespace, it
// does not import any nested namespaces
//
- fne = using_ns.LookupType (this, name, arity, mode, loc);
- if (fne == null)
+ var t = using_ns.LookupType (this, name, arity, mode, loc);
+ if (t == null)
continue;
+ fne = new TypeExpression (t, loc);
if (match == null) {
match = fne;
continue;
diff --git a/mcs/mcs/nullable.cs b/mcs/mcs/nullable.cs
index 96afce4fd5e..1732a9b9c5c 100644
--- a/mcs/mcs/nullable.cs
+++ b/mcs/mcs/nullable.cs
@@ -394,7 +394,7 @@ namespace Mono.CSharp.Nullable
value_target.AddressOf (ec, AddressOp.Store);
ec.Emit (OpCodes.Initobj, type);
- ((IMemoryLocation) value_target).AddressOf (ec, Mode);
+ value_target.AddressOf (ec, Mode);
}
}
@@ -1010,8 +1010,6 @@ namespace Mono.CSharp.Nullable
public override SLE.Expression MakeExpression (BuilderContext ctx)
{
- Console.WriteLine (":{0} x {1}", Left.GetType (), Right.GetType ());
-
return Binary.MakeExpression (ctx, Left, Right);
}
}
@@ -1147,7 +1145,7 @@ namespace Mono.CSharp.Nullable
}
TypeSpec rtype = right.Type;
- if (!Convert.ImplicitConversionExists (ec, unwrap != null ? unwrap : left, rtype) || right.eclass == ExprClass.MethodGroup)
+ if (!Convert.ImplicitConversionExists (ec, unwrap ?? left, rtype) || right.eclass == ExprClass.MethodGroup)
return null;
//
@@ -1156,7 +1154,7 @@ namespace Mono.CSharp.Nullable
if (left.IsNull)
return ReducedExpression.Create (right, this).Resolve (ec);
- left = Convert.ImplicitConversion (ec, unwrap != null ? unwrap : left, rtype, loc);
+ left = Convert.ImplicitConversion (ec, unwrap ?? left, rtype, loc);
type = rtype;
return this;
}
diff --git a/mcs/mcs/parameter.cs b/mcs/mcs/parameter.cs
index 69ae1cf839f..bcd814149a2 100644
--- a/mcs/mcs/parameter.cs
+++ b/mcs/mcs/parameter.cs
@@ -394,7 +394,7 @@ namespace Mono.CSharp {
return null;
}
- TypeManager.CheckTypeVariance (parameter_type,
+ VarianceDecl.CheckTypeVariance (parameter_type,
(modFlags & Parameter.Modifier.RefOutMask) != 0 ? Variance.None : Variance.Contravariant,
rc);
@@ -501,7 +501,7 @@ namespace Mono.CSharp {
} else {
rc.Report.Error (1909, default_expr.Location,
"The DefaultParameterValue attribute is not applicable on parameters of type `{0}'",
- default_expr.Type.GetSignatureForError ()); ;
+ default_expr.Type.GetSignatureForError ());
}
default_expr = null;
@@ -972,10 +972,18 @@ namespace Mono.CSharp {
if (inflated_types[i] == expr.Type)
continue;
- if (expr is DefaultValueExpression)
+ var c = expr as Constant;
+ if (c != null) {
+ //
+ // It may fail we are inflating before type validation is done
+ //
+ c = Constant.ExtractConstantFromValue (inflated_types[i], c.GetValue (), expr.Location);
+ if (c == null)
+ expr = new DefaultValueExpression (new TypeExpression (inflated_types[i], expr.Location), expr.Location);
+ else
+ expr = c;
+ } else if (expr is DefaultValueExpression)
expr = new DefaultValueExpression (new TypeExpression (inflated_types[i], expr.Location), expr.Location);
- else if (expr is Constant)
- expr = Constant.CreateConstantFromValue (inflated_types[i], ((Constant) expr).GetValue (), expr.Location);
clone.FixedParameters[i] = new ParameterData (fp.Name, fp.ModFlags, expr);
}
@@ -1325,11 +1333,6 @@ namespace Mono.CSharp {
{
}
- protected override Expression DoResolve (ResolveContext rc)
- {
- return base.DoResolve (rc);
- }
-
public void Resolve (ResolveContext rc, Parameter p)
{
var expr = Resolve (rc);
@@ -1378,6 +1381,8 @@ namespace Mono.CSharp {
rc.Report.Error (1750, Location,
"Optional parameter expression of type `{0}' cannot be converted to parameter type `{1}'",
type.GetSignatureForError (), parameter_type.GetSignatureForError ());
+
+ this.expr = ErrorExpression.Instance;
}
public override object Accept (StructuralVisitor visitor)
diff --git a/mcs/mcs/pending.cs b/mcs/mcs/pending.cs
index af15bf6e1c9..0f863a7bcf1 100644
--- a/mcs/mcs/pending.cs
+++ b/mcs/mcs/pending.cs
@@ -689,7 +689,7 @@ namespace Mono.CSharp {
if (pending_implementations [i].optional)
continue;
- MethodSpec candidate = null;
+ MethodSpec candidate;
if (base_implements_type || BaseImplements (type, mi, out candidate))
continue;
diff --git a/mcs/mcs/property.cs b/mcs/mcs/property.cs
index 06ffb0df7a4..eb95d388da7 100644
--- a/mcs/mcs/property.cs
+++ b/mcs/mcs/property.cs
@@ -35,7 +35,7 @@ namespace Mono.CSharp
// This includes properties, indexers, and events
public abstract class PropertyBasedMember : InterfaceMemberBase
{
- public PropertyBasedMember (TypeDefinition parent, FullNamedExpression type, Modifiers mod, Modifiers allowed_mod, MemberName name, Attributes attrs)
+ protected PropertyBasedMember (TypeDefinition parent, FullNamedExpression type, Modifiers mod, Modifiers allowed_mod, MemberName name, Attributes attrs)
: base (parent, type, mod, allowed_mod, name, attrs)
{
}
@@ -174,9 +174,9 @@ namespace Mono.CSharp
return ps;
}
- public override List<TypeSpec> ResolveMissingDependencies ()
+ public override List<MissingTypeSpecReference> ResolveMissingDependencies (MemberSpec caller)
{
- return memberType.ResolveMissingDependencies ();
+ return memberType.ResolveMissingDependencies (this);
}
}
@@ -408,7 +408,7 @@ namespace Mono.CSharp
PropertyMethod get, set, first;
PropertyBuilder PropertyBuilder;
- public PropertyBase (TypeDefinition parent, FullNamedExpression type, Modifiers mod_flags, Modifiers allowed_mod, MemberName name, Attributes attrs)
+ protected PropertyBase (TypeDefinition parent, FullNamedExpression type, Modifiers mod_flags, Modifiers allowed_mod, MemberName name, Attributes attrs)
: base (parent, type, mod_flags, allowed_mod, name, attrs)
{
}
@@ -735,6 +735,10 @@ namespace Mono.CSharp
}
}
+ static readonly string[] attribute_target_auto = new string[] { "property", "field" };
+
+ Field backing_field;
+
public Property (TypeDefinition parent, FullNamedExpression type, Modifiers mod,
MemberName name, Attributes attrs)
: base (parent, type, mod,
@@ -749,19 +753,28 @@ namespace Mono.CSharp
{
visitor.Visit (this);
}
-
+
+ public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, PredefinedAttributes pa)
+ {
+ if (a.Target == AttributeTargets.Field) {
+ backing_field.ApplyAttributeBuilder (a, ctor, cdata, pa);
+ return;
+ }
+
+ base.ApplyAttributeBuilder (a, ctor, cdata, pa);
+ }
void CreateAutomaticProperty ()
{
// Create backing field
- Field field = new BackingField (this);
- if (!field.Define ())
+ backing_field = new BackingField (this);
+ if (!backing_field.Define ())
return;
- Parent.PartialContainer.Members.Add (field);
+ Parent.PartialContainer.Members.Add (backing_field);
- FieldExpr fe = new FieldExpr (field, Location);
- if ((field.ModFlags & Modifiers.STATIC) == 0)
+ FieldExpr fe = new FieldExpr (backing_field, Location);
+ if ((backing_field.ModFlags & Modifiers.STATIC) == 0)
fe.InstanceExpression = new CompilerGeneratedThis (Parent.CurrentType, Location);
//
@@ -826,6 +839,13 @@ namespace Mono.CSharp
base.Emit ();
}
+
+ public override string[] ValidAttributeTargets {
+ get {
+ return Get != null && ((Get.ModFlags & Modifiers.COMPILER_GENERATED) != 0) ?
+ attribute_target_auto : base.ValidAttributeTargets;
+ }
+ }
}
/// <summary>
@@ -1427,9 +1447,9 @@ namespace Mono.CSharp
return es;
}
- public override List<TypeSpec> ResolveMissingDependencies ()
+ public override List<MissingTypeSpecReference> ResolveMissingDependencies (MemberSpec caller)
{
- return MemberType.ResolveMissingDependencies ();
+ return MemberType.ResolveMissingDependencies (this);
}
}
@@ -1701,16 +1721,17 @@ namespace Mono.CSharp
return spec;
}
- public override List<TypeSpec> ResolveMissingDependencies ()
+ public override List<MissingTypeSpecReference> ResolveMissingDependencies (MemberSpec caller)
{
- var missing = base.ResolveMissingDependencies ();
+ var missing = base.ResolveMissingDependencies (caller);
+
foreach (var pt in parameters.Types) {
- var m = pt.GetMissingDependencies ();
+ var m = pt.GetMissingDependencies (caller);
if (m == null)
continue;
if (missing == null)
- missing = new List<TypeSpec> ();
+ missing = new List<MissingTypeSpecReference> ();
missing.AddRange (m);
}
diff --git a/mcs/mcs/report.cs b/mcs/mcs/report.cs
index f49a2980d7a..009007b0d52 100644
--- a/mcs/mcs/report.cs
+++ b/mcs/mcs/report.cs
@@ -954,7 +954,7 @@ namespace Mono.CSharp {
if (timers == null)
return;
- Dictionary<TimerType, string> timer_names = new Dictionary<TimerType,string> () {
+ Dictionary<TimerType, string> timer_names = new Dictionary<TimerType,string> {
{ TimerType.ParseTotal, "Parsing source files" },
{ TimerType.AssemblyBuilderSetup, "Assembly builder setup" },
{ TimerType.CreateTypeTotal, "Compiled types created" },
@@ -1053,7 +1053,7 @@ namespace Mono.CSharp {
public override bool IsEnabled (int code, bool previous)
{
- return this.code == code ? false : previous;
+ return this.code != code && previous;
}
}
@@ -1079,7 +1079,7 @@ namespace Mono.CSharp {
public override bool IsEnabled(int code, bool previous)
{
- return this.code == code ? true : previous;
+ return this.code == code || previous;
}
}
diff --git a/mcs/mcs/settings.cs b/mcs/mcs/settings.cs
index 6ec57df13d9..c560c0b01a2 100644
--- a/mcs/mcs/settings.cs
+++ b/mcs/mcs/settings.cs
@@ -302,8 +302,8 @@ namespace Mono.CSharp {
UnknownOption
}
- static readonly char[] argument_value_separator = new char[] { ';', ',' };
- static readonly char[] numeric_value_separator = new char[] { ';', ',', ' ' };
+ static readonly char[] argument_value_separator = { ';', ',' };
+ static readonly char[] numeric_value_separator = { ';', ',', ' ' };
readonly TextWriter output;
readonly Report report;
@@ -470,7 +470,7 @@ namespace Mono.CSharp {
return;
}
- string[] files = null;
+ string[] files;
try {
files = Directory.GetFiles (path, pattern);
} catch (System.IO.DirectoryNotFoundException) {
@@ -577,7 +577,7 @@ namespace Mono.CSharp {
public bool ProcessWarningsList (string text, Action<int> action)
{
bool valid = true;
- foreach (string wid in text.Split (numeric_value_separator)) {
+ foreach (string wid in text.Split (numeric_value_separator, StringSplitOptions.RemoveEmptyEntries)) {
int id;
if (!int.TryParse (wid, NumberStyles.AllowLeadingWhite, CultureInfo.InvariantCulture, out id)) {
report.Error (1904, "`{0}' is not a valid warning number", wid);
@@ -976,7 +976,7 @@ namespace Mono.CSharp {
settings.WarningsAreErrors = true;
parser_settings.WarningsAreErrors = true;
} else {
- if (!ProcessWarningsList (value, v => settings.AddWarningAsError (v)))
+ if (!ProcessWarningsList (value, settings.AddWarningAsError))
return ParseResult.Error;
}
return ParseResult.Success;
@@ -985,7 +985,7 @@ namespace Mono.CSharp {
if (value.Length == 0) {
settings.WarningsAreErrors = false;
} else {
- if (!ProcessWarningsList (value, v => settings.AddWarningOnly (v)))
+ if (!ProcessWarningsList (value, settings.AddWarningOnly))
return ParseResult.Error;
}
return ParseResult.Success;
@@ -1006,7 +1006,7 @@ namespace Mono.CSharp {
return ParseResult.Error;
}
- if (!ProcessWarningsList (value, v => settings.SetIgnoreWarning (v)))
+ if (!ProcessWarningsList (value, settings.SetIgnoreWarning))
return ParseResult.Error;
return ParseResult.Success;
diff --git a/mcs/mcs/statement.cs b/mcs/mcs/statement.cs
index 4bd207aa00f..b9bb8302eac 100644
--- a/mcs/mcs/statement.cs
+++ b/mcs/mcs/statement.cs
@@ -28,7 +28,7 @@ namespace Mono.CSharp {
/// <summary>
/// Resolves the statement, true means that all sub-statements
/// did resolve ok.
- // </summary>
+ /// </summary>
public virtual bool Resolve (BlockContext bc)
{
return true;
@@ -51,6 +51,10 @@ namespace Mono.CSharp {
bool unreachable = false;
if (warn && !ec.UnreachableReported) {
+
+ // TODO: This is wrong, need to form of flow-analysis branch specific flag
+ // or multiple unrelared unreachable code won't be reported
+ // if (false) { // ok } if (false) { // not reported }
ec.UnreachableReported = true;
unreachable = true;
ec.Report.Warning (162, 2, loc, "Unreachable code detected");
@@ -187,7 +191,6 @@ namespace Mono.CSharp {
//
if (expr is Constant) {
bool take = !((Constant) expr).IsDefaultValue;
-
if (take) {
if (!TrueStatement.Resolve (ec))
return false;
@@ -412,8 +415,9 @@ namespace Mono.CSharp {
return false;
empty = true;
return true;
- } else
- infinite = true;
+ }
+
+ infinite = true;
}
ec.StartFlowBranching (FlowBranching.BranchingType.Loop, loc);
@@ -548,8 +552,9 @@ namespace Mono.CSharp {
return false;
empty = true;
return true;
- } else
- infinite = true;
+ }
+
+ infinite = true;
}
} else
infinite = true;
@@ -702,7 +707,7 @@ namespace Mono.CSharp {
public class StatementErrorExpression : Statement
{
- readonly Expression expr;
+ Expression expr;
public StatementErrorExpression (Expression expr)
{
@@ -729,7 +734,9 @@ namespace Mono.CSharp {
protected override void CloneTo (CloneContext clonectx, Statement target)
{
- throw new NotImplementedException ();
+ var t = (StatementErrorExpression) target;
+
+ t.expr = expr.Clone (clonectx);
}
public override object Accept (StructuralVisitor visitor)
@@ -747,7 +754,7 @@ namespace Mono.CSharp {
public StatementList (Statement first, Statement second)
{
- statements = new List<Statement> () { first, second };
+ statements = new List<Statement> { first, second };
}
#region Properties
@@ -895,7 +902,7 @@ namespace Mono.CSharp {
var async_type = storey.ReturnType;
if (async_type == null && async_block.ReturnTypeInference != null) {
- async_block.ReturnTypeInference.AddCommonTypeBound (expr.Type);
+ async_block.ReturnTypeInference.AddCommonTypeBoundAsync (expr.Type);
return true;
}
@@ -1621,7 +1628,7 @@ namespace Mono.CSharp {
if (eval_global) {
CreateEvaluatorVariable (bc, li);
} else if (type != InternalType.ErrorType) {
- li.PrepareForFlowAnalysis (bc);
+ li.PrepareAssignmentAnalysis (bc);
}
if (initializer != null) {
@@ -1635,7 +1642,7 @@ namespace Mono.CSharp {
if (eval_global) {
CreateEvaluatorVariable (bc, d.Variable);
} else if (type != InternalType.ErrorType) {
- d.Variable.PrepareForFlowAnalysis (bc);
+ d.Variable.PrepareAssignmentAnalysis (bc);
}
if (d.Initializer != null && resolveDeclaratorInitializers) {
@@ -2013,16 +2020,15 @@ namespace Mono.CSharp {
return !ec.DoFlowAnalysis || ec.CurrentBranching.IsAssigned (VariableInfo);
}
- public void PrepareForFlowAnalysis (BlockContext bc)
+ public void PrepareAssignmentAnalysis (BlockContext bc)
{
//
- // No need for definitely assigned check for these guys
+ // No need to run assignment analysis for these guys
//
if ((flags & (Flags.Constant | Flags.ReadonlyMask | Flags.CompilerGenerated)) != 0)
return;
- VariableInfo = new VariableInfo (this, bc.FlowOffset);
- bc.FlowOffset += VariableInfo.Length;
+ VariableInfo = VariableInfo.Create (bc, this);
}
//
@@ -2579,7 +2585,8 @@ namespace Mono.CSharp {
}
if (b.Explicit == b.Explicit.ParametersBlock && b.Explicit.ParametersBlock.StateMachine != null) {
- storey.HoistedThis = b.Explicit.ParametersBlock.StateMachine.HoistedThis;
+ if (storey.HoistedThis == null)
+ storey.HoistedThis = b.Explicit.ParametersBlock.StateMachine.HoistedThis;
if (storey.HoistedThis != null)
break;
@@ -2604,11 +2611,33 @@ namespace Mono.CSharp {
continue;
if (storey.HoistedThis == null) {
- storey.AddCapturedThisField (ec);
+ storey.AddCapturedThisField (ec, null);
}
for (ExplicitBlock b = ref_block; b.AnonymousMethodStorey != storey; b = b.Parent.Explicit) {
+ ParametersBlock pb;
+
if (b.AnonymousMethodStorey != null) {
+ //
+ // Don't add storey cross reference for `this' when the storey ends up not
+ // beeing attached to any parent
+ //
+ if (b.ParametersBlock.StateMachine == null) {
+ AnonymousMethodStorey s = null;
+ for (Block ab = b.AnonymousMethodStorey.OriginalSourceBlock.Parent; ab != null; ab = ab.Parent) {
+ s = ab.Explicit.AnonymousMethodStorey;
+ if (s != null)
+ break;
+ }
+
+ // Needs to be in sync with AnonymousMethodBody::DoCreateMethodHost
+ if (s == null) {
+ var parent = storey == null || storey.Kind == MemberKind.Struct ? null : storey;
+ b.AnonymousMethodStorey.AddCapturedThisField (ec, parent);
+ break;
+ }
+ }
+
b.AnonymousMethodStorey.AddParentStoreyReference (ec, storey);
b.AnonymousMethodStorey.HoistedThis = storey.HoistedThis;
@@ -2621,14 +2650,14 @@ namespace Mono.CSharp {
b = b.ParametersBlock;
}
- var pb = b as ParametersBlock;
+ pb = b as ParametersBlock;
if (pb != null && pb.StateMachine != null) {
if (pb.StateMachine == storey)
break;
//
- // If we are state machine with no parent we can hook into we don't
- // add reference but capture this directly
+ // If we are state machine with no parent. We can hook into parent without additional
+ // reference and capture this directly
//
ExplicitBlock parent_storey_block = pb;
while (parent_storey_block.Parent != null) {
@@ -2639,7 +2668,7 @@ namespace Mono.CSharp {
}
if (parent_storey_block.AnonymousMethodStorey == null) {
- pb.StateMachine.AddCapturedThisField (ec);
+ pb.StateMachine.AddCapturedThisField (ec, null);
b.HasCapturedThis = true;
continue;
}
@@ -2984,7 +3013,7 @@ namespace Mono.CSharp {
public override Expression CreateExpressionTree (ResolveContext ec)
{
if (statements.Count == 1) {
- Expression expr = ((Statement) statements[0]).CreateExpressionTree (ec);
+ Expression expr = statements[0].CreateExpressionTree (ec);
if (scope_initializers != null)
expr = new BlockScopeExpression (expr, this);
@@ -3064,7 +3093,7 @@ namespace Mono.CSharp {
flags |= Flags.IsExpressionTree;
try {
- ResolveMeta (rc);
+ PrepareAssignmentAnalysis (rc);
using (rc.With (ResolveContext.Options.DoFlowAnalysis, true)) {
FlowBranchingToplevel top_level = rc.StartFlowBranching (this, parent);
@@ -3075,7 +3104,7 @@ namespace Mono.CSharp {
unreachable = top_level.End ();
}
} catch (Exception e) {
- if (e is CompletionResult || rc.Report.IsDisabled || e is FatalException)
+ if (e is CompletionResult || rc.Report.IsDisabled || e is FatalException || rc.Report.Printer is NullReportPrinter)
throw;
if (rc.CurrentBlock != null) {
@@ -3120,19 +3149,15 @@ namespace Mono.CSharp {
return true;
}
- void ResolveMeta (BlockContext ec)
+ void PrepareAssignmentAnalysis (BlockContext bc)
{
- int orig_count = parameters.Count;
-
- for (int i = 0; i < orig_count; ++i) {
- Parameter.Modifier mod = parameters.FixedParameters[i].ModFlags;
+ for (int i = 0; i < parameters.Count; ++i) {
+ var par = parameters.FixedParameters[i];
- if ((mod & Parameter.Modifier.OUT) == 0)
+ if ((par.ModFlags & Parameter.Modifier.OUT) == 0)
continue;
- VariableInfo vi = new VariableInfo (parameters, i, ec.FlowOffset);
- parameter_info[i].VariableInfo = vi;
- ec.FlowOffset += vi.Length;
+ parameter_info [i].VariableInfo = VariableInfo.Create (bc, (Parameter) par);
}
}
@@ -3423,8 +3448,23 @@ namespace Mono.CSharp {
int count = parameters.Count;
Arguments args = new Arguments (count);
for (int i = 0; i < count; ++i) {
- var arg_expr = GetParameterReference (i, parameter_info[i].Location);
- args.Add (new Argument (arg_expr));
+ var pi = parameter_info[i];
+ var arg_expr = GetParameterReference (i, pi.Location);
+
+ Argument.AType atype_modifier;
+ switch (pi.Parameter.ParameterModifier & Parameter.Modifier.RefOutMask) {
+ case Parameter.Modifier.REF:
+ atype_modifier = Argument.AType.Ref;
+ break;
+ case Parameter.Modifier.OUT:
+ atype_modifier = Argument.AType.Out;
+ break;
+ default:
+ atype_modifier = 0;
+ break;
+ }
+
+ args.Add (new Argument (arg_expr, atype_modifier));
}
return args;
@@ -3531,7 +3571,7 @@ namespace Mono.CSharp {
this_variable = new LocalVariable (this, "this", LocalVariable.Flags.IsThis | LocalVariable.Flags.Used, StartLocation);
this_variable.Type = bc.CurrentType;
- this_variable.PrepareForFlowAnalysis (bc);
+ this_variable.PrepareAssignmentAnalysis (bc);
}
public bool IsThisAssigned (BlockContext ec)
@@ -3671,7 +3711,7 @@ namespace Mono.CSharp {
return true;
}
- converted = c.ImplicitConversionRequired (rc, rc.Switch.SwitchType, loc);
+ converted = c.ImplicitConversionRequired (rc, rc.Switch.SwitchType);
return converted != null;
}
@@ -4168,9 +4208,13 @@ namespace Mono.CSharp {
var ok = block.Resolve (ec);
if (case_default == null)
- ec.CurrentBranching.CurrentUsageVector.ResetBarrier ();
+ ec.CurrentBranching.CreateSibling (null, FlowBranching.SiblingType.SwitchSection);
+
+ if (ec.IsUnreachable)
+ ec.KillFlowBranching ();
+ else
+ ec.EndFlowBranching ();
- ec.EndFlowBranching ();
ec.Switch = old_switch;
//
@@ -4321,7 +4365,9 @@ namespace Mono.CSharp {
if (!unreachable_reported) {
unreachable_reported = true;
- bc.Report.Warning (162, 2, s.loc, "Unreachable code detected");
+ if (!bc.IsUnreachable) {
+ bc.Report.Warning (162, 2, s.loc, "Unreachable code detected");
+ }
}
block.Statements[i] = new EmptyStatement (s.loc);
@@ -5080,7 +5126,7 @@ namespace Mono.CSharp {
{
LocalVariable pinned_string;
- public StringEmitter (Expression expr, LocalVariable li, Location loc)
+ public StringEmitter (Expression expr, LocalVariable li)
: base (expr, li)
{
}
@@ -5203,7 +5249,7 @@ namespace Mono.CSharp {
// Case 2: string
//
if (initializer.Type.BuiltinType == BuiltinTypeSpec.Type.String) {
- return new StringEmitter (initializer, li, loc).Resolve (bc);
+ return new StringEmitter (initializer, li).Resolve (bc);
}
// Case 3: fixed buffer
@@ -5411,7 +5457,7 @@ namespace Mono.CSharp {
ec.Report.Error (155, loc, "The type caught or thrown must be derived from System.Exception");
} else if (li != null) {
li.Type = type;
- li.PrepareForFlowAnalysis (ec);
+ li.PrepareAssignmentAnalysis (ec);
// source variable is at the top of the stack
Expression source = new EmptyExpression (li.Type);
@@ -5495,7 +5541,7 @@ namespace Mono.CSharp {
{
TryFinally target = (TryFinally) t;
- target.stmt = (Statement) stmt.Clone (clonectx);
+ target.stmt = stmt.Clone (clonectx);
if (fini != null)
target.fini = clonectx.LookupBlock (fini);
}
@@ -6446,14 +6492,20 @@ namespace Mono.CSharp {
protected override void DoEmit (EmitContext ec)
{
- variable.CreateBuilder (ec);
-
Label old_begin = ec.LoopBegin, old_end = ec.LoopEnd;
ec.LoopBegin = ec.DefineLabel ();
ec.LoopEnd = ec.DefineLabel ();
+ if (!(statement is Block))
+ ec.BeginCompilerScope ();
+
+ variable.CreateBuilder (ec);
+
statement.Emit (ec);
+ if (!(statement is Block))
+ ec.EndScope ();
+
ec.LoopBegin = old_begin;
ec.LoopEnd = old_end;
}
diff --git a/mcs/mcs/typemanager.cs b/mcs/mcs/typemanager.cs
index b77dfef531f..870b7be2a75 100644
--- a/mcs/mcs/typemanager.cs
+++ b/mcs/mcs/typemanager.cs
@@ -186,7 +186,9 @@ namespace Mono.CSharp
public readonly PredefinedType IsVolatile;
public readonly PredefinedType IEnumeratorGeneric;
public readonly PredefinedType IListGeneric;
+ public readonly PredefinedType IReadOnlyListGeneric;
public readonly PredefinedType ICollectionGeneric;
+ public readonly PredefinedType IReadOnlyCollectionGeneric;
public readonly PredefinedType IEnumerableGeneric;
public readonly PredefinedType Nullable;
public readonly PredefinedType Activator;
@@ -246,7 +248,9 @@ namespace Mono.CSharp
IsVolatile = new PredefinedType (module, MemberKind.Class, "System.Runtime.CompilerServices", "IsVolatile");
IEnumeratorGeneric = new PredefinedType (module, MemberKind.Interface, "System.Collections.Generic", "IEnumerator", 1);
IListGeneric = new PredefinedType (module, MemberKind.Interface, "System.Collections.Generic", "IList", 1);
+ IReadOnlyListGeneric = new PredefinedType (module, MemberKind.Interface, "System.Collections.Generic", "IReadOnlyList", 1);
ICollectionGeneric = new PredefinedType (module, MemberKind.Interface, "System.Collections.Generic", "ICollection", 1);
+ IReadOnlyCollectionGeneric = new PredefinedType (module, MemberKind.Interface, "System.Collections.Generic", "IReadOnlyCollection", 1);
IEnumerableGeneric = new PredefinedType (module, MemberKind.Interface, "System.Collections.Generic", "IEnumerable", 1);
Nullable = new PredefinedType (module, MemberKind.Struct, "System", "Nullable", 1);
Activator = new PredefinedType (module, MemberKind.Class, "System", "Activator");
@@ -294,13 +298,19 @@ namespace Mono.CSharp
ArgIterator.TypeSpec.IsSpecialRuntimeType = true;
if (IEnumerableGeneric.Define ())
- IEnumerableGeneric.TypeSpec.IsGenericIterateInterface = true;
+ IEnumerableGeneric.TypeSpec.IsArrayGenericInterface = true;
if (IListGeneric.Define ())
- IListGeneric.TypeSpec.IsGenericIterateInterface = true;
+ IListGeneric.TypeSpec.IsArrayGenericInterface = true;
+
+ if (IReadOnlyListGeneric.Define ())
+ IReadOnlyListGeneric.TypeSpec.IsArrayGenericInterface = true;
if (ICollectionGeneric.Define ())
- ICollectionGeneric.TypeSpec.IsGenericIterateInterface = true;
+ ICollectionGeneric.TypeSpec.IsArrayGenericInterface = true;
+
+ if (IReadOnlyCollectionGeneric.Define ())
+ IReadOnlyCollectionGeneric.TypeSpec.IsArrayGenericInterface = true;
if (Nullable.Define ())
Nullable.TypeSpec.IsNullableType = true;
diff --git a/mcs/mcs/typespec.cs b/mcs/mcs/typespec.cs
index f9e623971a7..10874fecc65 100644
--- a/mcs/mcs/typespec.cs
+++ b/mcs/mcs/typespec.cs
@@ -211,7 +211,7 @@ namespace Mono.CSharp
//
// Returns true for instances of IList<T>, IEnumerable<T>, ICollection<T>
//
- public virtual bool IsGenericIterateInterface {
+ public virtual bool IsArrayGenericInterface {
get {
return false;
}
@@ -321,6 +321,9 @@ namespace Mono.CSharp
if (Kind == MemberKind.Void)
return true;
+ if (Kind == MemberKind.TypeParameter)
+ return false;
+
if (IsNested && DeclaringType.IsGenericOrParentIsGeneric)
return false;
@@ -375,7 +378,7 @@ namespace Mono.CSharp
throw new InternalErrorException ("Modifying expanded interface list");
if (ifaces == null) {
- ifaces = new List<TypeSpec> () { iface };
+ ifaces = new List<TypeSpec> { iface };
return true;
}
@@ -738,22 +741,22 @@ namespace Mono.CSharp
return this;
}
- public override List<TypeSpec> ResolveMissingDependencies ()
+ public override List<MissingTypeSpecReference> ResolveMissingDependencies (MemberSpec caller)
{
- List<TypeSpec> missing = null;
+ List<MissingTypeSpecReference> missing = null;
if (Kind == MemberKind.MissingType) {
- missing = new List<TypeSpec> ();
- missing.Add (this);
+ missing = new List<MissingTypeSpecReference> ();
+ missing.Add (new MissingTypeSpecReference (this, caller));
return missing;
}
foreach (var targ in TypeArguments) {
if (targ.Kind == MemberKind.MissingType) {
if (missing == null)
- missing = new List<TypeSpec> ();
+ missing = new List<MissingTypeSpecReference> ();
- missing.Add (targ);
+ missing.Add (new MissingTypeSpecReference (targ, caller));
}
}
@@ -761,19 +764,19 @@ namespace Mono.CSharp
foreach (var iface in Interfaces) {
if (iface.Kind == MemberKind.MissingType) {
if (missing == null)
- missing = new List<TypeSpec> ();
+ missing = new List<MissingTypeSpecReference> ();
- missing.Add (iface);
+ missing.Add (new MissingTypeSpecReference (iface, caller));
}
}
}
if (MemberDefinition.TypeParametersCount > 0) {
foreach (var tp in MemberDefinition.TypeParameters) {
- var tp_missing = tp.GetMissingDependencies ();
+ var tp_missing = tp.GetMissingDependencies (this);
if (tp_missing != null) {
if (missing == null)
- missing = new List<TypeSpec> ();
+ missing = new List<MissingTypeSpecReference> ();
missing.AddRange (tp_missing);
}
@@ -783,7 +786,7 @@ namespace Mono.CSharp
if (missing != null || BaseType == null)
return missing;
- return BaseType.ResolveMissingDependencies ();
+ return BaseType.ResolveMissingDependencies (this);
}
public void SetMetaInfo (MetaType info)
@@ -798,6 +801,31 @@ namespace Mono.CSharp
{
modifiers |= Modifiers.METHOD_EXTENSION;
}
+
+ public void UpdateInflatedInstancesBaseType ()
+ {
+ //
+ // When nested class has a partial part the situation where parent type
+ // is inflated before its base type is defined can occur. In such case
+ // all inflated (should be only 1) instansted need to be updated
+ //
+ // partial class A<T> {
+ // partial class B : A<int> { }
+ // }
+ //
+ // partial class A<T> : X {}
+ //
+ if (inflated_instances == null)
+ return;
+
+ foreach (var inflated in inflated_instances) {
+ //
+ // Don't need to inflate possible generic type because for now the method
+ // is always used from within the nested type
+ //
+ inflated.Value.BaseType = base_type;
+ }
+ }
}
//
@@ -1950,4 +1978,16 @@ namespace Mono.CSharp
return pc;
}
}
+
+ public class MissingTypeSpecReference
+ {
+ public MissingTypeSpecReference (TypeSpec type, MemberSpec caller)
+ {
+ Type = type;
+ Caller = caller;
+ }
+
+ public TypeSpec Type { get; private set; }
+ public MemberSpec Caller { get; private set; }
+ }
}
diff --git a/mcs/tests/dtest-error-02.cs b/mcs/tests/dtest-error-02.cs
index b8b4eb0dcd4..58578fe3b50 100644
--- a/mcs/tests/dtest-error-02.cs
+++ b/mcs/tests/dtest-error-02.cs
@@ -8,6 +8,14 @@ class A
public void Foo ()
{
}
+
+ public int Property { get; set; }
+
+ string this [int index] {
+ get {
+ return "x";
+ }
+ }
}
public static dynamic Factory ()
@@ -30,6 +38,22 @@ public class Test
return 2;
}
+ try {
+ var x = d.Property;
+ return 3;
+ } catch (RuntimeBinderException e) {
+ if (e.Message != "`A.N.Property.get' is inaccessible due to its protection level")
+ return 4;
+ }
+
+ try {
+ var x = d [4];
+ return 5;
+ } catch (RuntimeBinderException e) {
+ if (e.Message != "`A.N.this[int]' is inaccessible due to its protection level")
+ return 6;
+ }
+
return 0;
}
}
diff --git a/mcs/tests/gtest-540.cs b/mcs/tests/gtest-540.cs
index 8c9c43a1602..7596032d16f 100644
--- a/mcs/tests/gtest-540.cs
+++ b/mcs/tests/gtest-540.cs
@@ -88,4 +88,13 @@ class C
return 0;
}
+
+ // This does not look right but C# spec needs tidying up to special case it
+ void BrokenLiftedNull ()
+ {
+ int i = 44;
+ int? u = null;
+ i <<= u;
+ i <<= null;
+ }
} \ No newline at end of file
diff --git a/mcs/tests/gtest-544.cs b/mcs/tests/gtest-544.cs
index 98c2c85c01b..98dd222721d 100644
--- a/mcs/tests/gtest-544.cs
+++ b/mcs/tests/gtest-544.cs
@@ -35,6 +35,18 @@ class B2 : A2<System.ValueType>
}
}
+abstract class A3<T>
+{
+ public abstract void Foo<U> () where U : class, T;
+}
+
+class B3 : A3<System.Object>
+{
+ public override void Foo<Y> ()
+ {
+ }
+}
+
class Program
{
public static int Main ()
@@ -48,6 +60,9 @@ class Program
var b2 = new B2 ();
b2.Foo<byte> ();
+ var b3 = new B3 ();
+ b3.Foo<string> ();
+
return 1;
}
}
diff --git a/mcs/tests/gtest-579.cs b/mcs/tests/gtest-579.cs
index 9def4cd52c8..615312c36b2 100644
--- a/mcs/tests/gtest-579.cs
+++ b/mcs/tests/gtest-579.cs
@@ -9,12 +9,23 @@ public class G<U, V> : IA<G<V, string>>
public class C
{
+ static bool Test_2 <T2>(T2[] t)
+ {
+ return t is byte[];
+ }
+
public static int Main ()
{
G<long, short> p = new G<long, short> ();
if (p is IA<G<string, string>>)
return 1;
+ if (Test_2 (new int [0]))
+ return 2;
+
+ if (!Test_2 (new byte [0]))
+ return 3;
+
return 0;
}
} \ No newline at end of file
diff --git a/mcs/tests/gtest-589.cs b/mcs/tests/gtest-589.cs
new file mode 100644
index 00000000000..4599fe2fbd6
--- /dev/null
+++ b/mcs/tests/gtest-589.cs
@@ -0,0 +1,40 @@
+using System;
+
+public class Z : IGenericInterface<Z>
+{
+ public Z Start ()
+ {
+ return this;
+ }
+
+ Z IGenericInterface<Z>.Start ()
+ {
+ throw new ApplicationException ();
+ }
+}
+
+public interface IGenericInterface<T>
+{
+ T Start ();
+}
+
+public class A<T> where T : Z, IGenericInterface<int>
+{
+ public void SomeOperation (T t)
+ {
+ t.Start ();
+ }
+}
+
+public class C : Z, IGenericInterface<int>
+{
+ int IGenericInterface<int>.Start ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static void Main ()
+ {
+ new A<C> ().SomeOperation (new C ());
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-590.cs b/mcs/tests/gtest-590.cs
new file mode 100644
index 00000000000..96c276a5812
--- /dev/null
+++ b/mcs/tests/gtest-590.cs
@@ -0,0 +1,21 @@
+using System;
+
+enum E
+{
+ V
+}
+
+class C
+{
+ public static void Main ()
+ {
+ byte? foo = 0;
+ E e = 0;
+ var res = foo - e;
+ Console.WriteLine (res);
+ var res2 = e - foo;
+ Console.WriteLine (res2);
+ res = null;
+ res2 = null;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-591-lib.cs b/mcs/tests/gtest-591-lib.cs
new file mode 100644
index 00000000000..6f43ae797a0
--- /dev/null
+++ b/mcs/tests/gtest-591-lib.cs
@@ -0,0 +1,14 @@
+// Compiler options: -target:library
+
+using System;
+
+namespace A
+{
+ public class B<T>
+ {
+ public abstract class C : System.IEquatable<C>
+ {
+ public abstract bool Equals (C other);
+ }
+ }
+}
diff --git a/mcs/tests/gtest-591.cs b/mcs/tests/gtest-591.cs
new file mode 100644
index 00000000000..fd0bae013d3
--- /dev/null
+++ b/mcs/tests/gtest-591.cs
@@ -0,0 +1,13 @@
+// Compiler options: -r:gtest-591-lib.dll
+
+using System;
+
+public class E
+{
+ public System.Collections.Generic.Dictionary<int, A.B<int>.C> F;
+ public static void Main ()
+ {
+ var e = new E ();
+ Console.WriteLine (e.F);
+ }
+}
diff --git a/mcs/tests/gtest-592.cs b/mcs/tests/gtest-592.cs
new file mode 100644
index 00000000000..f32700cadbc
--- /dev/null
+++ b/mcs/tests/gtest-592.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+public class Tests
+{
+ static void A<T>(IReadOnlyCollection<T> otherList)
+ {
+ }
+
+ static void B<T>(IReadOnlyList<T> otherList)
+ {
+ }
+
+ public static void Main ()
+ {
+ var ifacers = typeof(int[]).GetInterfaces ();
+
+ var args = new string [0];
+ A (args);
+ B (args);
+
+ IReadOnlyList<int> e1 = new int[0];
+ IReadOnlyCollection<int> e2 = new int[0];
+ }
+}
diff --git a/mcs/tests/gtest-593.cs b/mcs/tests/gtest-593.cs
new file mode 100644
index 00000000000..a5e53f26c36
--- /dev/null
+++ b/mcs/tests/gtest-593.cs
@@ -0,0 +1,25 @@
+using System;
+
+public delegate Tuple<D1, DR1> Parser<D1, DR1> (D1 stream);
+
+static class Combinator
+{
+ public static Parser<L1, LR1> Lazy<L1, LR1> (Func<Parser<L1, LR1>> func)
+ {
+ return null;
+ }
+
+ public static Parser<C1, CR1> Choice<C1, CR1> (Parser<C1, CR1> parsers)
+ {
+ Parser<C1, CR1> tail = null;
+
+ Lazy (() => Choice (tail));
+
+ return null;
+ }
+
+ public static void Main ()
+ {
+ Choice ((int l) => Tuple.Create (1, 2));
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-594.cs b/mcs/tests/gtest-594.cs
new file mode 100644
index 00000000000..0c09ef892e5
--- /dev/null
+++ b/mcs/tests/gtest-594.cs
@@ -0,0 +1,29 @@
+using System;
+
+public interface IFoo<U>
+{
+ void Foo<T> () where T : C;
+}
+
+public class C : IA
+{
+}
+
+public interface IA
+{
+}
+
+class Y : IFoo<int>
+{
+ public void Foo<T> () where T : C
+ {
+ }
+}
+
+class X
+{
+ public static void Main()
+ {
+ new Y ();
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-595.cs b/mcs/tests/gtest-595.cs
new file mode 100644
index 00000000000..65249a527c9
--- /dev/null
+++ b/mcs/tests/gtest-595.cs
@@ -0,0 +1,37 @@
+class MainClass
+{
+ static class TypeConverter<TIn, TOut>
+ where TIn : class
+ where TOut : struct
+ {
+ public static bool Convert(TIn input)
+ {
+ if (input is TOut)
+ {
+ return true;
+ }
+
+ return false;
+ }
+ }
+
+ public static int Main()
+ {
+ object x = 3;
+ if (TypeConverter<object, double>.Convert(x))
+ return 1;
+
+ if (!TypeConverter<I, S>.Convert(new S()))
+ return 2;
+
+ return 0;
+ }
+}
+
+interface I
+{
+}
+
+struct S : I
+{
+}
diff --git a/mcs/tests/gtest-596.cs b/mcs/tests/gtest-596.cs
new file mode 100644
index 00000000000..6a2465b3ff4
--- /dev/null
+++ b/mcs/tests/gtest-596.cs
@@ -0,0 +1,27 @@
+using System;
+
+class X
+{
+ public Artist Artist { get; set; }
+
+ public static void Main ()
+ {
+ Test<string, Artist> (Artist.FromToken);
+ }
+
+ static void Test<T1, T2> (Func<T1, T2> arg)
+ {
+ }
+
+ static void Test<T1, T2> (Func<T1, int, T2> arg)
+ {
+ }
+}
+
+public class Artist
+{
+ public static Artist FromToken (string token)
+ {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-597.cs b/mcs/tests/gtest-597.cs
new file mode 100644
index 00000000000..cbf9e7345e2
--- /dev/null
+++ b/mcs/tests/gtest-597.cs
@@ -0,0 +1,44 @@
+using System;
+
+namespace Test
+{
+ class MainClass
+ {
+ public static int Main ()
+ {
+ if (!Test_1 (new Derived ()))
+ return 1;
+
+ if (!Test_2 (new S ()))
+ return 2;
+
+ return 0;
+ }
+
+ static bool Test_1<T> (Templated<T> template)
+ {
+ return template is Derived;
+ }
+
+ static bool Test_2<U> (IA<U> arg)
+ {
+ return arg is S;
+ }
+ }
+
+ public abstract class Templated<T>
+ {
+ }
+
+ public class Derived : Templated<Derived>
+ {
+ }
+
+ public interface IA<T>
+ {
+ }
+
+ public struct S : IA<S>
+ {
+ }
+}
diff --git a/mcs/tests/gtest-598.cs b/mcs/tests/gtest-598.cs
new file mode 100644
index 00000000000..27bad700e52
--- /dev/null
+++ b/mcs/tests/gtest-598.cs
@@ -0,0 +1,63 @@
+using System;
+
+public class A
+{
+ public virtual T Test<T> (T t)
+ {
+ throw new ApplicationException ();
+ }
+}
+
+public class B : A
+{
+ public override T Test<T> (T t)
+ {
+ Console.WriteLine ("Base");
+ return default (T);
+ }
+}
+
+public class C : B
+{
+ public override T Test<T> (T t)
+ {
+ base.Test ("a");
+ return default (T);
+ }
+}
+
+
+public class AG<U>
+{
+ public virtual T Test<T> (T t, U u)
+ {
+ throw new ApplicationException ();
+ }
+}
+
+public class B<UB> : AG<UB>
+{
+ public override T Test<T> (T t, UB u)
+ {
+ Console.WriteLine ("Base");
+ return default (T);
+ }
+}
+
+public class C<UC> : B<UC>
+{
+ public override T Test<T> (T t, UC u)
+ {
+ base.Test ("a", default (UC));
+ return default (T);
+ }
+}
+
+class X
+{
+ public static void Main ()
+ {
+ new C ().Test<int> (1);
+ new C<int> ().Test (5, 3);
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-599.cs b/mcs/tests/gtest-599.cs
new file mode 100644
index 00000000000..a25e7b6e669
--- /dev/null
+++ b/mcs/tests/gtest-599.cs
@@ -0,0 +1,32 @@
+using System;
+
+public abstract class A<X>
+{
+ public abstract T Test<T> (T t, X x);
+}
+
+public class B : A<char>
+{
+ public override T Test<T> (T t, char x)
+ {
+ Console.WriteLine ("B");
+ return default (T);
+ }
+}
+
+public class C : B
+{
+ public override T Test<T> (T t, char c)
+ {
+ base.Test ("a", 'a');
+ return default (T);
+ }
+}
+
+class X
+{
+ public static void Main ()
+ {
+ new C ().Test<int> (1, '1');
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-autoproperty-08.cs b/mcs/tests/gtest-autoproperty-08.cs
new file mode 100644
index 00000000000..3aeeb7a3527
--- /dev/null
+++ b/mcs/tests/gtest-autoproperty-08.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Reflection;
+
+class AAttribute : Attribute
+{
+}
+
+class Program
+{
+ [field: A]
+ public int Prop { get; set; }
+
+ public static int Main ()
+ {
+ var f = typeof (Program).GetFields (BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly);
+ if (f[0].GetCustomAttribute<AAttribute> () == null)
+ return 1;
+
+ return 0;
+ }
+}
+
diff --git a/mcs/tests/gtest-etree-01.cs b/mcs/tests/gtest-etree-01.cs
index c511e858061..248d1452d2b 100644
--- a/mcs/tests/gtest-etree-01.cs
+++ b/mcs/tests/gtest-etree-01.cs
@@ -2600,7 +2600,6 @@ class Tester
Assert (1, e9.Compile ().Invoke (MyEnum.Value_2, MyEnum.Value_1));
}
- // CSC bug
void SubtractTest_10 ()
{
Expression<Func<MyEnum?, byte?, MyEnum?>> e10 = (a, b) => a - b;
diff --git a/mcs/tests/gtest-exmethod-47.cs b/mcs/tests/gtest-exmethod-47.cs
new file mode 100644
index 00000000000..07cc2b3a007
--- /dev/null
+++ b/mcs/tests/gtest-exmethod-47.cs
@@ -0,0 +1,22 @@
+delegate void D ();
+
+public class C
+{
+ static void Main ()
+ {
+ S s = new S ();
+ D d = s.Foo;
+ }
+}
+
+public class S
+{
+ public void Foo (int i)
+ {
+ }
+}
+
+public static class Extension
+{
+ public static void Foo (this S s) { }
+}
diff --git a/mcs/tests/gtest-iter-30.cs b/mcs/tests/gtest-iter-30.cs
new file mode 100644
index 00000000000..192c82be79d
--- /dev/null
+++ b/mcs/tests/gtest-iter-30.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+
+public class Program
+{
+ public static void Main ()
+ {
+ foreach (var x in new M ().Test ()) {
+ Console.WriteLine (x);
+ }
+ }
+}
+
+class M
+{
+ public IEnumerable<int> Test ()
+ {
+ Action a = delegate {
+ int k = 0;
+ Action x = delegate {
+ Console.WriteLine (this);
+ Console.WriteLine (k);
+ };
+
+ x ();
+ Console.WriteLine (this);
+ };
+
+ a ();
+
+ yield return 1;
+ }
+}
diff --git a/mcs/tests/gtest-iter-31.cs b/mcs/tests/gtest-iter-31.cs
new file mode 100644
index 00000000000..5bd2ea079a9
--- /dev/null
+++ b/mcs/tests/gtest-iter-31.cs
@@ -0,0 +1,31 @@
+using System.Collections.Generic;
+using System.Linq;
+
+class B
+{
+ public object Foo (object obj)
+ {
+ return null;
+ }
+}
+
+class C
+{
+ B ctx = new B ();
+
+ public static void Main ()
+ {
+ foreach (var c in new C ().Test ()) {
+ }
+ }
+
+ IEnumerable<ushort> Test ()
+ {
+ string[] s = new[] { "a", "b", "c" };
+
+ var m = s.Select (l => ctx.Foo (l)).ToArray ();
+
+ yield break;
+ }
+}
+
diff --git a/mcs/tests/gtest-381.cs b/mcs/tests/gtest-iter-32.cs
index 04e80fe7439..04e80fe7439 100644
--- a/mcs/tests/gtest-381.cs
+++ b/mcs/tests/gtest-iter-32.cs
diff --git a/mcs/tests/gtest-217.cs b/mcs/tests/gtest-iter-33.cs
index bc865396679..bc865396679 100644
--- a/mcs/tests/gtest-217.cs
+++ b/mcs/tests/gtest-iter-33.cs
diff --git a/mcs/tests/gtest-optional-28.cs b/mcs/tests/gtest-optional-28.cs
new file mode 100644
index 00000000000..d8eaaa31736
--- /dev/null
+++ b/mcs/tests/gtest-optional-28.cs
@@ -0,0 +1,31 @@
+using System;
+
+public class NoTypeOptionalParameters
+{
+ public static void Lambda (bool asc = true, params Func<string,bool>[] where)
+ {
+ }
+
+ public static void MethodGroup (bool asc = true, params Func<string,bool>[] where)
+ {
+ }
+
+ static bool Foo (string arg)
+ {
+ return false;
+ }
+
+ bool FooInstance (string arg)
+ {
+ return false;
+ }
+
+ public static int Main ()
+ {
+ bool i = false;
+ Lambda (where: x => true, asc: i);
+ MethodGroup (where: Foo, asc: i);
+ MethodGroup (where: new NoTypeOptionalParameters ().FooInstance, asc: false);
+ return 0;
+ }
+}
diff --git a/mcs/tests/gtest-partial-07.cs b/mcs/tests/gtest-partial-07.cs
new file mode 100644
index 00000000000..d3b031962f1
--- /dev/null
+++ b/mcs/tests/gtest-partial-07.cs
@@ -0,0 +1,30 @@
+partial class A<T>
+{
+ internal partial class B : A<int>
+ {
+ public void Test ()
+ {
+ Foo (3);
+ }
+ }
+}
+
+partial class A<T> : X<T>
+{
+
+}
+
+class X<U>
+{
+ public void Foo (U arg)
+ {
+ }
+}
+
+class M
+{
+ public static void Main ()
+ {
+ new A<string>.B ().Test ();
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-partial-08.cs b/mcs/tests/gtest-partial-08.cs
new file mode 100644
index 00000000000..fcc96bed6e2
--- /dev/null
+++ b/mcs/tests/gtest-partial-08.cs
@@ -0,0 +1,58 @@
+namespace N
+{
+ public partial class A<T1, T2>
+ {
+ public partial class D
+ {
+ public class C : D
+ {
+ public void Test ()
+ {
+ Foo ();
+ }
+ }
+ }
+
+ public partial class D2<U>
+ {
+ public class C2 : D2<int>
+ {
+ public void Test ()
+ {
+ Foo (2);
+ }
+ }
+ }
+ }
+
+ public partial class A<T1, T2>
+ {
+ public partial class D : X
+ {
+ }
+
+ public partial class D2<U> : X2<U>
+ {
+ }
+ }
+
+ public class X2<W>
+ {
+ public void Foo (W arg)
+ {
+ }
+ }
+
+ public class X
+ {
+ public void Foo ()
+ {
+ }
+
+ public static void Main ()
+ {
+ new A<int, long>.D.C ().Test ();
+ new A<int, long>.D2<string>.C2 ().Test ();
+ }
+ }
+}
diff --git a/mcs/tests/gtest-partial-09.cs b/mcs/tests/gtest-partial-09.cs
new file mode 100644
index 00000000000..2dbb116efa2
--- /dev/null
+++ b/mcs/tests/gtest-partial-09.cs
@@ -0,0 +1,57 @@
+namespace A
+{
+ public partial class B<T>
+ {
+ public partial class C
+ {
+ public class A { }
+ }
+ }
+}
+
+namespace A
+{
+ public abstract partial class B<T> where T : B<T>.C
+ {
+ }
+}
+
+namespace A
+{
+ public partial class B<T>
+ {
+ public partial class C : I
+ {
+ }
+ }
+}
+
+namespace A
+{
+ public interface Ibase
+ {
+ }
+
+ public partial class B<T>
+ {
+ public interface I : Ibase
+ {
+ }
+ }
+}
+
+namespace A
+{
+ class Bar : B<Bar>.C
+ {
+ }
+
+ public class Test
+ {
+ public static void Main ()
+ {
+ Ibase b = new Bar ();
+ System.Console.WriteLine (b != null);
+ }
+ }
+}
diff --git a/mcs/tests/gtest-variance-11.cs b/mcs/tests/gtest-variance-11.cs
index 35c2b774488..110044f0a5d 100644
--- a/mcs/tests/gtest-variance-11.cs
+++ b/mcs/tests/gtest-variance-11.cs
@@ -22,8 +22,27 @@ class D
return typeof (T) == typeof (object);
}
+ public static bool CovContCont<T> (ICovariant<T> e1, IContravariant<T> e2, IContravariant<T> e3)
+ {
+ Console.WriteLine (typeof (T));
+ return typeof (T) == typeof (string);
+ }
+
+ public static bool ContCovContCov<T> (IContravariant<T> e1, ICovariant<T> e2, IContravariant<T> e3, ICovariant<T> e4)
+ {
+ Console.WriteLine (typeof (T));
+ return typeof (T) == typeof (string);
+ }
+
+ public static bool CovCovCont<T> (ICovariant<T> e1, ICovariant<T> e2, IContravariant<T> e3)
+ {
+ Console.WriteLine (typeof (T));
+ return typeof (T) == typeof (string);
+ }
+
public static int Main ()
{
+
ICovariant<object> a = null;
ICovariant<string> b = null;
if (!Covariant (a, b))
@@ -34,6 +53,20 @@ class D
if (!Contra (a_1, b_1))
return 2;
+ ICovariant<string> a_2 = null;
+ IContravariant<object> b_2 = null;
+ IContravariant<string> c_2 = null;
+ if (!CovContCont (a_2, b_2, c_2))
+ return 3;
+
+ IContravariant<object> a_3 = null;
+ ICovariant<string> b_3 = null;
+ IContravariant<string> c_3 = null;
+ ICovariant<string> d_3 = null;
+ if (!ContCovContCov (a_3, b_3, c_3, d_3))
+ return 4;
+
+ Console.WriteLine ("ok");
return 0;
}
}
diff --git a/mcs/tests/test-504.cs b/mcs/tests/test-504.cs
index 87c28794793..c1d1f3210e1 100644
--- a/mcs/tests/test-504.cs
+++ b/mcs/tests/test-504.cs
@@ -1,7 +1,7 @@
-// Compiler options: -warnaserror
-
// This ensures that any "unreachable code" warning will error out
-// rather than generate invalid IL
+// rather than generate invalid IL or crash compiler
+
+using System;
class Foo
{
@@ -20,4 +20,25 @@ class Foo
return 1;
}
+
+ public static string Test_2 ()
+ {
+ throw new Exception ();
+
+ var account = "yo";
+ if (account == null) {
+ }
+
+ var s = "yo";
+
+ switch (8) {
+ case 1:
+ case 2:
+ break;
+ default:
+ throw new NotSupportedException ();
+ }
+
+ return s;
+ }
}
diff --git a/mcs/tests/test-591.cs b/mcs/tests/test-591.cs
index 51508f72993..22f10ac7d20 100644
--- a/mcs/tests/test-591.cs
+++ b/mcs/tests/test-591.cs
@@ -15,10 +15,12 @@ class C1
class C2
{
+ const object o2 = c2;
+ const string c2 = null;
+
public static void Main ()
{
- // BUG compatibility for now
- //const object o = null;
- //const string s = (string) o;
+ const object o = null;
+ const string s = (string) o;
}
}
diff --git a/mcs/tests/test-869.cs b/mcs/tests/test-869.cs
new file mode 100644
index 00000000000..a0b22419ddc
--- /dev/null
+++ b/mcs/tests/test-869.cs
@@ -0,0 +1,49 @@
+using System;
+
+public class C
+{
+ public static readonly C Token = new C ();
+
+ public static C operator & (C set, E value)
+ {
+ return Token;
+ }
+
+ public static implicit operator E (C c)
+ {
+ throw new ApplicationException ();
+ }
+}
+
+public enum E
+{
+ Item = 2
+}
+
+enum E2
+{
+ A = 0,
+ B,
+ C
+}
+
+class FooClass
+{
+ public static int Main ()
+ {
+ C m = new C ();
+ var x = E.Item;
+ var res = m & x;
+ if (res != C.Token)
+ return 1;
+
+ res = m & E.Item;
+ if (res != C.Token)
+ return 2;
+
+ E2 e2 = E2.C;
+
+ int day1 = e2 - E2.A;
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-870.cs b/mcs/tests/test-870.cs
new file mode 100644
index 00000000000..5faceb7b35a
--- /dev/null
+++ b/mcs/tests/test-870.cs
@@ -0,0 +1,17 @@
+public class Test
+{
+ static void Foo (ushort p)
+ {
+ p = 0x0000;
+ p |= 0x0000;
+ p &= 0x0000;
+
+ const ushort c = 0x0000;
+ p &= c;
+ }
+
+ public static void Main ()
+ {
+ Foo (1);
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-871.cs b/mcs/tests/test-871.cs
new file mode 100644
index 00000000000..19ebf8a05f6
--- /dev/null
+++ b/mcs/tests/test-871.cs
@@ -0,0 +1,42 @@
+using System;
+
+class D
+{
+ int arg;
+
+ public D (int arg)
+ {
+ this.arg = arg;
+ }
+
+ public static D operator & (D x, D y)
+ {
+ return new D (100);
+ }
+
+ public static bool operator false (D d)
+ {
+ return false;
+ }
+
+ public static bool operator true (D d)
+ {
+ return true;
+ }
+
+ public static implicit operator D(bool b)
+ {
+ return new D (5);
+ }
+
+ static int Main ()
+ {
+ D d = false && new D (1);
+ Console.WriteLine (d.arg);
+ if (d.arg != 100)
+ return 1;
+
+ Console.WriteLine ("ok");
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-873.cs b/mcs/tests/test-873.cs
new file mode 100644
index 00000000000..abe3b3b4ffa
--- /dev/null
+++ b/mcs/tests/test-873.cs
@@ -0,0 +1,28 @@
+using System;
+
+class Program
+{
+ static int Main ()
+ {
+ int foo = 9;
+
+ switch (foo) {
+ case 1:
+ gotoTarget:
+ {
+ return 0;
+ }
+ default:
+ {
+ if (foo != 0) {
+ goto gotoTarget;
+ }
+
+ break;
+ }
+ }
+
+ return 1;
+ }
+}
+
diff --git a/mcs/tests/test-anon-94.cs b/mcs/tests/test-anon-94.cs
index 4406ee895b2..062f335c837 100644
--- a/mcs/tests/test-anon-94.cs
+++ b/mcs/tests/test-anon-94.cs
@@ -8,6 +8,7 @@ class Program
{
public int i;
public virtual void Print () { Console.WriteLine ("BaseClass.Print"); i = 90; }
+ public virtual void TestOut (out int arg) { arg = 4; }
}
public class Derived : BaseClass
@@ -17,6 +18,18 @@ class Program
Action a = () => base.Print ();
a ();
}
+
+ public override void TestOut (out int arg)
+ {
+ int p = 9;
+ Action a = () => {
+ base.TestOut (out p);
+ Console.WriteLine (p);
+ };
+
+ a ();
+ arg = p;
+ }
}
public class DerivedLibrary : BaseClassLibrary
@@ -35,12 +48,17 @@ class Program
if (d.i != 90)
return 1;
+
+ int arg;
+ d.TestOut (out arg);
+ if (arg != 4)
+ return 2;
var d2 = new DerivedLibrary ();
d2.Print (0);
if (d2.i != 30)
- return 2;
+ return 3;
return 0;
}
diff --git a/mcs/tests/test-async-13.cs b/mcs/tests/test-async-13.cs
index 54aabc3f37b..ea7fd528df1 100644
--- a/mcs/tests/test-async-13.cs
+++ b/mcs/tests/test-async-13.cs
@@ -353,6 +353,15 @@ class Tester : Base
return 0;
}
+ async Task<bool> BinaryTest_6 ()
+ {
+ var t = Task.Delay (1);
+ if (t == await Task.WhenAny(new [] { t }))
+ return true;
+
+ return false;
+ }
+
async Task<int> CallTest_1 ()
{
return Call (
diff --git a/mcs/tests/test-async-22.cs b/mcs/tests/test-async-22.cs
index e2a361403c7..3e0350012b9 100644
--- a/mcs/tests/test-async-22.cs
+++ b/mcs/tests/test-async-22.cs
@@ -2,8 +2,7 @@ using System;
using System.Threading.Tasks;
// contextual async, parser tests
-
-class A
+class A : Iasync
{
async Task<int> async ()
{
@@ -21,6 +20,10 @@ class A
var res = (int) await async ();
var res2 = (Int32) await async ();
}
+
+ async void Iasync.async ()
+ {
+ }
public static int Main ()
{
@@ -28,6 +31,11 @@ class A
}
}
+interface Iasync
+{
+ void async ();
+}
+
class B
{
class async
diff --git a/mcs/tests/test-async-49.cs b/mcs/tests/test-async-49.cs
new file mode 100644
index 00000000000..e76faf8a832
--- /dev/null
+++ b/mcs/tests/test-async-49.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+class TodoItem
+{
+}
+
+internal class MobileServiceTable2<T>
+{
+ public Task<List<T>> ToListAsync ()
+ {
+ var r = new List<T> ();
+ r.Add (default (T));
+ return Task.FromResult<List<T>> (r);
+ }
+}
+
+public class Tests
+{
+ int foo (Action t)
+ {
+ t ();
+ return 0;
+ }
+
+ private void OnTap (TodoItem task)
+ {
+ }
+
+ private async Task RefreshAsync ()
+ {
+ var ta = new MobileServiceTable2<TodoItem> ();
+ var r = await ta.ToListAsync ();
+
+ r.Select<TodoItem, int> (t => foo (() => OnTap (t))).ToList ();
+ }
+
+ public static void Main (String[] args)
+ {
+ var t = new Tests ();
+ t.RefreshAsync ().Wait ();
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-async-50.cs b/mcs/tests/test-async-50.cs
new file mode 100644
index 00000000000..ad9f004a916
--- /dev/null
+++ b/mcs/tests/test-async-50.cs
@@ -0,0 +1,31 @@
+using System.Threading.Tasks;
+using System;
+
+class X
+{
+ static void Main ()
+ {
+ var x = new X ();
+ x.Run ().Wait ();
+ }
+
+ Task<int> AnimateAsync (Action callback)
+ {
+ callback ();
+ return Task.FromResult (2);
+ }
+
+ void SecondLevel (Action callback)
+ {
+ callback ();
+ }
+
+ async Task Run ()
+ {
+ var ret = await AnimateAsync (() => {
+ SecondLevel (() => {
+ Console.WriteLine (this);
+ });
+ });
+ }
+}
diff --git a/mcs/tests/test-async-51.cs b/mcs/tests/test-async-51.cs
new file mode 100644
index 00000000000..65f1511c65d
--- /dev/null
+++ b/mcs/tests/test-async-51.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Threading.Tasks;
+
+public class Program
+{
+ public static void Main (string[] args)
+ {
+ var p = new Program ();
+ p.LoadPlayers ().Wait ();
+ }
+
+ class Model
+ {
+ public Player SelectedPlayer { get; set; }
+ }
+
+ class Player
+ {
+ }
+
+ Model model = new Model ();
+
+ private async Task LoadPlayers ()
+ {
+ Action<Player> selectPlayer = player => { };
+ Func<Action<Player>, Action<Player>> selector = functor => player => {
+ Console.WriteLine (model);
+ };
+
+ selector (selectPlayer);
+ }
+
+} \ No newline at end of file
diff --git a/mcs/tests/test-async-52.cs b/mcs/tests/test-async-52.cs
new file mode 100644
index 00000000000..36230acd776
--- /dev/null
+++ b/mcs/tests/test-async-52.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Threading.Tasks;
+
+public delegate T ActualValueDelegate<T> ();
+
+class X
+{
+ public static void Main ()
+ {
+ Matches (async () => await Throw());
+ }
+
+ static bool Matches<T>(ActualValueDelegate<T> del) where T : Task
+ {
+ del ().Wait ();
+ return true;
+ }
+
+ static async Task Throw()
+ {
+ await Task.Delay (1);
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-async-53.cs b/mcs/tests/test-async-53.cs
new file mode 100644
index 00000000000..3ffee8c4d50
--- /dev/null
+++ b/mcs/tests/test-async-53.cs
@@ -0,0 +1,27 @@
+using System;
+
+class Y
+{
+}
+
+class X
+{
+ public event Action<int, string> E;
+
+ void Foo ()
+ {
+ var nc = new Y ();
+
+ E += async (arg1, arg2) => {
+ nc = null;
+ };
+
+ E (1, "h");
+ }
+
+ public static void Main ()
+ {
+ var x = new X ();
+ x.Foo ();
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-debug-10-ref.xml b/mcs/tests/test-debug-10-ref.xml
index 4181816941a..031aecb8fac 100644
--- a/mcs/tests/test-debug-10-ref.xml
+++ b/mcs/tests/test-debug-10-ref.xml
@@ -44,6 +44,7 @@
<sequencepoints>
<entry il="0x0" row="4" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="5" col="3" file_ref="1" hidden="false" />
+ <entry il="0x2" row="5" col="3" file_ref="1" hidden="false" />
<entry il="0x7" row="6" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
diff --git a/mcs/tests/test-debug-11-ref.xml b/mcs/tests/test-debug-11-ref.xml
index e524e16c296..3792704d712 100644
--- a/mcs/tests/test-debug-11-ref.xml
+++ b/mcs/tests/test-debug-11-ref.xml
@@ -15,7 +15,7 @@
<method token="0x6000002">
<sequencepoints>
<entry il="0x0" row="12" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="13" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1" row="13" col="10" file_ref="1" hidden="false" />
<entry il="0x6" row="13" col="26" file_ref="1" hidden="false" />
<entry il="0x16" row="14" col="2" file_ref="1" hidden="false" />
</sequencepoints>
@@ -41,6 +41,7 @@
<entry il="0x1" row="25" col="10" file_ref="1" hidden="false" />
<entry il="0x9" row="26" col="3" file_ref="1" hidden="false" />
<entry il="0xa" row="27" col="3" file_ref="1" hidden="false" />
+ <entry il="0x18" row="25" col="14" file_ref="1" hidden="false" />
<entry il="0x1e" row="28" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
@@ -58,6 +59,8 @@
<entry il="0x9" row="32" col="26" file_ref="1" hidden="false" />
<entry il="0x11" row="33" col="3" file_ref="1" hidden="false" />
<entry il="0x12" row="34" col="3" file_ref="1" hidden="false" />
+ <entry il="0x20" row="32" col="26" file_ref="1" hidden="false" />
+ <entry il="0x33" row="32" col="12" file_ref="1" hidden="false" />
<entry il="0x39" row="35" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
@@ -75,6 +78,7 @@
<entry il="0x1" row="39" col="10" file_ref="1" hidden="false" />
<entry il="0x10" row="40" col="3" file_ref="1" hidden="false" />
<entry il="0x11" row="41" col="3" file_ref="1" hidden="false" />
+ <entry il="0x2e" row="39" col="13" file_ref="1" hidden="false" />
<entry il="0x34" row="42" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
@@ -88,10 +92,12 @@
<method token="0x6000008">
<sequencepoints>
<entry il="0x0" row="45" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="46" col="10" file_ref="1" hidden="false" />
+ <entry il="0x1" row="46" col="19" file_ref="1" hidden="false" />
<entry il="0x7" row="47" col="3" file_ref="1" hidden="false" />
<entry il="0x8" row="48" col="4" file_ref="1" hidden="false" />
+ <entry il="0xd" row="48" col="12" file_ref="1" hidden="false" />
<entry il="0x12" row="49" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1f" row="46" col="14" file_ref="1" hidden="false" />
<entry il="0x25" row="50" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
@@ -167,6 +173,7 @@
<sequencepoints>
<entry il="0x0" row="103" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="105" col="3" file_ref="1" hidden="false" />
+ <entry il="0x86" row="104" col="3" file_ref="1" hidden="false" />
<entry il="0xb3" row="107" col="5" file_ref="1" hidden="false" />
<entry il="0xb8" row="109" col="4" file_ref="1" hidden="false" />
<entry il="0xb9" row="110" col="5" file_ref="1" hidden="false" />
@@ -255,6 +262,7 @@
<entry il="0x1" row="175" col="3" file_ref="1" hidden="false" />
<entry il="0x2" row="176" col="3" file_ref="1" hidden="false" />
<entry il="0x3" row="177" col="4" file_ref="1" hidden="false" />
+ <entry il="0x8" row="177" col="12" file_ref="1" hidden="false" />
<entry il="0xd" row="178" col="3" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
@@ -266,6 +274,7 @@
<sequencepoints>
<entry il="0x0" row="182" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="183" col="3" file_ref="1" hidden="false" />
+ <entry il="0x7" row="183" col="7" file_ref="1" hidden="false" />
<entry il="0x11" row="184" col="3" file_ref="1" hidden="false" />
<entry il="0x12" row="185" col="3" file_ref="1" hidden="false" />
<entry il="0x18" row="187" col="3" file_ref="1" hidden="false" />
@@ -282,9 +291,11 @@
<sequencepoints>
<entry il="0x0" row="192" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="193" col="3" file_ref="1" hidden="false" />
+ <entry il="0x7" row="193" col="7" file_ref="1" hidden="false" />
<entry il="0x11" row="194" col="3" file_ref="1" hidden="false" />
<entry il="0x12" row="195" col="3" file_ref="1" hidden="false" />
<entry il="0x18" row="196" col="8" file_ref="1" hidden="false" />
+ <entry il="0x1e" row="196" col="12" file_ref="1" hidden="false" />
<entry il="0x28" row="197" col="3" file_ref="1" hidden="false" />
<entry il="0x29" row="198" col="3" file_ref="1" hidden="false" />
<entry il="0x2f" row="200" col="3" file_ref="1" hidden="false" />
@@ -363,11 +374,12 @@
<entry il="0x1e" row="243" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
- <entry name="a" il_index="0" scope_ref="0" />
+ <entry name="a" il_index="0" scope_ref="1" />
</locals>
<scopes>
- <entry index="0" start="0xf" end="0x11" />
- <entry index="1" start="0x10" end="0x10" />
+ <entry index="0" start="0x1" end="0x1e" />
+ <entry index="1" start="0xf" end="0x11" />
+ <entry index="2" start="0x10" end="0x10" />
</scopes>
</method>
<method token="0x6000019">
@@ -375,17 +387,22 @@
<entry il="0x0" row="246" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="247" col="3" file_ref="1" hidden="false" />
<entry il="0x2" row="250" col="3" file_ref="1" hidden="false" />
+ <entry il="0x3" row="250" col="3" file_ref="1" hidden="false" />
<entry il="0xe" row="248" col="4" file_ref="1" hidden="false" />
+ <entry il="0x10" row="250" col="3" file_ref="1" hidden="false" />
<entry il="0x16" row="251" col="3" file_ref="1" hidden="false" />
<entry il="0x17" row="252" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1a" row="250" col="3" file_ref="1" hidden="false" />
+ <entry il="0x31" row="250" col="3" file_ref="1" hidden="false" />
<entry il="0x37" row="253" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
- <entry name="a" il_index="0" scope_ref="0" />
+ <entry name="a" il_index="0" scope_ref="1" />
</locals>
<scopes>
- <entry index="0" start="0x16" end="0x18" />
- <entry index="1" start="0x17" end="0x17" />
+ <entry index="0" start="0x1" end="0x37" />
+ <entry index="1" start="0x16" end="0x18" />
+ <entry index="2" start="0x17" end="0x17" />
</scopes>
</method>
<method token="0x600001a">
@@ -393,17 +410,21 @@
<entry il="0x0" row="256" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="257" col="3" file_ref="1" hidden="false" />
<entry il="0x2" row="260" col="3" file_ref="1" hidden="false" />
+ <entry il="0x4" row="260" col="3" file_ref="1" hidden="false" />
<entry il="0xf" row="258" col="4" file_ref="1" hidden="false" />
+ <entry il="0x10" row="260" col="3" file_ref="1" hidden="false" />
<entry il="0x16" row="261" col="3" file_ref="1" hidden="false" />
<entry il="0x17" row="262" col="3" file_ref="1" hidden="false" />
+ <entry il="0x19" row="260" col="3" file_ref="1" hidden="false" />
<entry il="0x3c" row="263" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
- <entry name="a" il_index="0" scope_ref="0" />
+ <entry name="a" il_index="0" scope_ref="1" />
</locals>
<scopes>
- <entry index="0" start="0x16" end="0x18" />
- <entry index="1" start="0x17" end="0x17" />
+ <entry index="0" start="0x1" end="0x3c" />
+ <entry index="1" start="0x16" end="0x18" />
+ <entry index="2" start="0x17" end="0x17" />
</scopes>
</method>
<method token="0x600001b">
@@ -411,6 +432,8 @@
<entry il="0x0" row="266" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="267" col="3" file_ref="1" hidden="false" />
<entry il="0x2" row="269" col="6" file_ref="1" hidden="false" />
+ <entry il="0x6" row="269" col="6" file_ref="1" hidden="false" />
+ <entry il="0xe" row="269" col="6" file_ref="1" hidden="false" />
<entry il="0x24" row="268" col="3" file_ref="1" hidden="false" />
<entry il="0x2f" row="270" col="3" file_ref="1" hidden="false" />
<entry il="0x30" row="271" col="3" file_ref="1" hidden="false" />
@@ -419,11 +442,12 @@
<entry il="0x4d" row="272" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
- <entry name="a" il_index="0" scope_ref="0" />
+ <entry name="a" il_index="0" scope_ref="1" />
</locals>
<scopes>
- <entry index="0" start="0x2f" end="0x31" />
- <entry index="1" start="0x30" end="0x30" />
+ <entry index="0" start="0x1" end="0x4d" />
+ <entry index="1" start="0x2f" end="0x31" />
+ <entry index="2" start="0x30" end="0x30" />
</scopes>
</method>
</methods>
diff --git a/mcs/tests/test-debug-14-ref.xml b/mcs/tests/test-debug-14-ref.xml
index e9d76ccc380..9bae89796d0 100644
--- a/mcs/tests/test-debug-14-ref.xml
+++ b/mcs/tests/test-debug-14-ref.xml
@@ -52,6 +52,7 @@
</method>
<method token="0x6000006">
<sequencepoints>
+ <entry il="0x0" row="34" col="2" file_ref="1" hidden="false" />
<entry il="0xd" row="34" col="2" file_ref="1" hidden="false" />
<entry il="0xe" row="35" col="3" file_ref="1" hidden="false" />
<entry il="0x1b" row="37" col="2" file_ref="1" hidden="false" />
@@ -63,7 +64,7 @@
</method>
<method token="0x6000007">
<sequencepoints>
- <entry il="0x0" row="13" col="3" file_ref="1" hidden="false" />
+ <entry il="0x0" row="13" col="11" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
<scopes />
@@ -71,7 +72,7 @@
<method token="0x6000008">
<sequencepoints>
<entry il="0x0" row="20" col="3" file_ref="1" hidden="false" />
- <entry il="0x1" row="21" col="4" file_ref="1" hidden="false" />
+ <entry il="0x1" row="21" col="12" file_ref="1" hidden="false" />
<entry il="0x6" row="22" col="3" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
@@ -80,7 +81,7 @@
<method token="0x6000009">
<sequencepoints>
<entry il="0x0" row="28" col="3" file_ref="1" hidden="false" />
- <entry il="0x1" row="29" col="4" file_ref="1" hidden="false" />
+ <entry il="0x1" row="29" col="12" file_ref="1" hidden="false" />
<entry il="0x6" row="30" col="3" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
diff --git a/mcs/tests/test-debug-15-ref.xml b/mcs/tests/test-debug-15-ref.xml
index 48404440a0d..323939003d5 100644
--- a/mcs/tests/test-debug-15-ref.xml
+++ b/mcs/tests/test-debug-15-ref.xml
@@ -13,6 +13,8 @@
<sequencepoints>
<entry il="0x0" row="6" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="7" col="3" file_ref="1" hidden="false" />
+ <entry il="0xb" row="7" col="21" file_ref="1" hidden="false" />
+ <entry il="0x16" row="5" col="6" file_ref="1" hidden="false" />
<entry il="0x1c" row="8" col="5" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
diff --git a/mcs/tests/test-debug-16-ref.xml b/mcs/tests/test-debug-16-ref.xml
index 6c9c492e40a..083ef56c2c0 100644
--- a/mcs/tests/test-debug-16-ref.xml
+++ b/mcs/tests/test-debug-16-ref.xml
@@ -20,9 +20,11 @@
<method token="0x6000003">
<sequencepoints>
<entry il="0x0" row="14" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="15" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1" row="15" col="11" file_ref="1" hidden="false" />
<entry il="0x7" row="17" col="4" file_ref="1" hidden="false" />
+ <entry il="0xe" row="17" col="4" file_ref="1" hidden="false" />
<entry il="0x13" row="20" col="4" file_ref="1" hidden="false" />
+ <entry il="0x1a" row="20" col="4" file_ref="1" hidden="false" />
<entry il="0x21" row="24" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
@@ -33,7 +35,7 @@
<method token="0x6000004">
<sequencepoints>
<entry il="0x0" row="27" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="28" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1" row="28" col="14" file_ref="1" hidden="false" />
<entry il="0x7" row="30" col="4" file_ref="1" hidden="false" />
<entry il="0x12" row="31" col="4" file_ref="1" hidden="false" />
<entry il="0x1b" row="33" col="2" file_ref="1" hidden="false" />
diff --git a/mcs/tests/test-debug-17-ref.xml b/mcs/tests/test-debug-17-ref.xml
index cf51ed208c7..8c966ef91e8 100644
--- a/mcs/tests/test-debug-17-ref.xml
+++ b/mcs/tests/test-debug-17-ref.xml
@@ -19,8 +19,12 @@
</method>
<method token="0x6000003">
<sequencepoints>
+ <entry il="0xf" row="13" col="5" file_ref="1" hidden="false" />
+ <entry il="0x24" row="13" col="8" file_ref="1" hidden="false" />
<entry il="0x2a" row="11" col="2" file_ref="1" hidden="false" />
<entry il="0x2b" row="12" col="3" file_ref="1" hidden="false" />
+ <entry il="0x2d" row="14" col="4" file_ref="1" hidden="false" />
+ <entry il="0x40" row="13" col="4" file_ref="1" hidden="false" />
<entry il="0x46" row="16" col="3" file_ref="1" hidden="false" />
<entry il="0x4b" row="17" col="2" file_ref="1" hidden="false" />
</sequencepoints>
@@ -33,6 +37,9 @@
<sequencepoints>
<entry il="0x0" row="20" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="21" col="3" file_ref="1" hidden="false" />
+ <entry il="0x11" row="21" col="59" file_ref="1" hidden="false" />
+ <entry il="0x1c" row="21" col="53" file_ref="1" hidden="false" />
+ <entry il="0x2c" row="21" col="47" file_ref="1" hidden="false" />
<entry il="0x32" row="22" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
diff --git a/mcs/tests/test-debug-18-ref.xml b/mcs/tests/test-debug-18-ref.xml
index 7961bca8a06..df5bd3c1056 100644
--- a/mcs/tests/test-debug-18-ref.xml
+++ b/mcs/tests/test-debug-18-ref.xml
@@ -67,7 +67,7 @@
<entry il="0x0" row="30" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="31" col="3" file_ref="1" hidden="false" />
<entry il="0x7" row="32" col="3" file_ref="1" hidden="false" />
- <entry il="0xe" row="33" col="3" file_ref="1" hidden="false" />
+ <entry il="0xe" row="33" col="15" file_ref="1" hidden="false" />
<entry il="0x14" row="34" col="3" file_ref="1" hidden="false" />
<entry il="0x81" row="35" col="2" file_ref="1" hidden="false" />
</sequencepoints>
@@ -81,7 +81,7 @@
<method token="0x6000009">
<sequencepoints>
<entry il="0x0" row="38" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="39" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1" row="39" col="15" file_ref="1" hidden="false" />
<entry il="0x7" row="40" col="3" file_ref="1" hidden="false" />
<entry il="0x1e4" row="41" col="2" file_ref="1" hidden="false" />
</sequencepoints>
diff --git a/mcs/tests/test-debug-19-ref.xml b/mcs/tests/test-debug-19-ref.xml
index 9e557b6733f..5c426ff09e8 100644
--- a/mcs/tests/test-debug-19-ref.xml
+++ b/mcs/tests/test-debug-19-ref.xml
@@ -25,7 +25,7 @@
<method token="0x6000004">
<sequencepoints>
<entry il="0x0" row="16" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="17" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1" row="17" col="15" file_ref="1" hidden="false" />
<entry il="0x23" row="17" col="23" file_ref="1" hidden="false" />
<entry il="0x2e" row="21" col="2" file_ref="1" hidden="false" />
</sequencepoints>
@@ -40,7 +40,7 @@
<method token="0x6000006">
<sequencepoints>
<entry il="0x0" row="29" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="30" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1" row="30" col="15" file_ref="1" hidden="false" />
<entry il="0x23" row="30" col="23" file_ref="1" hidden="false" />
<entry il="0x2e" row="31" col="2" file_ref="1" hidden="false" />
</sequencepoints>
@@ -99,6 +99,7 @@
<sequencepoints>
<entry il="0x21" row="34" col="2" file_ref="1" hidden="false" />
<entry il="0x22" row="35" col="3" file_ref="1" hidden="false" />
+ <entry il="0x23" row="35" col="15" file_ref="1" hidden="false" />
<entry il="0x2d" row="36" col="3" file_ref="1" hidden="false" />
<entry il="0x8b" row="37" col="3" file_ref="1" hidden="false" />
<entry il="0x3ab" row="38" col="3" file_ref="1" hidden="false" />
diff --git a/mcs/tests/test-debug-21-ref.xml b/mcs/tests/test-debug-21-ref.xml
index a6af337137c..287791e7eb2 100644
--- a/mcs/tests/test-debug-21-ref.xml
+++ b/mcs/tests/test-debug-21-ref.xml
@@ -41,6 +41,7 @@
<sequencepoints>
<entry il="0x27" row="7" col="2" file_ref="1" hidden="false" />
<entry il="0x28" row="8" col="3" file_ref="1" hidden="false" />
+ <entry il="0x2d" row="8" col="11" file_ref="1" hidden="false" />
<entry il="0x32" row="9" col="3" file_ref="1" hidden="false" />
<entry il="0x41" row="10" col="3" file_ref="1" hidden="false" />
<entry il="0x42" row="11" col="4" file_ref="1" hidden="false" />
@@ -77,6 +78,7 @@
<sequencepoints>
<entry il="0x0" row="14" col="3" file_ref="1" hidden="false" />
<entry il="0x1" row="15" col="4" file_ref="1" hidden="false" />
+ <entry il="0x6" row="15" col="12" file_ref="1" hidden="false" />
<entry il="0xb" row="16" col="3" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
diff --git a/mcs/tests/test-debug-22-ref.xml b/mcs/tests/test-debug-22-ref.xml
index 75fe231b6a5..c380f599bb1 100644
--- a/mcs/tests/test-debug-22-ref.xml
+++ b/mcs/tests/test-debug-22-ref.xml
@@ -31,7 +31,7 @@
<method token="0x6000005">
<sequencepoints>
<entry il="0x0" row="20" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="21" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1" row="21" col="9" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
<scopes />
@@ -68,6 +68,7 @@
<sequencepoints>
<entry il="0x21" row="15" col="2" file_ref="1" hidden="false" />
<entry il="0x22" row="16" col="3" file_ref="1" hidden="false" />
+ <entry il="0x29" row="16" col="21" file_ref="1" hidden="false" />
<entry il="0x47" row="17" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals />
diff --git a/mcs/tests/test-debug-23-ref.xml b/mcs/tests/test-debug-23-ref.xml
index c1fba7edd1a..5c15ce75a80 100644
--- a/mcs/tests/test-debug-23-ref.xml
+++ b/mcs/tests/test-debug-23-ref.xml
@@ -22,6 +22,7 @@
<sequencepoints>
<entry il="0x0" row="8" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="9" col="3" file_ref="1" hidden="false" />
+ <entry il="0x2" row="9" col="3" file_ref="1" hidden="false" />
<entry il="0x7" row="9" col="8" file_ref="1" hidden="false" />
<entry il="0xd" row="10" col="2" file_ref="1" hidden="false" />
</sequencepoints>
@@ -32,6 +33,7 @@
<sequencepoints>
<entry il="0x0" row="13" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="14" col="3" file_ref="1" hidden="false" />
+ <entry il="0x2" row="14" col="3" file_ref="1" hidden="false" />
<entry il="0x7" row="14" col="11" file_ref="1" hidden="false" />
<entry il="0xd" row="15" col="2" file_ref="1" hidden="false" />
</sequencepoints>
@@ -53,6 +55,7 @@
<entry il="0x0" row="23" col="2" file_ref="1" hidden="false" />
<entry il="0x1" row="24" col="3" file_ref="1" hidden="false" />
<entry il="0x1f" row="25" col="3" file_ref="1" hidden="false" />
+ <entry il="0x20" row="25" col="3" file_ref="1" hidden="false" />
<entry il="0x25" row="25" col="8" file_ref="1" hidden="false" />
<entry il="0x2b" row="26" col="2" file_ref="1" hidden="false" />
</sequencepoints>
diff --git a/mcs/tests/test-debug-24-ref.xml b/mcs/tests/test-debug-24-ref.xml
index 6a0622205d9..11ff400fed5 100644
--- a/mcs/tests/test-debug-24-ref.xml
+++ b/mcs/tests/test-debug-24-ref.xml
@@ -12,8 +12,8 @@
<method token="0x6000002">
<sequencepoints>
<entry il="0x0" row="6" col="2" file_ref="1" hidden="false" />
- <entry il="0x1" row="7" col="3" file_ref="1" hidden="false" />
- <entry il="0x7" row="7" col="30" file_ref="1" hidden="false" />
+ <entry il="0x1" row="7" col="14" file_ref="1" hidden="false" />
+ <entry il="0x7" row="7" col="34" file_ref="1" hidden="false" />
<entry il="0xd" row="8" col="2" file_ref="1" hidden="false" />
</sequencepoints>
<locals>
diff --git a/mcs/tests/test-debug-27-ref.xml b/mcs/tests/test-debug-27-ref.xml
new file mode 100644
index 00000000000..5509d0026b1
--- /dev/null
+++ b/mcs/tests/test-debug-27-ref.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="utf-8"?>
+<symbols>
+ <files>
+ <file id="1" name="test-debug-27.cs" checksum="4a2fa40aa27e1d498f61d664c985ddf2" />
+ </files>
+ <methods>
+ <method token="0x6000001">
+ <sequencepoints>
+ <entry il="0x0" row="8" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="10" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000002">
+ <sequencepoints>
+ <entry il="0x0" row="13" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="14" col="3" file_ref="1" hidden="false" />
+ <entry il="0x8" row="15" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000003">
+ <sequencepoints />
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000004">
+ <sequencepoints>
+ <entry il="0x0" row="21" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="22" col="3" file_ref="1" hidden="false" />
+ <entry il="0x8" row="23" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000005">
+ <sequencepoints>
+ <entry il="0x0" row="26" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="27" col="3" file_ref="1" hidden="false" />
+ <entry il="0x8" row="28" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000006">
+ <sequencepoints>
+ <entry il="0x0" row="31" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="32" col="10" file_ref="1" hidden="false" />
+ <entry il="0xc" row="33" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000007">
+ <sequencepoints>
+ <entry il="0x0" row="36" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="37" col="3" file_ref="1" hidden="false" />
+ <entry il="0x8" row="38" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000008">
+ <sequencepoints>
+ <entry il="0x0" row="41" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="42" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1f" row="44" col="3" file_ref="1" hidden="false" />
+ <entry il="0x20" row="44" col="13" file_ref="1" hidden="false" />
+ <entry il="0x26" row="44" col="20" file_ref="1" hidden="false" />
+ <entry il="0x2d" row="45" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals>
+ <entry name="f" il_index="0" scope_ref="0" />
+ <entry name="res" il_index="1" scope_ref="0" />
+ </locals>
+ <scopes />
+ </method>
+ <method token="0x6000009">
+ <sequencepoints>
+ <entry il="0x0" row="48" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="49" col="3" file_ref="1" hidden="false" />
+ <entry il="0x4" row="49" col="11" file_ref="1" hidden="false" />
+ <entry il="0x9" row="50" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals>
+ <entry name="s" il_index="0" scope_ref="0" />
+ </locals>
+ <scopes />
+ </method>
+ <method token="0x600000a">
+ <sequencepoints>
+ <entry il="0x0" row="53" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="54" col="3" file_ref="1" hidden="false" />
+ <entry il="0xa" row="54" col="11" file_ref="1" hidden="false" />
+ <entry il="0x18" row="54" col="22" file_ref="1" hidden="false" />
+ <entry il="0x1f" row="55" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals>
+ <entry name="i" il_index="0" scope_ref="0" />
+ </locals>
+ <scopes />
+ </method>
+ <method token="0x600000b">
+ <sequencepoints>
+ <entry il="0x0" row="58" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="59" col="3" file_ref="1" hidden="false" />
+ <entry il="0x6" row="59" col="11" file_ref="1" hidden="false" />
+ <entry il="0xc" row="60" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x600000c">
+ <sequencepoints>
+ <entry il="0x0" row="63" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="64" col="3" file_ref="1" hidden="false" />
+ <entry il="0x8" row="65" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ </methods>
+</symbols> \ No newline at end of file
diff --git a/mcs/tests/test-debug-27.cs b/mcs/tests/test-debug-27.cs
new file mode 100644
index 00000000000..982b42c9c5f
--- /dev/null
+++ b/mcs/tests/test-debug-27.cs
@@ -0,0 +1,68 @@
+using System;
+
+// Tests for explicit call sequence point
+
+struct S
+{
+ public S (int i)
+ {
+
+ }
+
+ public static implicit operator int (S s)
+ {
+ return 1;
+ }
+}
+
+class C
+{
+ public static int A ()
+ {
+ return 1;
+ }
+
+ public static int B (C c)
+ {
+ return 2;
+ }
+
+ public static C Test ()
+ {
+ return new C ();
+ }
+
+ public string Foo ()
+ {
+ return null;
+ }
+
+ void Test_1 ()
+ {
+ Func<int> f = A;
+
+ var res = f () + f ();
+ }
+
+ void Test_2 ()
+ {
+ var s = new S (0);
+ }
+
+ void Test_3 ()
+ {
+ int i = new S () + new S ();
+ }
+
+ void Test_4 ()
+ {
+ Test ().Foo ();
+ }
+
+ static int Main ()
+ {
+ return 0;
+ }
+}
+
+
diff --git a/mcs/tests/test-debug-28-ref.xml b/mcs/tests/test-debug-28-ref.xml
new file mode 100644
index 00000000000..d4a51b80444
--- /dev/null
+++ b/mcs/tests/test-debug-28-ref.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<symbols>
+ <files>
+ <file id="1" name="test-debug-28.cs" checksum="0908758b6671839a79620b83da354859" />
+ </files>
+ <methods>
+ <method token="0x6000001">
+ <sequencepoints />
+ <locals />
+ <scopes />
+ </method>
+ <method token="0x6000002">
+ <sequencepoints>
+ <entry il="0x0" row="4" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="5" col="3" file_ref="1" hidden="false" />
+ <entry il="0x2" row="5" col="21" file_ref="1" hidden="false" />
+ <entry il="0xb" row="5" col="12" file_ref="1" hidden="false" />
+ <entry il="0xf" row="5" col="21" file_ref="1" hidden="false" />
+ <entry il="0x1c" row="7" col="3" file_ref="1" hidden="false" />
+ <entry il="0x1d" row="7" col="21" file_ref="1" hidden="false" />
+ <entry il="0x28" row="7" col="12" file_ref="1" hidden="false" />
+ <entry il="0x2e" row="7" col="21" file_ref="1" hidden="false" />
+ <entry il="0x3f" row="9" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals>
+ <entry name="v" il_index="0" scope_ref="1" />
+ <entry name="v" il_index="3" scope_ref="3" />
+ </locals>
+ <scopes>
+ <entry index="0" start="0x1" end="0x1c" />
+ <entry index="1" start="0xf" end="0xf" />
+ <entry index="2" start="0x1c" end="0x3f" />
+ <entry index="3" start="0x2e" end="0x2e" />
+ </scopes>
+ </method>
+ <method token="0x6000003">
+ <sequencepoints>
+ <entry il="0x0" row="12" col="2" file_ref="1" hidden="false" />
+ <entry il="0x1" row="13" col="3" file_ref="1" hidden="false" />
+ <entry il="0x8" row="14" col="2" file_ref="1" hidden="false" />
+ </sequencepoints>
+ <locals />
+ <scopes />
+ </method>
+ </methods>
+</symbols> \ No newline at end of file
diff --git a/mcs/tests/test-debug-28.cs b/mcs/tests/test-debug-28.cs
new file mode 100644
index 00000000000..8aa9f699d4d
--- /dev/null
+++ b/mcs/tests/test-debug-28.cs
@@ -0,0 +1,15 @@
+public class StatementsAsBlocks
+{
+ static void ForEach (string[] args)
+ {
+ foreach (var v in args)
+ ;
+ foreach (var v in args)
+ ;
+ }
+
+ public static int Main ()
+ {
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-named-08.cs b/mcs/tests/test-named-08.cs
new file mode 100644
index 00000000000..6d25be4ed4e
--- /dev/null
+++ b/mcs/tests/test-named-08.cs
@@ -0,0 +1,28 @@
+using System;
+
+
+class C
+{
+ static int Foo (string packageId, int version)
+ {
+ return Foo (packageId, version, ignoreDependencies: false, allowPrereleaseVersions: false);
+ }
+
+ static int Foo (string packageId, int version, bool ignoreDependencies, bool allowPrereleaseVersions)
+ {
+ return 1;
+ }
+
+ static int Foo (double package, bool ignoreDependencies, bool allowPrereleaseVersions, bool ignoreWalkInfo)
+ {
+ return 2;
+ }
+
+ public static int Main ()
+ {
+ if (Foo ("", 1) != 1)
+ return 1;
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-partial-32.cs b/mcs/tests/test-partial-32.cs
new file mode 100644
index 00000000000..0fb0cd5790f
--- /dev/null
+++ b/mcs/tests/test-partial-32.cs
@@ -0,0 +1,36 @@
+namespace A
+{
+ using X;
+
+ partial class C
+ {
+ private class N : N1
+ {
+ }
+
+ public static void Main ()
+ {
+ }
+ }
+}
+
+namespace A
+{
+ using X;
+
+ partial class C : C1
+ {
+ }
+}
+
+
+namespace X
+{
+ public class C1
+ {
+ public class N1
+ {
+
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-xml-068-ref.xml b/mcs/tests/test-xml-068-ref.xml
new file mode 100644
index 00000000000..480a34dd2ae
--- /dev/null
+++ b/mcs/tests/test-xml-068-ref.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>test-xml-068</name>
+ </assembly>
+ <members>
+ <member name="M:X.Test">
+ <summary>
+ Test summary
+ </summary>
+ <see cref="!:#sometext" />
+ </member>
+ </members>
+</doc>
diff --git a/mcs/tests/test-xml-068.cs b/mcs/tests/test-xml-068.cs
new file mode 100644
index 00000000000..0ca61573a07
--- /dev/null
+++ b/mcs/tests/test-xml-068.cs
@@ -0,0 +1,16 @@
+// Compiler options: -doc:xml-068.xml
+
+class X
+{
+ /// <summary>
+ /// Test summary
+ /// </summary>
+ /// <see cref="#sometext"/>
+ static void Test ()
+ {
+ }
+
+ public static void Main ()
+ {
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/ver-il-net_4_5.xml b/mcs/tests/ver-il-net_4_5.xml
index 7ed9370e03d..dae7b950133 100644
--- a/mcs/tests/ver-il-net_4_5.xml
+++ b/mcs/tests/ver-il-net_4_5.xml
@@ -392,335 +392,335 @@
<method name="Int32 Main()" attrs="150">
<size>187</size>
</method>
- <method name="Void &lt;BinaryAdd_1&gt;m__4(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void .ctor()" attrs="6278">
+ <size>8</size>
+ </method>
+ <method name="Void .ctor(Object)" attrs="6278">
+ <size>8</size>
+ </method>
+ <method name="Void .cctor()" attrs="6289">
+ <size>34</size>
+ </method>
+ </type>
+ <type name="AssertDynamicObject+&lt;GetFakeMetaObject&gt;c__AnonStorey0">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;InvokeMember_3&gt;c__DynamicSite32+Container0">
+ <method name="Void Invoke(System.Runtime.CompilerServices.CallSite, System.Object, Int32 ByRef)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="Void .ctor(Object, IntPtr)" attrs="6278">
+ <size>0</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;InvokeMember_4&gt;c__DynamicSite33+Container0">
+ <method name="Void Invoke(System.Runtime.CompilerServices.CallSite, System.Object, Int32 ByRef)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="Void .ctor(Object, IntPtr)" attrs="6278">
+ <size>0</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;InvokeMember_8&gt;c__DynamicSite37+Container0">
+ <method name="Void Invoke(System.Runtime.CompilerServices.CallSite, System.Object, System.Object ByRef)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="Void .ctor(Object, IntPtr)" attrs="6278">
+ <size>0</size>
+ </method>
+ </type>
+ <type name="Tester">
+ <method name="Void Assert[T](System.Collections.Generic.IList`1[T], System.Collections.Generic.IList`1[T], System.String)" attrs="145">
+ <size>257</size>
+ </method>
+ <method name="Void &lt;BinaryAdd_1&gt;m__0(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>73</size>
</method>
- <method name="Void &lt;BinaryAdd_2&gt;m__5(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAdd_2&gt;m__1(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>68</size>
</method>
- <method name="Void &lt;BinaryAdd_3&gt;m__6(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAdd_3&gt;m__2(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>73</size>
</method>
- <method name="Void &lt;BinaryAdd_4&gt;m__7(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAdd_4&gt;m__3(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>73</size>
</method>
- <method name="Void &lt;BinaryAddChecked_1&gt;m__8(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAddChecked_1&gt;m__4(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>73</size>
</method>
- <method name="Void &lt;BinaryAddChecked_2&gt;m__9(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAddChecked_2&gt;m__5(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>73</size>
</method>
- <method name="Void &lt;BinaryAddAssign_1&gt;m__B(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAddAssign_1&gt;m__6(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryAddAssignChecked_1&gt;m__C(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAddAssignChecked_1&gt;m__7(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryAnd_1&gt;m__D(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAnd_1&gt;m__8(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>73</size>
</method>
- <method name="Void &lt;BinaryAndAssign_1&gt;m__E(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAndAssign_1&gt;m__9(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryDivide_1&gt;m__F(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryDivide_1&gt;m__A(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryDivideAssign_1&gt;m__10(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryDivideAssign_1&gt;m__B(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryEqual_1&gt;m__11(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryEqual_1&gt;m__C(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryExclusiveOr_1&gt;m__12(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryExclusiveOr_1&gt;m__D(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryExclusiveOrAssign_1&gt;m__13(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryExclusiveOrAssign_1&gt;m__E(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryGreaterThan_1&gt;m__14(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryGreaterThan_1&gt;m__F(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryGreaterThanOrEqual_1&gt;m__15(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryGreaterThanOrEqual_1&gt;m__10(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryLeftShift_1&gt;m__16(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryLeftShift_1&gt;m__11(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryLeftShiftAssign_1&gt;m__17(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryLeftShiftAssign_1&gt;m__12(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryLessThan_1&gt;m__18(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryLessThan_1&gt;m__13(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryLessThanOrEqual_1&gt;m__19(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryLessThanOrEqual_1&gt;m__14(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryModulo_1&gt;m__1A(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryModulo_1&gt;m__15(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryModuloAssign_1&gt;m__1B(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryModuloAssign_1&gt;m__16(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryMultiply_1&gt;m__1C(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryMultiply_1&gt;m__17(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryMultiplyAssign_1&gt;m__1D(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryMultiplyAssign_1&gt;m__18(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryNotEqual_1&gt;m__1E(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryNotEqual_1&gt;m__19(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryOr_1&gt;m__1F(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryOr_1&gt;m__1A(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryOrAssign_1&gt;m__20(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryOrAssign_1&gt;m__1B(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryRightShift_1&gt;m__21(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryRightShift_1&gt;m__1C(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryRightShiftAssign_1&gt;m__22(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryRightShiftAssign_1&gt;m__1D(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinarySubtract_1&gt;m__23(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinarySubtract_1&gt;m__1E(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinarySubtractAssign_1&gt;m__24(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinarySubtractAssign_1&gt;m__1F(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="System.Object &lt;Convert_1&gt;m__25(System.Dynamic.ConvertBinder)" attrs="145">
+ <method name="System.Object &lt;Convert_1&gt;m__20(System.Dynamic.ConvertBinder)" attrs="145">
<size>58</size>
</method>
- <method name="System.Object &lt;Convert_2&gt;m__26(System.Dynamic.ConvertBinder)" attrs="145">
+ <method name="System.Object &lt;Convert_2&gt;m__21(System.Dynamic.ConvertBinder)" attrs="145">
<size>58</size>
</method>
- <method name="System.Object &lt;Convert_3&gt;m__27(System.Dynamic.ConvertBinder)" attrs="145">
+ <method name="System.Object &lt;Convert_3&gt;m__22(System.Dynamic.ConvertBinder)" attrs="145">
<size>58</size>
</method>
- <method name="System.Object &lt;Convert_4&gt;m__28(System.Dynamic.ConvertBinder)" attrs="145">
+ <method name="System.Object &lt;Convert_4&gt;m__23(System.Dynamic.ConvertBinder)" attrs="145">
<size>58</size>
</method>
- <method name="System.Object &lt;Convert_5&gt;m__29(System.Dynamic.ConvertBinder)" attrs="145">
+ <method name="System.Object &lt;Convert_5&gt;m__24(System.Dynamic.ConvertBinder)" attrs="145">
<size>67</size>
</method>
- <method name="Void &lt;GetIndex_1&gt;m__2A(System.Dynamic.GetIndexBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;GetIndex_1&gt;m__25(System.Dynamic.GetIndexBinder, System.Object[])" attrs="145">
<size>93</size>
</method>
- <method name="Void &lt;GetIndex_2&gt;m__2B(System.Dynamic.GetIndexBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;GetIndex_2&gt;m__26(System.Dynamic.GetIndexBinder, System.Object[])" attrs="145">
<size>112</size>
</method>
- <method name="System.Object &lt;GetMember_1&gt;m__2D(System.Dynamic.GetMemberBinder)" attrs="145">
+ <method name="System.Object &lt;GetMember_1&gt;m__27(System.Dynamic.GetMemberBinder)" attrs="145">
<size>75</size>
</method>
- <method name="Void &lt;Invoke_1&gt;m__2E(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;Invoke_1&gt;m__28(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
<size>102</size>
</method>
- <method name="Void &lt;Invoke_2&gt;m__2F(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;Invoke_2&gt;m__29(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;Invoke_4&gt;m__30(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;Invoke_4&gt;m__2A(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
<size>128</size>
</method>
- <method name="Void &lt;Invoke_5&gt;m__31(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;Invoke_5&gt;m__2B(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
<size>92</size>
</method>
- <method name="Void &lt;Invoke_5&gt;m__32(System.Object)" attrs="145">
+ <method name="Void &lt;Invoke_5&gt;m__2C(System.Object)" attrs="145">
<size>94</size>
</method>
- <method name="Void &lt;Invoke_6&gt;m__33(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;Invoke_6&gt;m__2D(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
<size>93</size>
</method>
- <method name="Void &lt;InvokeMember_1&gt;m__34(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;InvokeMember_1&gt;m__2E(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
<size>111</size>
</method>
- <method name="Void &lt;InvokeMember_3&gt;m__36(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;InvokeMember_3&gt;m__2F(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
<size>112</size>
</method>
- <method name="Void &lt;InvokeMember_4&gt;m__37(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;InvokeMember_4&gt;m__30(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
<size>111</size>
</method>
- <method name="Void &lt;InvokeMember_7&gt;m__39(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;InvokeMember_7&gt;m__31(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
<size>91</size>
</method>
- <method name="Void &lt;InvokeMember_8&gt;m__3A(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;InvokeMember_8&gt;m__32(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
<size>112</size>
</method>
- <method name="Void &lt;SetIndex_1&gt;m__3B(System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="145">
+ <method name="Void &lt;SetIndex_1&gt;m__33(System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="145">
<size>125</size>
</method>
- <method name="Void &lt;SetIndex_2&gt;m__3C(System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="145">
+ <method name="Void &lt;SetIndex_2&gt;m__34(System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="145">
<size>140</size>
</method>
- <method name="Void &lt;SetMember_1&gt;m__3E(System.Dynamic.SetMemberBinder, System.Object)" attrs="145">
+ <method name="Void &lt;SetMember_1&gt;m__35(System.Dynamic.SetMemberBinder, System.Object)" attrs="145">
<size>102</size>
</method>
- <method name="Void &lt;SetMember_2&gt;m__40(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;SetMember_2&gt;m__36(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>69</size>
</method>
- <method name="Void &lt;SetMember_2&gt;m__41(System.Dynamic.SetMemberBinder, System.Object)" attrs="145">
+ <method name="Void &lt;SetMember_2&gt;m__37(System.Dynamic.SetMemberBinder, System.Object)" attrs="145">
<size>77</size>
</method>
- <method name="System.Object &lt;UnaryPlus_1&gt;m__42(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryPlus_1&gt;m__38(System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>55</size>
</method>
- <method name="System.Object &lt;UnaryMinus_1&gt;m__43(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryMinus_1&gt;m__39(System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>55</size>
</method>
- <method name="System.Object &lt;UnaryNot_1&gt;m__44(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryNot_1&gt;m__3A(System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>55</size>
</method>
- <method name="System.Object &lt;UnaryOnesComplement_1&gt;m__45(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryOnesComplement_1&gt;m__3B(System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>55</size>
</method>
- <method name="System.Object &lt;UnaryDecrement_1&gt;m__46(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryDecrement_1&gt;m__3C(System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>55</size>
</method>
- <method name="System.Object &lt;UnaryDecrement_2&gt;m__47(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryDecrement_2&gt;m__3D(System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>59</size>
</method>
- <method name="System.Object &lt;UnaryIncrement_1&gt;m__48(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryIncrement_1&gt;m__3E(System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>55</size>
</method>
- <method name="System.Object &lt;UnaryIncrement_2&gt;m__49(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryIncrement_2&gt;m__3F(System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>59</size>
</method>
- <method name="System.Object &lt;UnaryIsFalse_1&gt;m__4A(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryIsFalse_1&gt;m__40(System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>60</size>
</method>
- <method name="Void &lt;UnaryIsFalse_1&gt;m__4B(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;UnaryIsFalse_1&gt;m__41(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>69</size>
</method>
- <method name="System.Object &lt;UnaryIsFalse_2&gt;m__4C(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryIsFalse_2&gt;m__42(System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>60</size>
</method>
- <method name="Void &lt;UnaryIsFalse_2&gt;m__4D(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;UnaryIsFalse_2&gt;m__43(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>69</size>
</method>
- <method name="System.Object &lt;UnaryIsFalse_3&gt;m__4E(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryIsFalse_3&gt;m__44(System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>60</size>
</method>
- <method name="Void &lt;UnaryIsFalse_3&gt;m__4F(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;UnaryIsFalse_3&gt;m__45(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>68</size>
</method>
- <method name="System.Object &lt;UnaryIsTrue_1&gt;m__50(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryIsTrue_1&gt;m__46(System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>60</size>
</method>
- <method name="System.Object &lt;UnaryIsTrue_2&gt;m__51(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryIsTrue_2&gt;m__47(System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>60</size>
</method>
- <method name="Void &lt;UnaryIsTrue_2&gt;m__52(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;UnaryIsTrue_2&gt;m__48(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>69</size>
</method>
- <method name="System.Object &lt;UnaryIsTrue_3&gt;m__53(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryIsTrue_3&gt;m__49(System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>60</size>
</method>
- <method name="Void &lt;UnaryIsTrue_3&gt;m__54(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;UnaryIsTrue_3&gt;m__4A(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Boolean &lt;Main&gt;m__55(System.Reflection.MethodInfo)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__4B(System.Reflection.MethodInfo)" attrs="145">
<size>20</size>
</method>
- <method name="System.String &lt;Main&gt;m__56(System.Reflection.MethodInfo)" attrs="145">
+ <method name="System.String &lt;Main&gt;m__4C(System.Reflection.MethodInfo)" attrs="145">
<size>15</size>
</method>
- <method name="Boolean &lt;Main&gt;m__57(System.Reflection.MethodInfo)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__4D(System.Reflection.MethodInfo)" attrs="145">
<size>15</size>
</method>
- <method name="Boolean &lt;Main&gt;m__58(Boolean)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__4E(Boolean)" attrs="145">
<size>12</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>8</size>
- </method>
- <method name="Void .ctor(Object)" attrs="6278">
- <size>8</size>
- </method>
- <method name="Void .cctor()" attrs="6289">
- <size>34</size>
- </method>
</type>
- <type name="AssertDynamicObject+&lt;GetFakeMetaObject&gt;c__AnonStorey0">
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
- <type name="Tester+&lt;BinaryAddChecked_2&gt;c__AnonStorey1">
- <method name="System.Object &lt;&gt;m__A()" attrs="131">
+ <type name="Tester+&lt;BinaryAddChecked_2&gt;c__AnonStorey0">
+ <method name="System.Object &lt;&gt;m__0()" attrs="131">
<size>98</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
- <type name="Tester+&lt;GetIndex_3&gt;c__AnonStorey2">
- <method name="Void &lt;&gt;m__2C(System.Dynamic.GetIndexBinder, System.Object[])" attrs="131">
+ <type name="Tester+&lt;GetIndex_3&gt;c__AnonStorey1">
+ <method name="Void &lt;&gt;m__0(System.Dynamic.GetIndexBinder, System.Object[])" attrs="131">
<size>93</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
- <type name="Tester+&lt;InvokeMember_2&gt;c__AnonStorey3">
- <method name="Void &lt;&gt;m__35(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="131">
+ <type name="Tester+&lt;InvokeMember_2&gt;c__AnonStorey2">
+ <method name="Void &lt;&gt;m__0(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="131">
<size>110</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
- <type name="Tester+&lt;InvokeMember_3&gt;c__DynamicSite32+Container0">
- <method name="Void Invoke(System.Runtime.CompilerServices.CallSite, System.Object, Int32 ByRef)" attrs="454">
- <size>0</size>
- </method>
- <method name="Void .ctor(Object, IntPtr)" attrs="6278">
- <size>0</size>
- </method>
- </type>
- <type name="Tester+&lt;InvokeMember_4&gt;c__DynamicSite33+Container0">
- <method name="Void Invoke(System.Runtime.CompilerServices.CallSite, System.Object, Int32 ByRef)" attrs="454">
- <size>0</size>
- </method>
- <method name="Void .ctor(Object, IntPtr)" attrs="6278">
- <size>0</size>
- </method>
- </type>
- <type name="Tester+&lt;InvokeMember_6&gt;c__AnonStorey4">
- <method name="Void &lt;&gt;m__38(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="131">
+ <type name="Tester+&lt;InvokeMember_6&gt;c__AnonStorey3">
+ <method name="Void &lt;&gt;m__0(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="131">
<size>120</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
- <type name="Tester+&lt;InvokeMember_8&gt;c__DynamicSite37+Container0">
- <method name="Void Invoke(System.Runtime.CompilerServices.CallSite, System.Object, System.Object ByRef)" attrs="454">
- <size>0</size>
- </method>
- <method name="Void .ctor(Object, IntPtr)" attrs="6278">
- <size>0</size>
- </method>
- </type>
- <type name="Tester+&lt;SetIndex_3&gt;c__AnonStorey5">
- <method name="Void &lt;&gt;m__3D(System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="131">
+ <type name="Tester+&lt;SetIndex_3&gt;c__AnonStorey4">
+ <method name="Void &lt;&gt;m__0(System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="131">
<size>120</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
- <type name="Tester+&lt;SetMember_2&gt;c__AnonStorey6">
- <method name="System.Object &lt;&gt;m__3F(System.Dynamic.GetMemberBinder)" attrs="131">
+ <type name="Tester+&lt;SetMember_2&gt;c__AnonStorey5">
+ <method name="System.Object &lt;&gt;m__0(System.Dynamic.GetMemberBinder)" attrs="131">
<size>80</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
- <type name="Tester">
- <method name="Void Assert[T](System.Collections.Generic.IList`1[T], System.Collections.Generic.IList`1[T], System.String)" attrs="145">
- <size>257</size>
- </method>
- </type>
</test>
<test name="dtest-004.cs">
<type name="G`1[T]">
@@ -1194,21 +1194,6 @@
<method name="Int32 Main()" attrs="150">
<size>187</size>
</method>
- <method name="Void &lt;SubtractAssignEvent&gt;m__C()" attrs="145">
- <size>12</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__F(System.Reflection.MethodInfo)" attrs="145">
- <size>20</size>
- </method>
- <method name="System.String &lt;Main&gt;m__10(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__11(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__12(Boolean)" attrs="145">
- <size>12</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -1239,9 +1224,6 @@
</method>
</type>
<type name="Tester+&lt;AddAssignCheckedTest&gt;c__AnonStorey2">
- <method name="Void &lt;&gt;m__2()" attrs="131">
- <size>234</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -1270,71 +1252,41 @@
</method>
</type>
<type name="Tester+&lt;ConvertExplicitCheckedTest&gt;c__AnonStorey3">
- <method name="Int32 &lt;&gt;m__3()" attrs="131">
- <size>81</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Tester+&lt;MultiplyCheckedTest&gt;c__AnonStorey4">
- <method name="System.Object &lt;&gt;m__5()" attrs="131">
- <size>104</size>
- </method>
- <method name="System.Object &lt;&gt;m__6()" attrs="131">
- <size>104</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Tester+&lt;MultiplyAssignCheckedTest&gt;c__AnonStorey5">
- <method name="Void &lt;&gt;m__7()" attrs="131">
- <size>234</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Tester+&lt;NegateChecked&gt;c__AnonStorey6">
- <method name="System.Object &lt;&gt;m__8()" attrs="131">
- <size>88</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Tester+&lt;SubtractCheckedTest&gt;c__AnonStorey7">
- <method name="System.Object &lt;&gt;m__9()" attrs="131">
- <size>104</size>
- </method>
- <method name="System.Object &lt;&gt;m__A()" attrs="131">
- <size>104</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Tester+&lt;SubtractAssignCheckedTest&gt;c__AnonStorey8">
- <method name="Void &lt;&gt;m__B()" attrs="131">
- <size>234</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Tester+&lt;UnaryDecrementCheckedTest&gt;c__AnonStorey9">
- <method name="Void &lt;&gt;m__D()" attrs="131">
- <size>224</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Tester+&lt;UnaryIncrementCheckedTest&gt;c__AnonStoreyA">
- <method name="Void &lt;&gt;m__E()" attrs="131">
- <size>220</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -1349,11 +1301,77 @@
<size>26</size>
</method>
</type>
+ <type name="Tester">
+ <method name="Void &lt;SubtractAssignEvent&gt;m__0()" attrs="145">
+ <size>12</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__1(System.Reflection.MethodInfo)" attrs="145">
+ <size>20</size>
+ </method>
+ <method name="System.String &lt;Main&gt;m__2(System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__3(System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__4(Boolean)" attrs="145">
+ <size>12</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;AddAssignCheckedTest&gt;c__AnonStorey2">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>234</size>
+ </method>
+ </type>
<type name="Tester+&lt;ConvertExplicitCheckedTest&gt;c__AnonStorey3">
- <method name="System.Nullable`1[System.UInt32] &lt;&gt;m__4()" attrs="131">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
+ <size>81</size>
+ </method>
+ <method name="System.Nullable`1[System.UInt32] &lt;&gt;m__1()" attrs="131">
<size>81</size>
</method>
</type>
+ <type name="Tester+&lt;MultiplyCheckedTest&gt;c__AnonStorey4">
+ <method name="System.Object &lt;&gt;m__0()" attrs="131">
+ <size>104</size>
+ </method>
+ <method name="System.Object &lt;&gt;m__1()" attrs="131">
+ <size>104</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;MultiplyAssignCheckedTest&gt;c__AnonStorey5">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>234</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NegateChecked&gt;c__AnonStorey6">
+ <method name="System.Object &lt;&gt;m__0()" attrs="131">
+ <size>88</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;SubtractCheckedTest&gt;c__AnonStorey7">
+ <method name="System.Object &lt;&gt;m__0()" attrs="131">
+ <size>104</size>
+ </method>
+ <method name="System.Object &lt;&gt;m__1()" attrs="131">
+ <size>104</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;SubtractAssignCheckedTest&gt;c__AnonStorey8">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>234</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;UnaryDecrementCheckedTest&gt;c__AnonStorey9">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>224</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;UnaryIncrementCheckedTest&gt;c__AnonStoreyA">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>220</size>
+ </method>
+ </type>
</test>
<test name="dtest-007.cs">
<type name="D">
@@ -1503,33 +1521,9 @@
<method name="Int32 Main()" attrs="150">
<size>187</size>
</method>
- <method name="Int32 &lt;InvokeTest&gt;m__1(System.String)" attrs="145">
- <size>9</size>
- </method>
- <method name="Void &lt;InvokeMember_Error&gt;m__2()" attrs="145">
- <size>112</size>
- </method>
- <method name="Void &lt;InvokeConstructor&gt;m__3(Decimal)" attrs="145">
- <size>2</size>
- </method>
<method name="Int32 &lt;IsEvent&gt;m__4()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;IsEvent&gt;m__5()" attrs="145">
<size>10</size>
</method>
- <method name="Boolean &lt;Main&gt;m__9(System.Reflection.MethodInfo)" attrs="145">
- <size>20</size>
- </method>
- <method name="System.String &lt;Main&gt;m__A(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__B(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__C(Boolean)" attrs="145">
- <size>12</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -1551,29 +1545,61 @@
</method>
</type>
<type name="Tester+&lt;MemberGetError_Null&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__6()" attrs="131">
- <size>86</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Tester+&lt;MemberSetError_Null&gt;c__AnonStorey2">
- <method name="Void &lt;&gt;m__7()" attrs="131">
- <size>96</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Tester+&lt;SetIndexError_Null&gt;c__AnonStorey3">
- <method name="Void &lt;&gt;m__8()" attrs="131">
- <size>102</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="Tester">
+ <method name="Int32 &lt;InvokeTest&gt;m__0(System.String)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Void &lt;InvokeMember_Error&gt;m__1()" attrs="145">
+ <size>112</size>
+ </method>
+ <method name="Void &lt;InvokeConstructor&gt;m__2(Decimal)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Int32 &lt;IsEvent&gt;m__3()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__5(System.Reflection.MethodInfo)" attrs="145">
+ <size>20</size>
+ </method>
+ <method name="System.String &lt;Main&gt;m__6(System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__7(System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__8(Boolean)" attrs="145">
+ <size>12</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;MemberGetError_Null&gt;c__AnonStorey1">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>86</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;MemberSetError_Null&gt;c__AnonStorey2">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>96</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;SetIndexError_Null&gt;c__AnonStorey3">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>102</size>
+ </method>
+ </type>
</test>
<test name="dtest-008.cs">
<type name="Disposable">
@@ -2781,38 +2807,46 @@
<method name="Void &lt;Test`1&gt;m__0[T](T)" attrs="145">
<size>103</size>
</method>
- <method name="Void &lt;Test3`1&gt;m__2[T](T)" attrs="145">
- <size>105</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Test2&gt;c__AnonStorey0`1[T]">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>46</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Test4&gt;c__AnonStorey2`1[T]">
- <method name="Void &lt;&gt;m__3()" attrs="131">
- <size>114</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Test2&gt;c__AnonStorey0`1+&lt;Test2&gt;c__AnonStorey1`1[T]">
- <method name="Void &lt;&gt;m__4()" attrs="131">
- <size>118</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
- <type name="C+&lt;&lt;Test3`1&gt;m__2&gt;c__DynamicSite1`1+Container0[T]">
+ <type name="C">
+ <method name="Void &lt;Test3`1&gt;m__1[T](T)" attrs="145">
+ <size>105</size>
+ </method>
+ </type>
+ <type name="C+&lt;Test2&gt;c__AnonStorey0`1[T]">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>46</size>
+ </method>
+ </type>
+ <type name="C+&lt;Test4&gt;c__AnonStorey2`1[T]">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>114</size>
+ </method>
+ </type>
+ <type name="C+&lt;Test2&gt;c__AnonStorey0`1+&lt;Test2&gt;c__AnonStorey1`1[T]">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>118</size>
+ </method>
+ </type>
+ <type name="C+&lt;&lt;Test3`1&gt;m__1&gt;c__DynamicSite1`1+Container0[T]">
<method name="Void Invoke(System.Runtime.CompilerServices.CallSite, System.Object, T ByRef)" attrs="454">
<size>0</size>
</method>
@@ -2820,7 +2854,7 @@
<size>0</size>
</method>
</type>
- <type name="C+&lt;Test4&gt;c__AnonStorey2`1+&lt;&lt;&gt;m__3&gt;c__DynamicSite0+Container0[T]">
+ <type name="C+&lt;Test4&gt;c__AnonStorey2`1+&lt;&lt;&gt;m__0&gt;c__DynamicSite0+Container0[T]">
<method name="Void Invoke(System.Runtime.CompilerServices.CallSite, System.Object, T ByRef)" attrs="454">
<size>0</size>
</method>
@@ -3016,32 +3050,36 @@
<method name="Void &lt;Using_1&gt;m__1()" attrs="145">
<size>92</size>
</method>
- <method name="Void &lt;NullableConversion&gt;m__3()" attrs="145">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;Unsafe_1&gt;c__AnonStorey0">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Tester">
+ <method name="Void &lt;NullableConversion&gt;m__2()" attrs="145">
<size>106</size>
</method>
- <method name="Boolean &lt;Main&gt;m__4(System.Reflection.MethodInfo)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__3(System.Reflection.MethodInfo)" attrs="145">
<size>20</size>
</method>
- <method name="System.String &lt;Main&gt;m__5(System.Reflection.MethodInfo)" attrs="145">
+ <method name="System.String &lt;Main&gt;m__4(System.Reflection.MethodInfo)" attrs="145">
<size>15</size>
</method>
- <method name="Boolean &lt;Main&gt;m__6(System.Reflection.MethodInfo)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__5(System.Reflection.MethodInfo)" attrs="145">
<size>15</size>
</method>
- <method name="Boolean &lt;Main&gt;m__7(Boolean)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__6(Boolean)" attrs="145">
<size>12</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
</type>
<type name="Tester+&lt;Unsafe_1&gt;c__AnonStorey0">
- <method name="Void &lt;&gt;m__2()" attrs="131">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
<size>110</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
</type>
</test>
<test name="dtest-error-02.cs">
@@ -3063,12 +3101,23 @@
</type>
<type name="Test">
<method name="Int32 Main()" attrs="150">
- <size>143</size>
+ <size>400</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="A+N">
+ <method name="Int32 get_Property()" attrs="2182">
+ <size>14</size>
+ </method>
+ <method name="Void set_Property(Int32)" attrs="2182">
+ <size>8</size>
+ </method>
+ <method name="System.String get_Item(Int32)" attrs="2177">
+ <size>14</size>
+ </method>
+ </type>
</test>
<test name="dtest-error-03.cs">
<type name="C">
@@ -8415,16 +8464,53 @@
<size>7</size>
</method>
</type>
- <type name="Test2.Test`1+&lt;Replace&gt;c__Iterator1`1[S,T]">
+ <type name="Test1.Test">
+ <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T]()" attrs="150">
+ <size>23</size>
+ </method>
+ </type>
+ <type name="Test2.Test`1[S]">
+ <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T]()" attrs="150">
+ <size>23</size>
+ </method>
+ </type>
+ <type name="Test3.Test`1[S]">
+ <method name="System.Collections.Generic.IEnumerable`1[System.Collections.Generic.KeyValuePair`2[S,T]] Replace[T](System.Collections.Generic.IEnumerable`1[T], System.Collections.Generic.IEnumerable`1[S])" attrs="150">
+ <size>23</size>
+ </method>
+ </type>
+ <type name="Test4.Test">
+ <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T]()" attrs="150">
+ <size>23</size>
+ </method>
+ </type>
+ <type name="Test5.Test">
+ <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T](T)" attrs="150">
+ <size>30</size>
+ </method>
+ </type>
+ <type name="Test6.Test">
+ <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T](T)" attrs="150">
+ <size>30</size>
+ </method>
+ </type>
+ <type name="Test7.Test">
+ <method name="System.Collections.Generic.IEnumerable`1[T[]] Replace[T](T[])" attrs="150">
+ <size>30</size>
+ </method>
+ </type>
+ <type name="Test1.Test+&lt;Replace&gt;c__Iterator0`1[T]">
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">
+ <size>26</size>
+ </method>
+ </type>
+ <type name="Test2.Test`1+&lt;Replace&gt;c__Iterator0`1[S,T]">
<method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()" attrs="2529">
<size>14</size>
</method>
<method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
<size>19</size>
</method>
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
<method name="Boolean MoveNext()" attrs="486">
<size>26</size>
</method>
@@ -8434,17 +8520,23 @@
<method name="Void Reset()" attrs="486">
<size>6</size>
</method>
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">
+ <size>26</size>
+ </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
- <type name="Test3.Test`1+&lt;Replace&gt;c__Iterator2`1[S,T]">
+ <type name="Test3.Test`1+&lt;Replace&gt;c__Iterator0`1[S,T]">
+ <method name="System.Collections.Generic.KeyValuePair`2[S,T] System.Collections.Generic.IEnumerator&lt;System.Collections.Generic.KeyValuePair&lt;S,T&gt;&gt;.get_Current()" attrs="2529">
+ <size>14</size>
+ </method>
<method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
<size>19</size>
</method>
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
<method name="Boolean MoveNext()" attrs="486">
<size>26</size>
</method>
@@ -8454,20 +8546,23 @@
<method name="Void Reset()" attrs="486">
<size>6</size>
</method>
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerator`1[System.Collections.Generic.KeyValuePair`2[S,T]] System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;S,T&gt;&gt;.GetEnumerator()" attrs="481">
+ <size>26</size>
+ </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
- <type name="Test4.Test+&lt;Replace&gt;c__Iterator3`1[T]">
+ <type name="Test4.Test+&lt;Replace&gt;c__Iterator0`1[T]">
<method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()" attrs="2529">
<size>14</size>
</method>
<method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
<size>19</size>
</method>
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
<method name="Boolean MoveNext()" attrs="486">
<size>26</size>
</method>
@@ -8477,20 +8572,23 @@
<method name="Void Reset()" attrs="486">
<size>6</size>
</method>
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">
+ <size>26</size>
+ </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
- <type name="Test5.Test+&lt;Replace&gt;c__Iterator4`1[T]">
+ <type name="Test5.Test+&lt;Replace&gt;c__Iterator0`1[T]">
<method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()" attrs="2529">
<size>14</size>
</method>
<method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
<size>19</size>
</method>
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
<method name="Boolean MoveNext()" attrs="486">
<size>77</size>
</method>
@@ -8500,20 +8598,23 @@
<method name="Void Reset()" attrs="486">
<size>6</size>
</method>
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">
+ <size>40</size>
+ </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
- <type name="Test6.Test+&lt;Replace&gt;c__Iterator5`1[T]">
+ <type name="Test6.Test+&lt;Replace&gt;c__Iterator0`1[T]">
<method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()" attrs="2529">
<size>14</size>
</method>
<method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
<size>19</size>
</method>
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
<method name="Boolean MoveNext()" attrs="486">
<size>89</size>
</method>
@@ -8523,20 +8624,23 @@
<method name="Void Reset()" attrs="486">
<size>6</size>
</method>
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">
+ <size>40</size>
+ </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
- <type name="Test7.Test+&lt;Replace&gt;c__Iterator6`1[T]">
+ <type name="Test7.Test+&lt;Replace&gt;c__Iterator0`1[T]">
<method name="T[] System.Collections.Generic.IEnumerator&lt;T[]&gt;.get_Current()" attrs="2529">
<size>14</size>
</method>
<method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
<size>14</size>
</method>
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
<method name="Boolean MoveNext()" attrs="486">
<size>89</size>
</method>
@@ -8546,82 +8650,15 @@
<method name="Void Reset()" attrs="486">
<size>6</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
- <type name="Test1.Test">
- <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T]()" attrs="150">
- <size>23</size>
- </method>
- </type>
- <type name="Test2.Test`1[S]">
- <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T]()" attrs="150">
- <size>23</size>
- </method>
- </type>
- <type name="Test3.Test`1[S]">
- <method name="System.Collections.Generic.IEnumerable`1[System.Collections.Generic.KeyValuePair`2[S,T]] Replace[T](System.Collections.Generic.IEnumerable`1[T], System.Collections.Generic.IEnumerable`1[S])" attrs="150">
- <size>23</size>
- </method>
- </type>
- <type name="Test4.Test">
- <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T]()" attrs="150">
- <size>23</size>
- </method>
- </type>
- <type name="Test5.Test">
- <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T](T)" attrs="150">
- <size>30</size>
- </method>
- </type>
- <type name="Test6.Test">
- <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T](T)" attrs="150">
- <size>30</size>
- </method>
- </type>
- <type name="Test7.Test">
- <method name="System.Collections.Generic.IEnumerable`1[T[]] Replace[T](T[])" attrs="150">
- <size>30</size>
- </method>
- </type>
- <type name="Test1.Test+&lt;Replace&gt;c__Iterator0`1[T]">
- <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">
- <size>26</size>
- </method>
- </type>
- <type name="Test2.Test`1+&lt;Replace&gt;c__Iterator1`1[S,T]">
- <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">
- <size>26</size>
- </method>
- </type>
- <type name="Test3.Test`1+&lt;Replace&gt;c__Iterator2`1[S,T]">
- <method name="System.Collections.Generic.KeyValuePair`2[S,T] System.Collections.Generic.IEnumerator&lt;System.Collections.Generic.KeyValuePair&lt;S,T&gt;&gt;.get_Current()" attrs="2529">
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
<size>14</size>
</method>
- <method name="System.Collections.Generic.IEnumerator`1[System.Collections.Generic.KeyValuePair`2[S,T]] System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;S,T&gt;&gt;.GetEnumerator()" attrs="481">
- <size>26</size>
- </method>
- </type>
- <type name="Test4.Test+&lt;Replace&gt;c__Iterator3`1[T]">
- <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">
- <size>26</size>
- </method>
- </type>
- <type name="Test5.Test+&lt;Replace&gt;c__Iterator4`1[T]">
- <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">
- <size>40</size>
- </method>
- </type>
- <type name="Test6.Test+&lt;Replace&gt;c__Iterator5`1[T]">
- <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">
- <size>40</size>
- </method>
- </type>
- <type name="Test7.Test+&lt;Replace&gt;c__Iterator6`1[T]">
<method name="System.Collections.Generic.IEnumerator`1[T[]] System.Collections.Generic.IEnumerable&lt;T[]&gt;.GetEnumerator()" attrs="481">
<size>40</size>
</method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
</type>
</test>
<test name="gtest-192.cs">
@@ -8687,16 +8724,23 @@
<size>7</size>
</method>
</type>
- <type name="RedBlackTree`1+&lt;EnumerateRange&gt;c__Iterator1[S]">
+ <type name="OrderedMultiDictionary`2[T,U]">
+ <method name="System.Collections.Generic.IEnumerator`1[T] EnumerateKeys(RedBlackTree`1+RangeTester[System.Collections.Generic.KeyValuePair`2[T,U]])" attrs="129">
+ <size>29</size>
+ </method>
+ </type>
+ <type name="RedBlackTree`1[S]">
+ <method name="System.Collections.Generic.IEnumerable`1[S] EnumerateRange(RedBlackTree`1+RangeTester[S])" attrs="134">
+ <size>23</size>
+ </method>
+ </type>
+ <type name="RedBlackTree`1+&lt;EnumerateRange&gt;c__Iterator0[S]">
<method name="S System.Collections.Generic.IEnumerator&lt;S&gt;.get_Current()" attrs="2529">
<size>14</size>
</method>
<method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
<size>19</size>
</method>
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
<method name="Boolean MoveNext()" attrs="486">
<size>26</size>
</method>
@@ -8706,24 +8750,15 @@
<method name="Void Reset()" attrs="486">
<size>6</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
- <type name="OrderedMultiDictionary`2[T,U]">
- <method name="System.Collections.Generic.IEnumerator`1[T] EnumerateKeys(RedBlackTree`1+RangeTester[System.Collections.Generic.KeyValuePair`2[T,U]])" attrs="129">
- <size>29</size>
- </method>
- </type>
- <type name="RedBlackTree`1[S]">
- <method name="System.Collections.Generic.IEnumerable`1[S] EnumerateRange(RedBlackTree`1+RangeTester[S])" attrs="134">
- <size>23</size>
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
</method>
- </type>
- <type name="RedBlackTree`1+&lt;EnumerateRange&gt;c__Iterator1[S]">
<method name="System.Collections.Generic.IEnumerator`1[S] System.Collections.Generic.IEnumerable&lt;S&gt;.GetEnumerator()" attrs="481">
<size>26</size>
</method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
</type>
</test>
<test name="gtest-194.cs">
@@ -8782,7 +8817,22 @@
<size>7</size>
</method>
</type>
- <type name="OrderedMultiDictionary`2+&lt;EnumerateKeys&gt;c__Iterator1[T,U]">
+ <type name="RedBlackTree`1[S]">
+ <method name="System.Collections.Generic.IEnumerable`1[S] EnumerateRange(RedBlackTree`1+RangeTester[S])" attrs="134">
+ <size>23</size>
+ </method>
+ </type>
+ <type name="OrderedMultiDictionary`2[T,U]">
+ <method name="System.Collections.Generic.IEnumerator`1[T] EnumerateKeys(RedBlackTree`1+RangeTester[System.Collections.Generic.KeyValuePair`2[T,U]])" attrs="129">
+ <size>29</size>
+ </method>
+ </type>
+ <type name="RedBlackTree`1+&lt;EnumerateRange&gt;c__Iterator0[S]">
+ <method name="System.Collections.Generic.IEnumerator`1[S] System.Collections.Generic.IEnumerable&lt;S&gt;.GetEnumerator()" attrs="481">
+ <size>26</size>
+ </method>
+ </type>
+ <type name="OrderedMultiDictionary`2+&lt;EnumerateKeys&gt;c__Iterator0[T,U]">
<method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()" attrs="2529">
<size>14</size>
</method>
@@ -8802,21 +8852,6 @@
<size>7</size>
</method>
</type>
- <type name="RedBlackTree`1[S]">
- <method name="System.Collections.Generic.IEnumerable`1[S] EnumerateRange(RedBlackTree`1+RangeTester[S])" attrs="134">
- <size>23</size>
- </method>
- </type>
- <type name="OrderedMultiDictionary`2[T,U]">
- <method name="System.Collections.Generic.IEnumerator`1[T] EnumerateKeys(RedBlackTree`1+RangeTester[System.Collections.Generic.KeyValuePair`2[T,U]])" attrs="129">
- <size>29</size>
- </method>
- </type>
- <type name="RedBlackTree`1+&lt;EnumerateRange&gt;c__Iterator0[S]">
- <method name="System.Collections.Generic.IEnumerator`1[S] System.Collections.Generic.IEnumerable&lt;S&gt;.GetEnumerator()" attrs="481">
- <size>26</size>
- </method>
- </type>
</test>
<test name="gtest-195.cs">
<type name="OrderedMultiDictionary`2[T,U]">
@@ -9339,97 +9374,6 @@
</method>
</type>
</test>
- <test name="gtest-217.cs">
- <type name="Fun`2[A1,R]">
- <method name="R Invoke(A1)" attrs="454">
- <size>0</size>
- </method>
- <method name="IAsyncResult BeginInvoke(A1, System.AsyncCallback, System.Object)" attrs="454">
- <size>0</size>
- </method>
- <method name="R EndInvoke(IAsyncResult)" attrs="454">
- <size>0</size>
- </method>
- <method name="Void .ctor(Object, IntPtr)" attrs="6278">
- <size>0</size>
- </method>
- </type>
- <type name="MyTest">
- <method name="Void Main(System.String[])" attrs="150">
- <size>99</size>
- </method>
- <method name="System.String &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>22</size>
- </method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
- <type name="MyTest+&lt;Map&gt;c__Iterator0`4[Aa,Af,Rf,Rr]">
- <method name="Rr System.Collections.Generic.IEnumerator&lt;Rr&gt;.get_Current()" attrs="2529">
- <size>14</size>
- </method>
- <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
- <size>19</size>
- </method>
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
- <method name="Boolean MoveNext()" attrs="486">
- <size>215</size>
- </method>
- <method name="Void Dispose()" attrs="486">
- <size>69</size>
- </method>
- <method name="Void Reset()" attrs="486">
- <size>6</size>
- </method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
- <type name="MyTest+&lt;FromTo&gt;c__Iterator1">
- <method name="Int32 System.Collections.Generic.IEnumerator&lt;int&gt;.get_Current()" attrs="2529">
- <size>14</size>
- </method>
- <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
- <size>19</size>
- </method>
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
- <method name="Boolean MoveNext()" attrs="486">
- <size>125</size>
- </method>
- <method name="Void Dispose()" attrs="486">
- <size>15</size>
- </method>
- <method name="Void Reset()" attrs="486">
- <size>6</size>
- </method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
- <type name="MyTest">
- <method name="System.Collections.Generic.IEnumerable`1[Rr] Map[Aa,Af,Rf,Rr](Fun`2[Af,Rf], System.Collections.Generic.IEnumerable`1[Aa])" attrs="150">
- <size>37</size>
- </method>
- <method name="System.Collections.Generic.IEnumerable`1[System.Int32] FromTo(Int32, Int32)" attrs="150">
- <size>37</size>
- </method>
- </type>
- <type name="MyTest+&lt;Map&gt;c__Iterator0`4[Aa,Af,Rf,Rr]">
- <method name="System.Collections.Generic.IEnumerator`1[Rr] System.Collections.Generic.IEnumerable&lt;Rr&gt;.GetEnumerator()" attrs="481">
- <size>52</size>
- </method>
- </type>
- <type name="MyTest+&lt;FromTo&gt;c__Iterator1">
- <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">
- <size>52</size>
- </method>
- </type>
- </test>
<test name="gtest-218.cs">
<type name="Foo">
<method name="Void .ctor()" attrs="6278">
@@ -10084,26 +10028,6 @@
<size>7</size>
</method>
</type>
- <type name="HashSet`1+&lt;GetEnumerator&gt;c__Iterator1[T]">
- <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()" attrs="2529">
- <size>14</size>
- </method>
- <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
- <size>19</size>
- </method>
- <method name="Boolean MoveNext()" attrs="486">
- <size>26</size>
- </method>
- <method name="Void Dispose()" attrs="486">
- <size>1</size>
- </method>
- <method name="Void Reset()" attrs="486">
- <size>6</size>
- </method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
<type name="EnumerableBase`1[T]">
<method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="1478">
<size>0</size>
@@ -10130,6 +10054,26 @@
<size>15</size>
</method>
</type>
+ <type name="HashSet`1+&lt;GetEnumerator&gt;c__Iterator0[T]">
+ <method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()" attrs="2529">
+ <size>14</size>
+ </method>
+ <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
+ <size>19</size>
+ </method>
+ <method name="Boolean MoveNext()" attrs="486">
+ <size>26</size>
+ </method>
+ <method name="Void Dispose()" attrs="486">
+ <size>1</size>
+ </method>
+ <method name="Void Reset()" attrs="486">
+ <size>6</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
</test>
<test name="gtest-248.cs">
<type name="Foo`1[T]">
@@ -11783,12 +11727,12 @@
</method>
</type>
<type name="Test+&lt;WrapMyComparison&gt;c__AnonStorey1`1[W]">
- <method name="Int32 &lt;&gt;m__1(W, W)" attrs="131">
- <size>22</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Int32 &lt;&gt;m__0(W, W)" attrs="131">
+ <size>22</size>
+ </method>
</type>
</test>
<test name="gtest-309.cs">
@@ -12181,12 +12125,12 @@
</method>
</type>
<type name="B+&lt;C&gt;c__AnonStorey1+&lt;C&gt;c__AnonStorey0">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>58</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>58</size>
+ </method>
</type>
</test>
<test name="gtest-325.cs">
@@ -13569,88 +13513,6 @@
</method>
</type>
</test>
- <test name="gtest-381.cs">
- <type name="TestGoto">
- <method name="Void Main(System.String[])" attrs="150">
- <size>71</size>
- </method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- <method name="Void .cctor()" attrs="6289">
- <size>7</size>
- </method>
- </type>
- <type name="TestGoto+&lt;setX&gt;c__Iterator0">
- <method name="Boolean System.Collections.Generic.IEnumerator&lt;bool&gt;.get_Current()" attrs="2529">
- <size>14</size>
- </method>
- <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
- <size>19</size>
- </method>
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
- <method name="Boolean MoveNext()" attrs="486">
- <size>115</size>
- </method>
- <method name="Void Dispose()" attrs="486">
- <size>53</size>
- </method>
- <method name="Void Reset()" attrs="486">
- <size>6</size>
- </method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
- <type name="TestGoto+&lt;test&gt;c__Iterator1">
- <method name="Boolean System.Collections.Generic.IEnumerator&lt;bool&gt;.get_Current()" attrs="2529">
- <size>14</size>
- </method>
- <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
- <size>19</size>
- </method>
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
- <method name="Boolean MoveNext()" attrs="486">
- <size>189</size>
- </method>
- <method name="Void Dispose()" attrs="486">
- <size>69</size>
- </method>
- <method name="Void Reset()" attrs="486">
- <size>6</size>
- </method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
- <type name="TestGoto+&lt;setX&gt;c__Iterator0">
- <method name="Void &lt;&gt;__Finally0()" attrs="129">
- <size>9</size>
- </method>
- </type>
- <type name="TestGoto">
- <method name="System.Collections.Generic.IEnumerable`1[System.Boolean] setX()" attrs="145">
- <size>23</size>
- </method>
- <method name="System.Collections.Generic.IEnumerable`1[System.Boolean] test()" attrs="145">
- <size>23</size>
- </method>
- </type>
- <type name="TestGoto+&lt;setX&gt;c__Iterator0">
- <method name="System.Collections.Generic.IEnumerator`1[System.Boolean] System.Collections.Generic.IEnumerable&lt;bool&gt;.GetEnumerator()" attrs="481">
- <size>26</size>
- </method>
- </type>
- <type name="TestGoto+&lt;test&gt;c__Iterator1">
- <method name="System.Collections.Generic.IEnumerator`1[System.Boolean] System.Collections.Generic.IEnumerable&lt;bool&gt;.GetEnumerator()" attrs="481">
- <size>26</size>
- </method>
- </type>
- </test>
<test name="gtest-382.cs">
<type name="C">
<method name="Int32 Main()" attrs="150">
@@ -17171,6 +17033,9 @@
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void BrokenLiftedNull()" attrs="129">
+ <size>82</size>
+ </method>
</type>
</test>
<test name="gtest-541.cs">
@@ -17307,7 +17172,23 @@
</type>
<type name="Program">
<method name="Int32 Main()" attrs="150">
- <size>64</size>
+ <size>78</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="A3`1[T]">
+ <method name="Void Foo[U]()" attrs="1478">
+ <size>0</size>
+ </method>
+ <method name="Void .ctor()" attrs="6276">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="B3">
+ <method name="Void Foo[Y]()" attrs="198">
+ <size>2</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -18148,11 +18029,14 @@
</type>
<type name="C">
<method name="Int32 Main()" attrs="150">
- <size>34</size>
+ <size>80</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Boolean Test_2[T2](T2[])" attrs="145">
+ <size>18</size>
+ </method>
</type>
</test>
<test name="gtest-580.cs">
@@ -18346,6 +18230,300 @@
</method>
</type>
</test>
+ <test name="gtest-589.cs">
+ <type name="Z">
+ <method name="Z Start()" attrs="134">
+ <size>10</size>
+ </method>
+ <method name="Z IGenericInterface&lt;Z&gt;.Start()" attrs="481">
+ <size>7</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="A`1[T]">
+ <method name="Void SomeOperation(T)" attrs="134">
+ <size>16</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="Int32 IGenericInterface&lt;int&gt;.Start()" attrs="481">
+ <size>7</size>
+ </method>
+ <method name="Void Main()" attrs="150">
+ <size>17</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-590.cs">
+ <type name="C">
+ <method name="Void Main()" attrs="150">
+ <size>132</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-591.cs">
+ <type name="E">
+ <method name="Void Main()" attrs="150">
+ <size>19</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-592.cs">
+ <type name="Tests">
+ <method name="Void A[T](System.Collections.Generic.IReadOnlyCollection`1[T])" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void B[T](System.Collections.Generic.IReadOnlyList`1[T])" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Main()" attrs="150">
+ <size>51</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-593.cs">
+ <type name="Parser`2[D1,DR1]">
+ <method name="System.Tuple`2[D1,DR1] Invoke(D1)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="IAsyncResult BeginInvoke(D1, System.AsyncCallback, System.Object)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="System.Tuple`2[D1,DR1] EndInvoke(IAsyncResult)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="Void .ctor(Object, IntPtr)" attrs="6278">
+ <size>0</size>
+ </method>
+ </type>
+ <type name="Combinator">
+ <method name="Parser`2[L1,LR1] Lazy[L1,LR1](System.Func`1[Parser`2[L1,LR1]])" attrs="150">
+ <size>10</size>
+ </method>
+ <method name="Parser`2[C1,CR1] Choice[C1,CR1](Parser`2[C1,CR1])" attrs="150">
+ <size>41</size>
+ </method>
+ <method name="Void Main()" attrs="150">
+ <size>37</size>
+ </method>
+ </type>
+ <type name="Combinator+&lt;Choice&gt;c__AnonStorey0`2[C1,CR1]">
+ <method name="Parser`2[C1,CR1] &lt;&gt;m__0()" attrs="131">
+ <size>19</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Combinator">
+ <method name="System.Tuple`2[System.Int32,System.Int32] &lt;Main&gt;m__0(Int32)" attrs="145">
+ <size>15</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-594.cs">
+ <type name="C">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Y">
+ <method name="Void Foo[T]()" attrs="486">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="X">
+ <method name="Void Main()" attrs="150">
+ <size>8</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-595.cs">
+ <type name="MainClass">
+ <method name="Int32 Main()" attrs="150">
+ <size>66</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="MainClass+TypeConverter`2[TIn,TOut]">
+ <method name="Boolean Convert(TIn)" attrs="150">
+ <size>34</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-596.cs">
+ <type name="X">
+ <method name="Artist get_Artist()" attrs="2182">
+ <size>14</size>
+ </method>
+ <method name="Void set_Artist(Artist)" attrs="2182">
+ <size>8</size>
+ </method>
+ <method name="Void Main()" attrs="150">
+ <size>36</size>
+ </method>
+ <method name="Void Test[T1,T2](System.Func`2[T1,T2])" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Test[T1,T2](System.Func`3[T1,System.Int32,T2])" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Artist">
+ <method name="Artist FromToken(System.String)" attrs="150">
+ <size>10</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-597.cs">
+ <type name="Test.MainClass">
+ <method name="Int32 Main()" attrs="150">
+ <size>63</size>
+ </method>
+ <method name="Boolean Test_1[T](Test.Templated`1[T])" attrs="145">
+ <size>18</size>
+ </method>
+ <method name="Boolean Test_2[U](Test.IA`1[U])" attrs="145">
+ <size>18</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Test.Templated`1[T]">
+ <method name="Void .ctor()" attrs="6276">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Test.Derived">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-598.cs">
+ <type name="A">
+ <method name="T Test[T](T)" attrs="454">
+ <size>7</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="B">
+ <method name="T Test[T](T)" attrs="198">
+ <size>28</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="T Test[T](T)" attrs="198">
+ <size>30</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="AG`1[U]">
+ <method name="T Test[T](T, U)" attrs="454">
+ <size>7</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="B`1[UB]">
+ <method name="T Test[T](T, UB)" attrs="198">
+ <size>28</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="C`1[UC]">
+ <method name="T Test[T](T, UC)" attrs="198">
+ <size>39</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="X">
+ <method name="Void Main()" attrs="150">
+ <size>27</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-599.cs">
+ <type name="A`1[X]">
+ <method name="T Test[T](T, X)" attrs="1478">
+ <size>0</size>
+ </method>
+ <method name="Void .ctor()" attrs="6276">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="B">
+ <method name="T Test[T](T, Char)" attrs="198">
+ <size>28</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="T Test[T](T, Char)" attrs="198">
+ <size>32</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="X">
+ <method name="Void Main()" attrs="150">
+ <size>16</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">
@@ -18827,12 +19005,6 @@
<method name="Void Main()" attrs="150">
<size>182</size>
</method>
- <method name="Boolean &lt;Main&gt;m__1(&lt;&gt;__AnonType0`2[System.String,System.Reflection.PropertyInfo])" attrs="145">
- <size>21</size>
- </method>
- <method name="System.String &lt;Main&gt;m__2(&lt;&gt;__AnonType0`2[System.String,System.Reflection.PropertyInfo])" attrs="145">
- <size>15</size>
- </method>
</type>
<type name="Test+&lt;Select&gt;c__Iterator0`1[T]">
<method name="T System.Collections.Generic.IEnumerator&lt;T&gt;.get_Current()" attrs="2529">
@@ -18895,6 +19067,14 @@
<size>52</size>
</method>
</type>
+ <type name="Test">
+ <method name="Boolean &lt;Main&gt;m__0(&lt;&gt;__AnonType0`2[System.String,System.Reflection.PropertyInfo])" attrs="145">
+ <size>21</size>
+ </method>
+ <method name="System.String &lt;Main&gt;m__1(&lt;&gt;__AnonType0`2[System.String,System.Reflection.PropertyInfo])" attrs="145">
+ <size>15</size>
+ </method>
+ </type>
</test>
<test name="gtest-autoproperty-01.cs">
<type name="Test">
@@ -19105,6 +19285,27 @@
</method>
</type>
</test>
+ <test name="gtest-autoproperty-08.cs">
+ <type name="AAttribute">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Program">
+ <method name="Int32 get_Prop()" attrs="2182">
+ <size>14</size>
+ </method>
+ <method name="Void set_Prop(Int32)" attrs="2182">
+ <size>8</size>
+ </method>
+ <method name="Int32 Main()" attrs="150">
+ <size>48</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="gtest-collectioninit-01.cs">
<type name="Test">
<method name="Void TestList(System.Collections.Generic.List`1[System.Int32], Int32)" attrs="145">
@@ -21941,6 +22142,43 @@
</method>
</type>
</test>
+ <test name="gtest-exmethod-47.cs">
+ <type name="D">
+ <method name="Void Invoke()" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="Void EndInvoke(IAsyncResult)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="Void .ctor(Object, IntPtr)" attrs="6278">
+ <size>0</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="Void Main()" attrs="145">
+ <size>21</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="S">
+ <method name="Void Foo(Int32)" attrs="134">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Extension">
+ <method name="Void Foo(S)" attrs="150">
+ <size>2</size>
+ </method>
+ </type>
+ </test>
<test name="gtest-fixedbuffer-01.cs">
<type name="TestNew">
<method name="Void SetTest()" attrs="134">
@@ -23253,16 +23491,28 @@
<size>7</size>
</method>
</type>
- <type name="X+&lt;GetIt&gt;c__Iterator1">
+ <type name="S">
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] GetIt()" attrs="134">
+ <size>35</size>
+ </method>
+ </type>
+ <type name="X">
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] GetIt()" attrs="129">
+ <size>30</size>
+ </method>
+ </type>
+ <type name="S+&lt;GetIt&gt;c__Iterator0">
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">
+ <size>40</size>
+ </method>
+ </type>
+ <type name="X+&lt;GetIt&gt;c__Iterator0">
<method name="Int32 System.Collections.Generic.IEnumerator&lt;int&gt;.get_Current()" attrs="2529">
<size>14</size>
</method>
<method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
<size>19</size>
</method>
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
<method name="Boolean MoveNext()" attrs="486">
<size>93</size>
</method>
@@ -23272,28 +23522,14 @@
<method name="Void Reset()" attrs="486">
<size>6</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
- <type name="S">
- <method name="System.Collections.Generic.IEnumerable`1[System.Int32] GetIt()" attrs="134">
- <size>35</size>
- </method>
- </type>
- <type name="X">
- <method name="System.Collections.Generic.IEnumerable`1[System.Int32] GetIt()" attrs="129">
- <size>30</size>
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
</method>
- </type>
- <type name="S+&lt;GetIt&gt;c__Iterator0">
<method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">
<size>40</size>
</method>
- </type>
- <type name="X+&lt;GetIt&gt;c__Iterator1">
- <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">
- <size>40</size>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
</method>
</type>
</test>
@@ -23392,16 +23628,39 @@
<size>7</size>
</method>
</type>
- <type name="Test.Derived+&lt;GetStuff&gt;c__Iterator1">
+ <type name="Test.Base">
+ <method name="System.Collections.Generic.IEnumerable`1[Test.Base] GetStuff(Int32)" attrs="454">
+ <size>30</size>
+ </method>
+ </type>
+ <type name="Test.Derived">
+ <method name="System.Collections.Generic.IEnumerable`1[Test.Base] GetStuff(Int32)" attrs="198">
+ <size>37</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerable`1[Test.Base] &lt;GetStuff&gt;__BaseCallProxy0(Int32)" attrs="129">
+ <size>15</size>
+ </method>
+ </type>
+ <type name="Test.SpecialDerived">
+ <method name="System.Collections.Generic.IEnumerable`1[Test.Base] GetStuff(Int32)" attrs="198">
+ <size>37</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerable`1[Test.Base] &lt;GetStuff&gt;__BaseCallProxy0(Int32)" attrs="129">
+ <size>15</size>
+ </method>
+ </type>
+ <type name="Test.Base+&lt;GetStuff&gt;c__Iterator0">
+ <method name="System.Collections.Generic.IEnumerator`1[Test.Base] System.Collections.Generic.IEnumerable&lt;Test.Base&gt;.GetEnumerator()" attrs="481">
+ <size>40</size>
+ </method>
+ </type>
+ <type name="Test.Derived+&lt;GetStuff&gt;c__Iterator0">
<method name="Test.Base System.Collections.Generic.IEnumerator&lt;Test.Base&gt;.get_Current()" attrs="2529">
<size>14</size>
</method>
<method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
<size>14</size>
</method>
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
<method name="Boolean MoveNext()" attrs="486">
<size>195</size>
</method>
@@ -23411,20 +23670,23 @@
<method name="Void Reset()" attrs="486">
<size>6</size>
</method>
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerator`1[Test.Base] System.Collections.Generic.IEnumerable&lt;Test.Base&gt;.GetEnumerator()" attrs="481">
+ <size>52</size>
+ </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
- <type name="Test.SpecialDerived+&lt;GetStuff&gt;c__Iterator2">
+ <type name="Test.SpecialDerived+&lt;GetStuff&gt;c__Iterator0">
<method name="Test.Base System.Collections.Generic.IEnumerator&lt;Test.Base&gt;.get_Current()" attrs="2529">
<size>14</size>
</method>
<method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
<size>14</size>
</method>
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
<method name="Boolean MoveNext()" attrs="486">
<size>195</size>
</method>
@@ -23434,44 +23696,14 @@
<method name="Void Reset()" attrs="486">
<size>6</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
- <type name="Test.Base">
- <method name="System.Collections.Generic.IEnumerable`1[Test.Base] GetStuff(Int32)" attrs="454">
- <size>30</size>
- </method>
- </type>
- <type name="Test.Derived">
- <method name="System.Collections.Generic.IEnumerable`1[Test.Base] GetStuff(Int32)" attrs="198">
- <size>37</size>
- </method>
- <method name="System.Collections.Generic.IEnumerable`1[Test.Base] &lt;GetStuff&gt;__BaseCallProxy0(Int32)" attrs="129">
- <size>15</size>
- </method>
- </type>
- <type name="Test.SpecialDerived">
- <method name="System.Collections.Generic.IEnumerable`1[Test.Base] GetStuff(Int32)" attrs="198">
- <size>37</size>
- </method>
- <method name="System.Collections.Generic.IEnumerable`1[Test.Base] &lt;GetStuff&gt;__BaseCallProxy0(Int32)" attrs="129">
- <size>15</size>
- </method>
- </type>
- <type name="Test.Base+&lt;GetStuff&gt;c__Iterator0">
- <method name="System.Collections.Generic.IEnumerator`1[Test.Base] System.Collections.Generic.IEnumerable&lt;Test.Base&gt;.GetEnumerator()" attrs="481">
- <size>40</size>
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
</method>
- </type>
- <type name="Test.Derived+&lt;GetStuff&gt;c__Iterator1">
<method name="System.Collections.Generic.IEnumerator`1[Test.Base] System.Collections.Generic.IEnumerable&lt;Test.Base&gt;.GetEnumerator()" attrs="481">
<size>52</size>
</method>
- </type>
- <type name="Test.SpecialDerived+&lt;GetStuff&gt;c__Iterator2">
- <method name="System.Collections.Generic.IEnumerator`1[Test.Base] System.Collections.Generic.IEnumerable&lt;Test.Base&gt;.GetEnumerator()" attrs="481">
- <size>52</size>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
</method>
</type>
</test>
@@ -23834,9 +24066,6 @@
</method>
</type>
<type name="C+&lt;Test_2&gt;c__Iterator1+&lt;Test_2&gt;c__AnonStorey3">
- <method name="Int32 &lt;&gt;m__1()" attrs="131">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -23859,6 +24088,11 @@
<size>26</size>
</method>
</type>
+ <type name="C+&lt;Test_2&gt;c__Iterator1+&lt;Test_2&gt;c__AnonStorey3">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
+ <size>14</size>
+ </method>
+ </type>
</test>
<test name="gtest-iter-24.cs">
<type name="B">
@@ -24163,6 +24397,270 @@
</method>
</type>
</test>
+ <test name="gtest-iter-30.cs">
+ <type name="Program">
+ <method name="Void Main()" attrs="150">
+ <size>68</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="M">
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test()" attrs="134">
+ <size>30</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="M+&lt;Test&gt;c__Iterator0">
+ <method name="Int32 System.Collections.Generic.IEnumerator&lt;int&gt;.get_Current()" attrs="2529">
+ <size>14</size>
+ </method>
+ <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
+ <size>19</size>
+ </method>
+ <method name="Boolean MoveNext()" attrs="486">
+ <size>101</size>
+ </method>
+ <method name="Void Dispose()" attrs="486">
+ <size>15</size>
+ </method>
+ <method name="Void Reset()" attrs="486">
+ <size>6</size>
+ </method>
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">
+ <size>40</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>57</size>
+ </method>
+ </type>
+ <type name="M+&lt;Test&gt;c__Iterator0+&lt;Test&gt;c__AnonStorey1">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>24</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-iter-31.cs">
+ <type name="B">
+ <method name="System.Object Foo(System.Object)" attrs="134">
+ <size>10</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="Void Main()" attrs="150">
+ <size>62</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerable`1[System.UInt16] Test()" attrs="129">
+ <size>30</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>18</size>
+ </method>
+ </type>
+ <type name="C+&lt;Test&gt;c__Iterator0">
+ <method name="UInt16 System.Collections.Generic.IEnumerator&lt;ushort&gt;.get_Current()" attrs="2529">
+ <size>14</size>
+ </method>
+ <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
+ <size>19</size>
+ </method>
+ <method name="Boolean MoveNext()" attrs="486">
+ <size>81</size>
+ </method>
+ <method name="Void Dispose()" attrs="486">
+ <size>1</size>
+ </method>
+ <method name="Void Reset()" attrs="486">
+ <size>6</size>
+ </method>
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerator`1[System.UInt16] System.Collections.Generic.IEnumerable&lt;ushort&gt;.GetEnumerator()" attrs="481">
+ <size>40</size>
+ </method>
+ <method name="System.Object &lt;&gt;m__0(System.String)" attrs="131">
+ <size>25</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-iter-32.cs">
+ <type name="TestGoto">
+ <method name="Void Main(System.String[])" attrs="150">
+ <size>71</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerable`1[System.Boolean] setX()" attrs="145">
+ <size>23</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerable`1[System.Boolean] test()" attrs="145">
+ <size>23</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="Void .cctor()" attrs="6289">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="TestGoto+&lt;setX&gt;c__Iterator0">
+ <method name="Boolean System.Collections.Generic.IEnumerator&lt;bool&gt;.get_Current()" attrs="2529">
+ <size>14</size>
+ </method>
+ <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
+ <size>19</size>
+ </method>
+ <method name="Boolean MoveNext()" attrs="486">
+ <size>115</size>
+ </method>
+ <method name="Void Dispose()" attrs="486">
+ <size>53</size>
+ </method>
+ <method name="Void Reset()" attrs="486">
+ <size>6</size>
+ </method>
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerator`1[System.Boolean] System.Collections.Generic.IEnumerable&lt;bool&gt;.GetEnumerator()" attrs="481">
+ <size>26</size>
+ </method>
+ <method name="Void &lt;&gt;__Finally0()" attrs="129">
+ <size>9</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="TestGoto+&lt;test&gt;c__Iterator1">
+ <method name="Boolean System.Collections.Generic.IEnumerator&lt;bool&gt;.get_Current()" attrs="2529">
+ <size>14</size>
+ </method>
+ <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
+ <size>19</size>
+ </method>
+ <method name="Boolean MoveNext()" attrs="486">
+ <size>189</size>
+ </method>
+ <method name="Void Dispose()" attrs="486">
+ <size>69</size>
+ </method>
+ <method name="Void Reset()" attrs="486">
+ <size>6</size>
+ </method>
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerator`1[System.Boolean] System.Collections.Generic.IEnumerable&lt;bool&gt;.GetEnumerator()" attrs="481">
+ <size>26</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-iter-33.cs">
+ <type name="Fun`2[A1,R]">
+ <method name="R Invoke(A1)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="IAsyncResult BeginInvoke(A1, System.AsyncCallback, System.Object)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="R EndInvoke(IAsyncResult)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="Void .ctor(Object, IntPtr)" attrs="6278">
+ <size>0</size>
+ </method>
+ </type>
+ <type name="MyTest">
+ <method name="Void Main(System.String[])" attrs="150">
+ <size>99</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerable`1[Rr] Map[Aa,Af,Rf,Rr](Fun`2[Af,Rf], System.Collections.Generic.IEnumerable`1[Aa])" attrs="150">
+ <size>37</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] FromTo(Int32, Int32)" attrs="150">
+ <size>37</size>
+ </method>
+ <method name="System.String &lt;Main&gt;m__0(Int32)" attrs="145">
+ <size>22</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="MyTest+&lt;Map&gt;c__Iterator0`4[Aa,Af,Rf,Rr]">
+ <method name="Rr System.Collections.Generic.IEnumerator&lt;Rr&gt;.get_Current()" attrs="2529">
+ <size>14</size>
+ </method>
+ <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
+ <size>19</size>
+ </method>
+ <method name="Boolean MoveNext()" attrs="486">
+ <size>215</size>
+ </method>
+ <method name="Void Dispose()" attrs="486">
+ <size>69</size>
+ </method>
+ <method name="Void Reset()" attrs="486">
+ <size>6</size>
+ </method>
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerator`1[Rr] System.Collections.Generic.IEnumerable&lt;Rr&gt;.GetEnumerator()" attrs="481">
+ <size>52</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="MyTest+&lt;FromTo&gt;c__Iterator1">
+ <method name="Int32 System.Collections.Generic.IEnumerator&lt;int&gt;.get_Current()" attrs="2529">
+ <size>14</size>
+ </method>
+ <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
+ <size>19</size>
+ </method>
+ <method name="Boolean MoveNext()" attrs="486">
+ <size>125</size>
+ </method>
+ <method name="Void Dispose()" attrs="486">
+ <size>15</size>
+ </method>
+ <method name="Void Reset()" attrs="486">
+ <size>6</size>
+ </method>
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">
+ <size>52</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="gtest-lambda-01.cs">
<type name="IntFunc">
<method name="Int32 Invoke(Int32)" attrs="454">
@@ -24202,21 +24700,25 @@
<method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">
<size>11</size>
</method>
- <method name="Void &lt;Main&gt;m__3(Int32)" attrs="145">
- <size>9</size>
- </method>
<method name="Void .ctor(Int32)" attrs="6273">
<size>14</size>
</method>
</type>
<type name="X+&lt;Main&gt;c__AnonStorey0">
- <method name="Void &lt;&gt;m__2(Int32)" attrs="131">
- <size>9</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="X">
+ <method name="Void &lt;Main&gt;m__2(Int32)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="X+&lt;Main&gt;c__AnonStorey0">
+ <method name="Void &lt;&gt;m__0(Int32)" attrs="131">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="gtest-lambda-02.cs">
<type name="funcs">
@@ -24395,21 +24897,25 @@
</method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey0">
- <method name="System.String &lt;&gt;m__2(System.String)" attrs="131">
- <size>19</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey1">
- <method name="Int32 &lt;&gt;m__3(Int32)" attrs="131">
- <size>18</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="C+&lt;Main&gt;c__AnonStorey0">
+ <method name="System.String &lt;&gt;m__0(System.String)" attrs="131">
+ <size>19</size>
+ </method>
+ </type>
+ <type name="C+&lt;Main&gt;c__AnonStorey1">
+ <method name="Int32 &lt;&gt;m__0(Int32)" attrs="131">
+ <size>18</size>
+ </method>
+ </type>
</test>
<test name="gtest-lambda-06.cs">
<type name="TestClass">
@@ -24491,21 +24997,25 @@
</method>
</type>
<type name="TestClass+&lt;Main&gt;c__AnonStorey0">
- <method name="Void &lt;&gt;m__1(T)" attrs="131">
- <size>38</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="TestClass+&lt;Main&gt;c__AnonStorey0+&lt;Main&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__2(F)" attrs="131">
- <size>77</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="TestClass+&lt;Main&gt;c__AnonStorey0">
+ <method name="Void &lt;&gt;m__0(T)" attrs="131">
+ <size>38</size>
+ </method>
+ </type>
+ <type name="TestClass+&lt;Main&gt;c__AnonStorey0+&lt;Main&gt;c__AnonStorey1">
+ <method name="Void &lt;&gt;m__0(F)" attrs="131">
+ <size>77</size>
+ </method>
+ </type>
</test>
<test name="gtest-lambda-07.cs">
<type name="D">
@@ -24818,16 +25328,16 @@
<method name="Void Main()" attrs="150">
<size>77</size>
</method>
- <method name="System.String &lt;Bar&gt;m__1(System.String)" attrs="145">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="System.String &lt;Bar&gt;m__0(System.String)" attrs="145">
<size>14</size>
</method>
- <method name="System.String &lt;Main&gt;m__2(System.String)" attrs="145">
+ <method name="System.String &lt;Main&gt;m__1(System.String)" attrs="145">
<size>9</size>
</method>
- <method name="Void &lt;Main&gt;m__3(System.String)" attrs="145">
- <size>7</size>
- </method>
- <method name="Void .ctor()" attrs="6278">
+ <method name="Void &lt;Main&gt;m__2(System.String)" attrs="145">
<size>7</size>
</method>
</type>
@@ -24853,9 +25363,6 @@
<method name="Int32 Main()" attrs="150">
<size>128</size>
</method>
- <method name="Int32 &lt;Main&gt;m__1(System.String)" attrs="145">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -24876,6 +25383,11 @@
<size>139</size>
</method>
</type>
+ <type name="Repro">
+ <method name="Int32 &lt;Main&gt;m__0(System.String)" attrs="145">
+ <size>14</size>
+ </method>
+ </type>
</test>
<test name="gtest-lambda-16.cs">
<type name="Repro">
@@ -25070,12 +25582,6 @@
</method>
</type>
<type name="MainClass+&lt;Main&gt;c__AnonStorey0">
- <method name="Boolean &lt;&gt;m__3(Product)" attrs="131">
- <size>60</size>
- </method>
- <method name="Decimal &lt;&gt;m__4(Product)" attrs="145">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -25085,6 +25591,14 @@
<size>56</size>
</method>
</type>
+ <type name="MainClass+&lt;Main&gt;c__AnonStorey0">
+ <method name="Boolean &lt;&gt;m__0(Product)" attrs="131">
+ <size>60</size>
+ </method>
+ <method name="Decimal &lt;&gt;m__1(Product)" attrs="145">
+ <size>14</size>
+ </method>
+ </type>
</test>
<test name="gtest-lambda-23.cs">
<type name="C">
@@ -25267,12 +25781,12 @@
</method>
</type>
<type name="C+&lt;Method&gt;c__AnonStorey0`1[T]">
- <method name="System.Object &lt;&gt;m__1(T)" attrs="131">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="System.Object &lt;&gt;m__0(T)" attrs="131">
+ <size>14</size>
+ </method>
</type>
</test>
<test name="gtest-lambda-31.cs">
@@ -25311,12 +25825,6 @@
<method name="Int32 &lt;Main&gt;m__3(Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__5(Int32, Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__6(Int32)" attrs="145">
- <size>18</size>
- </method>
<method name="Int32 &lt;Main&gt;m__7(Int32)" attrs="145">
<size>10</size>
</method>
@@ -25338,54 +25846,12 @@
<method name="Int32 &lt;Main&gt;m__D(Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__E(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__F(ITest)" attrs="145">
- <size>15</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__10(Int32, ITest)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__11(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__12(ITest)" attrs="145">
- <size>15</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__13(Int32, ITest)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__14(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__15(ITest)" attrs="145">
- <size>15</size>
- </method>
- <method name="&lt;&gt;__AnonType0`2[System.Int32,from.ITest] &lt;Main&gt;m__16(Int32, ITest)" attrs="145">
- <size>16</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__17(&lt;&gt;__AnonType0`2[System.Int32,from.ITest])" attrs="145">
- <size>15</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__18(ITest)" attrs="145">
- <size>15</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__19(&lt;&gt;__AnonType0`2[System.Int32,from.ITest], ITest)" attrs="145">
- <size>15</size>
- </method>
<method name="Int32 &lt;Main&gt;m__1A(Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__1B(Int32)" attrs="145">
- <size>10</size>
- </method>
<method name="Int32 &lt;Main&gt;m__1D(Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__1E(Int32)" attrs="145">
- <size>10</size>
- </method>
<method name="Int32 &lt;Main&gt;m__20(Int32)" attrs="145">
<size>10</size>
</method>
@@ -25395,35 +25861,11 @@
<method name="Int32 &lt;Main&gt;m__22(Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__23(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__25(Int32)" attrs="145">
- <size>18</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__26(&lt;&gt;__AnonType1`2[System.Int32,System.Int32])" attrs="145">
- <size>15</size>
- </method>
- <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__27(Int32)" attrs="145">
- <size>18</size>
- </method>
- <method name="&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__28(&lt;&gt;__AnonType1`2[System.Int32,System.Int32])" attrs="145">
- <size>23</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__29(&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">
- <size>20</size>
- </method>
<method name="Int32 &lt;Main&gt;m__2A(Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__2B(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__2E(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
- <size>10</size>
- </method>
<method name="Int32 &lt;Main&gt;m__2F(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
- <size>15</size>
+ <size>10</size>
</method>
<method name="Int32 &lt;Main&gt;m__32(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
<size>10</size>
@@ -25431,27 +25873,6 @@
<method name="Int32 &lt;Main&gt;m__33(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
<size>15</size>
</method>
- <method name="Int32 &lt;Main&gt;m__36(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__37(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
- <size>15</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__39(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__3A(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__3B(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="&lt;&gt;__AnonType4`2[&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]],System.Int32] &lt;Main&gt;m__3D(&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]])" attrs="145">
- <size>17</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__3E(&lt;&gt;__AnonType4`2[&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]],System.Int32])" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -25565,12 +25986,6 @@
</method>
</type>
<type name="from.C+&lt;Main&gt;c__AnonStorey0">
- <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]] &lt;&gt;m__3C(Int32)" attrs="131">
- <size>55</size>
- </method>
- <method name="Int32 &lt;&gt;m__3F(Int32)" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -25595,41 +26010,140 @@
<method name="System.Nullable`1[System.Boolean] &lt;Main&gt;m__2(System.Nullable`1[System.Boolean])" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__1C(Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">
+ <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__31(System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">
+ <size>16</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__4(Int32, Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__5(Int32)" attrs="145">
+ <size>18</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__6(Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__E(ITest)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__F(Int32, ITest)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__10(Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__1F(Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__11(ITest)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__12(Int32, ITest)" attrs="145">
<size>10</size>
</method>
- <method name="System.Linq.IGrouping`2[System.Int32,System.Int32] &lt;Main&gt;m__24(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__13(Int32)" attrs="145">
<size>10</size>
</method>
- <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__2D(System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__14(ITest)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="&lt;&gt;__AnonType0`2[System.Int32,from.ITest] &lt;Main&gt;m__15(Int32, ITest)" attrs="145">
<size>16</size>
</method>
- <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__31(System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__16(&lt;&gt;__AnonType0`2[System.Int32,from.ITest])" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__17(ITest)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__18(&lt;&gt;__AnonType0`2[System.Int32,from.ITest], ITest)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__19(Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__1B(Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__1C(Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__1E(Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__1F(Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="System.Linq.IGrouping`2[System.Int32,System.Int32] &lt;Main&gt;m__23(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__24(Int32)" attrs="145">
+ <size>18</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__25(&lt;&gt;__AnonType1`2[System.Int32,System.Int32])" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__26(Int32)" attrs="145">
+ <size>18</size>
+ </method>
+ <method name="&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__27(&lt;&gt;__AnonType1`2[System.Int32,System.Int32])" attrs="145">
+ <size>23</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__28(&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">
+ <size>20</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__29(Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__2B(System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">
<size>16</size>
</method>
- <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__35(System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__2C(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__2D(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__2E(System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">
<size>16</size>
</method>
- <method name="System.Linq.IGrouping`2[System.Int32,System.Int32] &lt;Main&gt;m__38(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__30(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="System.Linq.IGrouping`2[System.Int32,System.Int32] &lt;Main&gt;m__34(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__35(Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__36(Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__37(Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="&lt;&gt;__AnonType4`2[&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]],System.Int32] &lt;Main&gt;m__38(&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]])" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__39(&lt;&gt;__AnonType4`2[&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]],System.Int32])" attrs="145">
<size>10</size>
</method>
</type>
<type name="from.C+&lt;Main&gt;c__AnonStorey0">
- <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__4(Int32)" attrs="131">
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__0(Int32)" attrs="131">
<size>15</size>
</method>
- <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__2C(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__1(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">
<size>15</size>
</method>
- <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__30(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__2(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">
<size>15</size>
</method>
- <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__34(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__3(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">
<size>15</size>
</method>
+ <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]] &lt;&gt;m__4(Int32)" attrs="131">
+ <size>55</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__5(Int32)" attrs="145">
+ <size>10</size>
+ </method>
</type>
</test>
<test name="gtest-linq-02.cs">
@@ -25849,27 +26363,6 @@
<method name="Int32 Main()" attrs="150">
<size>765</size>
</method>
- <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__1(Int32, System.String)" attrs="145">
- <size>16</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__2(Int32)" attrs="145">
- <size>13</size>
- </method>
- <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__4(Int32, System.String)" attrs="145">
- <size>16</size>
- </method>
- <method name="&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32] &lt;Main&gt;m__6(&lt;&gt;__AnonType0`2[System.Int32,System.String], Int32)" attrs="145">
- <size>16</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__7(&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32])" attrs="145">
- <size>15</size>
- </method>
- <method name="&lt;&gt;__AnonType2`3[System.Int32,System.Int32,System.Int32] &lt;Main&gt;m__8(&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32])" attrs="145">
- <size>33</size>
- </method>
- <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__A(Int32, System.String)" attrs="145">
- <size>16</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -25945,14 +26438,39 @@
<size>20</size>
</method>
<method name="System.Collections.Generic.IEnumerable`1[System.String] &lt;&gt;m__3(Int32)" attrs="131">
- <size>20</size>
+ <size>15</size>
</method>
- <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__5(&lt;&gt;__AnonType0`2[System.Int32,System.String])" attrs="131">
- <size>20</size>
+ </type>
+ <type name="SelectMany">
+ <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__0(Int32, System.String)" attrs="145">
+ <size>16</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__1(Int32)" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__2(Int32, System.String)" attrs="145">
+ <size>16</size>
+ </method>
+ <method name="&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32] &lt;Main&gt;m__3(&lt;&gt;__AnonType0`2[System.Int32,System.String], Int32)" attrs="145">
+ <size>16</size>
</method>
- <method name="System.Collections.Generic.IEnumerable`1[System.String] &lt;&gt;m__9(Int32)" attrs="131">
+ <method name="Int32 &lt;Main&gt;m__4(&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32])" attrs="145">
<size>15</size>
</method>
+ <method name="&lt;&gt;__AnonType2`3[System.Int32,System.Int32,System.Int32] &lt;Main&gt;m__5(&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32])" attrs="145">
+ <size>33</size>
+ </method>
+ <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__6(Int32, System.String)" attrs="145">
+ <size>16</size>
+ </method>
+ </type>
+ <type name="SelectMany+&lt;Main&gt;c__AnonStorey0">
+ <method name="System.Collections.Generic.IEnumerable`1[System.String] &lt;&gt;m__1(Int32)" attrs="131">
+ <size>20</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.String])" attrs="131">
+ <size>20</size>
+ </method>
</type>
</test>
<test name="gtest-linq-08.cs">
@@ -26230,18 +26748,6 @@
<method name="&lt;&gt;__AnonType1`2[System.Char,System.Int32] &lt;XX&gt;m__6(Char)" attrs="145">
<size>16</size>
</method>
- <method name="Char &lt;XX&gt;m__8(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="145">
- <size>14</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__9(Char)" attrs="145">
- <size>14</size>
- </method>
- <method name="&lt;&gt;__AnonType1`2[System.Char,System.Int32] &lt;Main&gt;m__A(Char)" attrs="145">
- <size>17</size>
- </method>
- <method name="Char &lt;Main&gt;m__C(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="145">
- <size>15</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -26287,17 +26793,11 @@
</method>
</type>
<type name="NestedQuery+&lt;XX&gt;c__AnonStorey0">
- <method name="Boolean &lt;&gt;m__7(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="131">
- <size>22</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="NestedQuery+&lt;Main&gt;c__AnonStorey1">
- <method name="Boolean &lt;&gt;m__B(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="131">
- <size>23</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -26312,6 +26812,28 @@
<method name="System.Collections.Generic.IEnumerable`1[System.Char] &lt;Main&gt;m__5(&lt;&gt;__AnonType0`2[System.String,System.Int32])" attrs="145">
<size>118</size>
</method>
+ <method name="Char &lt;XX&gt;m__7(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="145">
+ <size>14</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__8(Char)" attrs="145">
+ <size>14</size>
+ </method>
+ <method name="&lt;&gt;__AnonType1`2[System.Char,System.Int32] &lt;Main&gt;m__9(Char)" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="Char &lt;Main&gt;m__A(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="145">
+ <size>15</size>
+ </method>
+ </type>
+ <type name="NestedQuery+&lt;XX&gt;c__AnonStorey0">
+ <method name="Boolean &lt;&gt;m__0(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="131">
+ <size>22</size>
+ </method>
+ </type>
+ <type name="NestedQuery+&lt;Main&gt;c__AnonStorey1">
+ <method name="Boolean &lt;&gt;m__0(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="131">
+ <size>23</size>
+ </method>
</type>
</test>
<test name="gtest-linq-13.cs">
@@ -26464,9 +26986,6 @@
<method name="Void Test_2()" attrs="145">
<size>32</size>
</method>
- <method name="System.Func`1[System.Collections.Generic.IEnumerable`1[System.Int32]] &lt;Test_2&gt;m__1(Int32)" attrs="145">
- <size>33</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -26492,23 +27011,11 @@
</method>
</type>
<type name="C+&lt;Test_1&gt;c__AnonStorey0">
- <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;&gt;m__2(Int32)" attrs="145">
- <size>16</size>
- </method>
- <method name="Int32 &lt;&gt;m__3(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="131">
- <size>22</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Test_2&gt;c__AnonStorey1">
- <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;&gt;m__5(Int32)" attrs="145">
- <size>16</size>
- </method>
- <method name="Int32 &lt;&gt;m__6(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="131">
- <size>22</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -26518,10 +27025,29 @@
<size>74</size>
</method>
</type>
+ <type name="C">
+ <method name="System.Func`1[System.Collections.Generic.IEnumerable`1[System.Int32]] &lt;Test_2&gt;m__0(Int32)" attrs="145">
+ <size>33</size>
+ </method>
+ </type>
+ <type name="C+&lt;Test_1&gt;c__AnonStorey0">
+ <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;&gt;m__1(Int32)" attrs="145">
+ <size>16</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="131">
+ <size>22</size>
+ </method>
+ </type>
<type name="C+&lt;Test_2&gt;c__AnonStorey1">
- <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__4()" attrs="131">
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__0()" attrs="131">
<size>74</size>
</method>
+ <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;&gt;m__1(Int32)" attrs="145">
+ <size>16</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="131">
+ <size>22</size>
+ </method>
</type>
</test>
<test name="gtest-linq-17.cs">
@@ -26664,89 +27190,56 @@
</method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey0">
- <method name="Boolean &lt;&gt;m__12(Int32)" attrs="131">
- <size>17</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey1">
- <method name="Boolean &lt;&gt;m__13(Int32)" attrs="131">
- <size>22</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey2">
- <method name="Boolean &lt;&gt;m__14(Int32)" attrs="131">
- <size>17</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey3">
- <method name="Boolean &lt;&gt;m__15(Int32)" attrs="131">
- <size>17</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey4">
- <method name="Int32 &lt;&gt;m__16(Int32)" attrs="131">
- <size>16</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey5">
- <method name="Int32 &lt;&gt;m__17(Int32)" attrs="131">
- <size>16</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey6">
- <method name="Boolean &lt;&gt;m__18(Int32)" attrs="131">
- <size>27</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey7">
- <method name="Boolean &lt;&gt;m__19(Int32)" attrs="131">
- <size>17</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey8">
- <method name="Boolean &lt;&gt;m__1A(Int32)" attrs="131">
- <size>17</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey9">
- <method name="Boolean &lt;&gt;m__1B(Int32)" attrs="131">
- <size>17</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Main&gt;c__AnonStoreyA">
- <method name="Boolean &lt;&gt;m__1C(Int32)" attrs="131">
- <size>17</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -26756,6 +27249,61 @@
<size>10</size>
</method>
</type>
+ <type name="C+&lt;Main&gt;c__AnonStorey0">
+ <method name="Boolean &lt;&gt;m__0(Int32)" attrs="131">
+ <size>17</size>
+ </method>
+ </type>
+ <type name="C+&lt;Main&gt;c__AnonStorey1">
+ <method name="Boolean &lt;&gt;m__0(Int32)" attrs="131">
+ <size>22</size>
+ </method>
+ </type>
+ <type name="C+&lt;Main&gt;c__AnonStorey2">
+ <method name="Boolean &lt;&gt;m__0(Int32)" attrs="131">
+ <size>17</size>
+ </method>
+ </type>
+ <type name="C+&lt;Main&gt;c__AnonStorey3">
+ <method name="Boolean &lt;&gt;m__0(Int32)" attrs="131">
+ <size>17</size>
+ </method>
+ </type>
+ <type name="C+&lt;Main&gt;c__AnonStorey4">
+ <method name="Int32 &lt;&gt;m__0(Int32)" attrs="131">
+ <size>16</size>
+ </method>
+ </type>
+ <type name="C+&lt;Main&gt;c__AnonStorey5">
+ <method name="Int32 &lt;&gt;m__0(Int32)" attrs="131">
+ <size>16</size>
+ </method>
+ </type>
+ <type name="C+&lt;Main&gt;c__AnonStorey6">
+ <method name="Boolean &lt;&gt;m__0(Int32)" attrs="131">
+ <size>27</size>
+ </method>
+ </type>
+ <type name="C+&lt;Main&gt;c__AnonStorey7">
+ <method name="Boolean &lt;&gt;m__0(Int32)" attrs="131">
+ <size>17</size>
+ </method>
+ </type>
+ <type name="C+&lt;Main&gt;c__AnonStorey8">
+ <method name="Boolean &lt;&gt;m__0(Int32)" attrs="131">
+ <size>17</size>
+ </method>
+ </type>
+ <type name="C+&lt;Main&gt;c__AnonStorey9">
+ <method name="Boolean &lt;&gt;m__0(Int32)" attrs="131">
+ <size>17</size>
+ </method>
+ </type>
+ <type name="C+&lt;Main&gt;c__AnonStoreyA">
+ <method name="Boolean &lt;&gt;m__0(Int32)" attrs="131">
+ <size>17</size>
+ </method>
+ </type>
</test>
<test name="gtest-linq-19.cs">
<type name="Test">
@@ -26867,9 +27415,6 @@
</method>
</type>
<type name="Program+&lt;Main&gt;c__AnonStorey0+&lt;Main&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__2()" attrs="131">
- <size>49</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -26879,6 +27424,11 @@
<size>15</size>
</method>
</type>
+ <type name="Program+&lt;Main&gt;c__AnonStorey0+&lt;Main&gt;c__AnonStorey1">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>49</size>
+ </method>
+ </type>
</test>
<test name="gtest-linq-22.cs">
<type name="Test.MainClass">
@@ -27137,28 +27687,30 @@
</method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey0">
- <method name="&lt;&gt;__AnonType0`2[System.String,System.Boolean] &lt;&gt;m__2(System.String)" attrs="145">
- <size>55</size>
- </method>
- <method name="Boolean &lt;&gt;m__3(&lt;&gt;__AnonType0`2[System.String,System.Boolean])" attrs="145">
- <size>15</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey0+&lt;Main&gt;c__AnonStorey1">
- <method name="Boolean &lt;&gt;m__4(Char)" attrs="131">
- <size>24</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey0">
- <method name="System.Collections.Generic.IEnumerable`1[System.Boolean] &lt;&gt;m__1(System.String)" attrs="131">
+ <method name="System.Collections.Generic.IEnumerable`1[System.Boolean] &lt;&gt;m__0(System.String)" attrs="131">
<size>82</size>
</method>
+ <method name="&lt;&gt;__AnonType0`2[System.String,System.Boolean] &lt;&gt;m__1(System.String)" attrs="145">
+ <size>55</size>
+ </method>
+ <method name="Boolean &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.String,System.Boolean])" attrs="145">
+ <size>15</size>
+ </method>
+ </type>
+ <type name="C+&lt;Main&gt;c__AnonStorey0+&lt;Main&gt;c__AnonStorey1">
+ <method name="Boolean &lt;&gt;m__0(Char)" attrs="131">
+ <size>24</size>
+ </method>
</type>
</test>
<test name="gtest-linq-28.cs">
@@ -27221,12 +27773,12 @@
</method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey0">
- <method name="Int32 &lt;&gt;m__1(Int32)" attrs="131">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Int32 &lt;&gt;m__0(Int32)" attrs="131">
+ <size>14</size>
+ </method>
</type>
</test>
<test name="gtest-named-02.cs">
@@ -27748,12 +28300,6 @@
<method name="Void Main()" attrs="150">
<size>282</size>
</method>
- <method name="Void &lt;Main&gt;m__1()" attrs="145">
- <size>17</size>
- </method>
- <method name="System.Object &lt;Main&gt;m__2(Char)" attrs="145">
- <size>24</size>
- </method>
<method name="Void .ctor()" attrs="6273">
<size>23</size>
</method>
@@ -27819,6 +28365,14 @@
<size>26</size>
</method>
</type>
+ <type name="CallerMemberTest">
+ <method name="Void &lt;Main&gt;m__0()" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="System.Object &lt;Main&gt;m__1(Char)" attrs="145">
+ <size>24</size>
+ </method>
+ </type>
</test>
<test name="gtest-optional-23.cs">
<type name="CallerLineNumberTest">
@@ -27906,6 +28460,31 @@
</method>
</type>
</test>
+ <test name="gtest-optional-28.cs">
+ <type name="NoTypeOptionalParameters">
+ <method name="Void Lambda(Boolean, System.Func`2[System.String,System.Boolean][])" attrs="150">
+ <size>2</size>
+ </method>
+ <method name="Void MethodGroup(Boolean, System.Func`2[System.String,System.Boolean][])" attrs="150">
+ <size>2</size>
+ </method>
+ <method name="Boolean Foo(System.String)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Boolean FooInstance(System.String)" attrs="129">
+ <size>10</size>
+ </method>
+ <method name="Int32 Main()" attrs="150">
+ <size>148</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__0(System.String)" attrs="145">
+ <size>9</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">
@@ -28009,6 +28588,119 @@
</method>
</type>
</test>
+ <test name="gtest-partial-07.cs">
+ <type name="A`1[T]">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="A`1+B[T]">
+ <method name="Void Test()" attrs="134">
+ <size>9</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="X`1[U]">
+ <method name="Void Foo(U)" attrs="134">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="M">
+ <method name="Void Main()" attrs="150">
+ <size>12</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-partial-08.cs">
+ <type name="N.A`2[T1,T2]">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="N.A`2+D[T1,T2]">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="N.A`2+D+C[T1,T2]">
+ <method name="Void Test()" attrs="134">
+ <size>8</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="N.A`2+D2`1[T1,T2,U]">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="N.A`2+D2`1+C2[T1,T2,U]">
+ <method name="Void Test()" attrs="134">
+ <size>9</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="N.X2`1[W]">
+ <method name="Void Foo(W)" attrs="134">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="N.X">
+ <method name="Void Foo()" attrs="134">
+ <size>2</size>
+ </method>
+ <method name="Void Main()" attrs="150">
+ <size>22</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-partial-09.cs">
+ <type name="A.B`1[T]">
+ <method name="Void .ctor()" attrs="6276">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="A.B`1+C[T]">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="A.B`1+C+A[T]">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="A.Bar">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="A.Test">
+ <method name="Void Main()" attrs="150">
+ <size>20</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="gtest-var-04.cs">
<type name="Test">
<method name="Int32 Main()" attrs="150">
@@ -28063,7 +28755,7 @@
<test name="gtest-variance-11.cs">
<type name="D">
<method name="Int32 Main()" attrs="150">
- <size>58</size>
+ <size>137</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -28074,6 +28766,15 @@
<method name="Boolean Covariant[T](ICovariant`1[T], ICovariant`1[T])" attrs="150">
<size>49</size>
</method>
+ <method name="Boolean CovContCont[T](ICovariant`1[T], IContravariant`1[T], IContravariant`1[T])" attrs="150">
+ <size>49</size>
+ </method>
+ <method name="Boolean ContCovContCov[T](IContravariant`1[T], ICovariant`1[T], IContravariant`1[T], ICovariant`1[T])" attrs="150">
+ <size>49</size>
+ </method>
+ <method name="Boolean CovCovCont[T](ICovariant`1[T], ICovariant`1[T], IContravariant`1[T])" attrs="150">
+ <size>49</size>
+ </method>
</type>
</test>
<test name="gtest-variance-12.cs">
@@ -29418,7 +30119,7 @@
<size>10</size>
</method>
<method name="Int32 Main()" attrs="150">
- <size>125</size>
+ <size>115</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -36264,21 +36965,25 @@
</method>
</type>
<type name="X+&lt;t2&gt;c__AnonStorey1">
- <method name="Int32 &lt;&gt;m__1()" attrs="131">
- <size>15</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="X+&lt;Main2&gt;c__AnonStorey2">
- <method name="Void &lt;&gt;m__2(System.Object, System.EventArgs)" attrs="131">
- <size>34</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="X+&lt;t2&gt;c__AnonStorey1">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
+ <size>15</size>
+ </method>
+ </type>
+ <type name="X+&lt;Main2&gt;c__AnonStorey2">
+ <method name="Void &lt;&gt;m__0(System.Object, System.EventArgs)" attrs="131">
+ <size>34</size>
+ </method>
+ </type>
</test>
<test name="test-365.cs">
<type name="C">
@@ -38706,12 +39411,12 @@
</method>
</type>
<type name="Z+&lt;TestPostinc&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>39</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>39</size>
+ </method>
</type>
</test>
<test name="test-475.cs">
@@ -39415,6 +40120,9 @@
<method name="Void .cctor()" attrs="6289">
<size>7</size>
</method>
+ <method name="System.String Test_2()" attrs="150">
+ <size>7</size>
+ </method>
</type>
</test>
<test name="test-505.cs">
@@ -41691,7 +42399,7 @@
<test name="test-609.cs">
<type name="Test">
<method name="Int32 Main()" attrs="150">
- <size>54</size>
+ <size>10</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -47512,6 +48220,30 @@
</method>
</type>
</test>
+ <test name="test-869.cs">
+ <type name="C">
+ <method name="C op_BitwiseAnd(C, E)" attrs="2198">
+ <size>14</size>
+ </method>
+ <method name="E op_Implicit(C)" attrs="2198">
+ <size>7</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="Void .cctor()" attrs="6289">
+ <size>11</size>
+ </method>
+ </type>
+ <type name="FooClass">
+ <method name="Int32 Main()" attrs="150">
+ <size>77</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-87.cs">
<type name="Top">
<method name="Int32 Main()" attrs="150">
@@ -47559,6 +48291,51 @@
</method>
</type>
</test>
+ <test name="test-870.cs">
+ <type name="Test">
+ <method name="Void Foo(UInt16)" attrs="145">
+ <size>23</size>
+ </method>
+ <method name="Void Main()" attrs="150">
+ <size>8</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-871.cs">
+ <type name="D">
+ <method name="D op_BitwiseAnd(D, D)" attrs="2198">
+ <size>16</size>
+ </method>
+ <method name="Boolean op_False(D)" attrs="2198">
+ <size>10</size>
+ </method>
+ <method name="Boolean op_True(D)" attrs="2198">
+ <size>10</size>
+ </method>
+ <method name="D op_Implicit(Boolean)" attrs="2198">
+ <size>15</size>
+ </method>
+ <method name="Int32 Main()" attrs="145">
+ <size>80</size>
+ </method>
+ <method name="Void .ctor(Int32)" attrs="6278">
+ <size>15</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-873.cs">
+ <type name="Program">
+ <method name="Int32 Main()" attrs="145">
+ <size>51</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-88.cs">
<type name="X">
<method name="Void f(System.String)" attrs="145">
@@ -48249,12 +49026,12 @@
</method>
</type>
<type name="X+&lt;Test&gt;c__AnonStorey0`1+&lt;Test&gt;c__AnonStorey1`1[T]">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>51</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>51</size>
+ </method>
</type>
</test>
<test name="test-anon-103.cs">
@@ -48935,12 +49712,12 @@
</method>
</type>
<type name="Test`1+&lt;Hello&gt;c__AnonStorey1`1+&lt;Hello&gt;c__AnonStorey0`1[T,S]">
- <method name="Void &lt;&gt;m__1(T)" attrs="131">
- <size>66</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0(T)" attrs="131">
+ <size>66</size>
+ </method>
</type>
</test>
<test name="test-anon-116.cs">
@@ -49075,12 +49852,12 @@
<method name="System.String &lt;&gt;m__1(System.Text.RegularExpressions.Match)" attrs="131">
<size>120</size>
</method>
- <method name="System.String &lt;&gt;m__2(System.Text.RegularExpressions.Match)" attrs="131">
- <size>120</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="System.String &lt;&gt;m__0(System.Text.RegularExpressions.Match)" attrs="131">
+ <size>120</size>
+ </method>
</type>
</test>
<test name="test-anon-12.cs">
@@ -49267,20 +50044,11 @@
<size>7</size>
</method>
<method name="Void &lt;Main&gt;m__3()" attrs="145">
- <size>17</size>
- </method>
- <method name="Void &lt;Main&gt;m__4()" attrs="145">
- <size>17</size>
- </method>
- <method name="Void &lt;Main&gt;m__5()" attrs="145">
<size>62</size>
</method>
- <method name="Void &lt;Main&gt;m__6()" attrs="145">
+ <method name="Void &lt;Main&gt;m__4()" attrs="145">
<size>54</size>
</method>
- <method name="Void &lt;Main&gt;m__7(E)" attrs="145">
- <size>35</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -49301,9 +50069,6 @@
</type>
<type name="C+&lt;Main&gt;c__AnonStorey0">
<method name="Void &lt;&gt;m__1()" attrs="131">
- <size>49</size>
- </method>
- <method name="Void &lt;&gt;m__2()" attrs="131">
<size>36</size>
</method>
<method name="Void .ctor()" attrs="6278">
@@ -49318,6 +50083,22 @@
<size>15</size>
</method>
</type>
+ <type name="C">
+ <method name="Void &lt;Main&gt;m__1()" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__2()" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__5(E)" attrs="145">
+ <size>35</size>
+ </method>
+ </type>
+ <type name="C+&lt;Main&gt;c__AnonStorey0">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>49</size>
+ </method>
+ </type>
</test>
<test name="test-anon-124.cs">
<type name="Disposable`1[T]">
@@ -49392,41 +50173,26 @@
</method>
</type>
<type name="Test+&lt;Throw&gt;c__AnonStorey1`1[T]">
- <method name="T &lt;&gt;m__1()" attrs="131">
- <size>24</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Test+&lt;TypeOf&gt;c__AnonStorey2`1[T]">
- <method name="System.Type &lt;&gt;m__2()" attrs="131">
- <size>64</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Test+&lt;Do&gt;c__AnonStorey3`1[T]">
- <method name="T &lt;&gt;m__3()" attrs="131">
- <size>38</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Test+&lt;Lock&gt;c__AnonStorey4`1[T]">
- <method name="T &lt;&gt;m__4()" attrs="131">
- <size>69</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Test+&lt;Catch&gt;c__AnonStorey5`1[T]">
- <method name="T &lt;&gt;m__5()" attrs="131">
- <size>41</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -49442,73 +50208,114 @@
</method>
</type>
<type name="Test+&lt;Catch_2&gt;c__AnonStorey6`1[T]">
- <method name="T &lt;&gt;m__6()" attrs="131">
- <size>42</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Test+&lt;Finally&gt;c__AnonStorey7`1[T]">
- <method name="T &lt;&gt;m__7()" attrs="131">
- <size>62</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Test+&lt;Using&gt;c__AnonStorey8`1[T]">
- <method name="T &lt;&gt;m__8()" attrs="131">
- <size>15</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Test+&lt;Switch&gt;c__AnonStorey9`1[T]">
- <method name="T &lt;&gt;m__9()" attrs="131">
- <size>16</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Test+&lt;ForForeach&gt;c__AnonStoreyA`1[T]">
- <method name="System.Collections.Generic.List`1[T] &lt;&gt;m__A()" attrs="131">
- <size>67</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Test+&lt;ArrayMutate&gt;c__AnonStoreyB`1[T]">
- <method name="Void &lt;&gt;m__B(Int32)" attrs="131">
- <size>39</size>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
</method>
+ </type>
+ <type name="Test+&lt;ArrayMultiMutate&gt;c__AnonStoreyD`1[T]">
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="Test+&lt;NestedTypeMutate&gt;c__AnonStoreyE`1[T]">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Test+&lt;Throw&gt;c__AnonStorey1`1[T]">
+ <method name="T &lt;&gt;m__0()" attrs="131">
+ <size>24</size>
+ </method>
+ </type>
+ <type name="Test+&lt;TypeOf&gt;c__AnonStorey2`1[T]">
+ <method name="System.Type &lt;&gt;m__0()" attrs="131">
+ <size>64</size>
+ </method>
+ </type>
+ <type name="Test+&lt;Do&gt;c__AnonStorey3`1[T]">
+ <method name="T &lt;&gt;m__0()" attrs="131">
+ <size>38</size>
+ </method>
+ </type>
+ <type name="Test+&lt;Lock&gt;c__AnonStorey4`1[T]">
+ <method name="T &lt;&gt;m__0()" attrs="131">
+ <size>69</size>
+ </method>
+ </type>
+ <type name="Test+&lt;Catch&gt;c__AnonStorey5`1[T]">
+ <method name="T &lt;&gt;m__0()" attrs="131">
+ <size>41</size>
+ </method>
+ </type>
+ <type name="Test+&lt;Catch_2&gt;c__AnonStorey6`1[T]">
+ <method name="T &lt;&gt;m__0()" attrs="131">
+ <size>42</size>
+ </method>
+ </type>
+ <type name="Test+&lt;Finally&gt;c__AnonStorey7`1[T]">
+ <method name="T &lt;&gt;m__0()" attrs="131">
+ <size>62</size>
+ </method>
+ </type>
+ <type name="Test+&lt;Using&gt;c__AnonStorey8`1[T]">
+ <method name="T &lt;&gt;m__0()" attrs="131">
+ <size>15</size>
+ </method>
+ </type>
+ <type name="Test+&lt;Switch&gt;c__AnonStorey9`1[T]">
+ <method name="T &lt;&gt;m__0()" attrs="131">
+ <size>16</size>
+ </method>
+ </type>
+ <type name="Test+&lt;ForForeach&gt;c__AnonStoreyA`1[T]">
+ <method name="System.Collections.Generic.List`1[T] &lt;&gt;m__0()" attrs="131">
+ <size>67</size>
+ </method>
+ </type>
+ <type name="Test+&lt;ArrayMutate&gt;c__AnonStoreyB`1[T]">
+ <method name="Void &lt;&gt;m__0(Int32)" attrs="131">
+ <size>39</size>
+ </method>
+ </type>
<type name="Test+&lt;ArrayMultiMutate&gt;c__AnonStoreyC`1[T]">
- <method name="T[][] &lt;&gt;m__C()" attrs="131">
+ <method name="T[][] &lt;&gt;m__0()" attrs="131">
<size>58</size>
</method>
</type>
<type name="Test+&lt;ArrayMultiMutate&gt;c__AnonStoreyD`1[T]">
- <method name="Int32 &lt;&gt;m__D()" attrs="131">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
<size>35</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
</type>
<type name="Test+&lt;NestedTypeMutate&gt;c__AnonStoreyE`1[T]">
- <method name="T[] &lt;&gt;m__E()" attrs="131">
+ <method name="T[] &lt;&gt;m__0()" attrs="131">
<size>45</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
</type>
</test>
<test name="test-anon-125.cs">
@@ -49789,12 +50596,12 @@
</method>
</type>
<type name="X+&lt;Test&gt;c__AnonStorey0`1+&lt;Test&gt;c__AnonStorey1`1[T]">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>51</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>51</size>
+ </method>
</type>
</test>
<test name="test-anon-131.cs">
@@ -49849,9 +50656,6 @@
<method name="Void Main()" attrs="150">
<size>68</size>
</method>
- <method name="System.String &lt;Main&gt;m__1(System.String)" attrs="145">
- <size>24</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -49872,6 +50676,11 @@
<size>146</size>
</method>
</type>
+ <type name="Test">
+ <method name="System.String &lt;Main&gt;m__0(System.String)" attrs="145">
+ <size>24</size>
+ </method>
+ </type>
</test>
<test name="test-anon-134.cs">
<type name="MyClass">
@@ -49932,9 +50741,6 @@
<method name="System.Func`1[C`1[T]] XX()" attrs="145">
<size>40</size>
</method>
- <method name="C`1[T] &lt;XX&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -49943,9 +50749,6 @@
<method name="System.Func`1[T] XX[T]()" attrs="145">
<size>23</size>
</method>
- <method name="T &lt;XX`1&gt;m__2[T]()" attrs="145">
- <size>17</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -49958,6 +50761,16 @@
<size>7</size>
</method>
</type>
+ <type name="C2`1[T]">
+ <method name="C`1[T] &lt;XX&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="N1">
+ <method name="T &lt;XX`1&gt;m__0[T]()" attrs="145">
+ <size>17</size>
+ </method>
+ </type>
</test>
<test name="test-anon-136.cs">
<type name="Handler`1[T]">
@@ -50103,17 +50916,11 @@
</method>
</type>
<type name="Test+&lt;Test_2&gt;c__AnonStorey1`1[T]">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>86</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Test+&lt;Test_3&gt;c__AnonStorey2`1[T]">
- <method name="Void &lt;&gt;m__2()" attrs="131">
- <size>24</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -50123,6 +50930,16 @@
<size>34</size>
</method>
</type>
+ <type name="Test+&lt;Test_2&gt;c__AnonStorey1`1[T]">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>86</size>
+ </method>
+ </type>
+ <type name="Test+&lt;Test_3&gt;c__AnonStorey2`1[T]">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>24</size>
+ </method>
+ </type>
</test>
<test name="test-anon-14.cs">
<type name="X">
@@ -50312,12 +51129,12 @@
</method>
</type>
<type name="C+&lt;AnyMethod&gt;c__AnonStorey0`1[T]">
- <method name="Void &lt;&gt;m__1(System.String)" attrs="131">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0(System.String)" attrs="131">
+ <size>14</size>
+ </method>
</type>
</test>
<test name="test-anon-146.cs">
@@ -50354,9 +51171,6 @@
<method name="Int32 Main()" attrs="150">
<size>67</size>
</method>
- <method name="Void &lt;Main&gt;m__3(Int32, Int32, Int32)" attrs="145">
- <size>24</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -50370,21 +51184,30 @@
</method>
</type>
<type name="C+&lt;Curry&gt;c__AnonStorey0`3+&lt;Curry&gt;c__AnonStorey1`3[T1,T2,T3]">
- <method name="System.Action`1[T3] &lt;&gt;m__1(T2)" attrs="131">
- <size>52</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Curry&gt;c__AnonStorey0`3+&lt;Curry&gt;c__AnonStorey1`3+&lt;Curry&gt;c__AnonStorey2`3[T1,T2,T3]">
- <method name="Void &lt;&gt;m__2(T3)" attrs="131">
- <size>35</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="Test">
+ <method name="Void &lt;Main&gt;m__0(Int32, Int32, Int32)" attrs="145">
+ <size>24</size>
+ </method>
+ </type>
+ <type name="C+&lt;Curry&gt;c__AnonStorey0`3+&lt;Curry&gt;c__AnonStorey1`3[T1,T2,T3]">
+ <method name="System.Action`1[T3] &lt;&gt;m__0(T2)" attrs="131">
+ <size>52</size>
+ </method>
+ </type>
+ <type name="C+&lt;Curry&gt;c__AnonStorey0`3+&lt;Curry&gt;c__AnonStorey1`3+&lt;Curry&gt;c__AnonStorey2`3[T1,T2,T3]">
+ <method name="Void &lt;&gt;m__0(T3)" attrs="131">
+ <size>35</size>
+ </method>
+ </type>
</test>
<test name="test-anon-148.cs">
<type name="Func`1[TResult]">
@@ -50549,12 +51372,12 @@
</method>
</type>
<type name="SomeGenericClass`1+&lt;FailsToCompile&gt;c__AnonStorey0[SomeType]">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>19</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>19</size>
+ </method>
</type>
</test>
<test name="test-anon-151.cs">
@@ -50688,21 +51511,25 @@
</method>
</type>
<type name="Class+&lt;Method&gt;c__AnonStorey0+&lt;Method&gt;c__AnonStorey2">
- <method name="System.String &lt;&gt;m__1(System.String)" attrs="131">
- <size>60</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Class+&lt;Method&gt;c__AnonStorey0+&lt;Method&gt;c__AnonStorey2+&lt;Method&gt;c__AnonStorey1">
- <method name="System.String &lt;&gt;m__2()" attrs="131">
- <size>46</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="Class+&lt;Method&gt;c__AnonStorey0+&lt;Method&gt;c__AnonStorey2">
+ <method name="System.String &lt;&gt;m__0(System.String)" attrs="131">
+ <size>60</size>
+ </method>
+ </type>
+ <type name="Class+&lt;Method&gt;c__AnonStorey0+&lt;Method&gt;c__AnonStorey2+&lt;Method&gt;c__AnonStorey1">
+ <method name="System.String &lt;&gt;m__0()" attrs="131">
+ <size>46</size>
+ </method>
+ </type>
</test>
<test name="test-anon-155.cs">
<type name="Thing`1[TFirst]">
@@ -50720,9 +51547,6 @@
<method name="Void Main()" attrs="150">
<size>43</size>
</method>
- <method name="System.Object &lt;Main&gt;m__1(System.Object)" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Thing`1+&lt;Create&gt;c__AnonStorey0`1[TFirst,TSecond]">
<method name="Void &lt;&gt;m__0(TFirst)" attrs="131">
@@ -50732,6 +51556,11 @@
<size>7</size>
</method>
</type>
+ <type name="Program">
+ <method name="System.Object &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="test-anon-156.cs">
<type name="G`1[T]">
@@ -50838,12 +51667,12 @@
</method>
</type>
<type name="Test+&lt;FooNested&gt;c__AnonStorey1`1[X]">
- <method name="Call`1[X] &lt;&gt;m__1()" attrs="131">
- <size>19</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Call`1[X] &lt;&gt;m__0()" attrs="131">
+ <size>19</size>
+ </method>
</type>
</test>
<test name="test-anon-159.cs">
@@ -50868,9 +51697,6 @@
<method name="Void Main()" attrs="150">
<size>41</size>
</method>
- <method name="Void &lt;Main&gt;m__1(System.String)" attrs="145">
- <size>7</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -50888,6 +51714,11 @@
<size>7</size>
</method>
</type>
+ <type name="TestGenericsSubtypeMatching.C">
+ <method name="Void &lt;Main&gt;m__0(System.String)" attrs="145">
+ <size>7</size>
+ </method>
+ </type>
</test>
<test name="test-anon-16.cs">
<type name="D">
@@ -50941,9 +51772,6 @@
<method name="Int32 Main()" attrs="150">
<size>49</size>
</method>
- <method name="Void &lt;Main&gt;m__1(Int32)" attrs="145">
- <size>7</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -50961,6 +51789,11 @@
<size>7</size>
</method>
</type>
+ <type name="TestGenericsSubtypeMatching.C">
+ <method name="Void &lt;Main&gt;m__0(Int32)" attrs="145">
+ <size>7</size>
+ </method>
+ </type>
</test>
<test name="test-anon-161.cs">
<type name="TestCase">
@@ -51036,12 +51869,12 @@
</method>
</type>
<type name="T+&lt;GetD&gt;c__AnonStorey2`1+&lt;GetD&gt;c__AnonStorey1`1[T]">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>52</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>52</size>
+ </method>
</type>
</test>
<test name="test-anon-163.cs">
@@ -51093,20 +51926,11 @@
</method>
</type>
<type name="B+&lt;Test2&gt;c__AnonStorey1`1[T]">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>40</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="B+&lt;Test3&gt;c__AnonStorey2">
- <method name="Void &lt;&gt;m__2()" attrs="131">
- <size>20</size>
- </method>
- <method name="Void &lt;&gt;m__3()" attrs="131">
- <size>20</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -51123,10 +51947,23 @@
<method name="T &lt;Foo4&gt;__BaseCallProxy2[T]()" attrs="129">
<size>14</size>
</method>
- <method name="T &lt;Test4`1&gt;m__4[T]()" attrs="129">
+ <method name="T &lt;Test4`1&gt;m__0[T]()" attrs="129">
<size>14</size>
</method>
</type>
+ <type name="B+&lt;Test2&gt;c__AnonStorey1`1[T]">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>40</size>
+ </method>
+ </type>
+ <type name="B+&lt;Test3&gt;c__AnonStorey2">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>20</size>
+ </method>
+ <method name="Void &lt;&gt;m__1()" attrs="131">
+ <size>20</size>
+ </method>
+ </type>
</test>
<test name="test-anon-164.cs">
<type name="C`1[T]">
@@ -51191,12 +52028,12 @@
</method>
</type>
<type name="C+&lt;Foo&gt;c__AnonStorey0`1[T]">
- <method name="T &lt;&gt;m__1()" attrs="131">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="T &lt;&gt;m__0()" attrs="131">
+ <size>14</size>
+ </method>
</type>
</test>
<test name="test-anon-166.cs">
@@ -51215,12 +52052,12 @@
</method>
</type>
<type name="A+&lt;Test&gt;c__AnonStorey0`2[T,U]">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>14</size>
+ </method>
</type>
</test>
<test name="test-anon-167.cs">
@@ -51298,12 +52135,12 @@
</method>
</type>
<type name="Test+&lt;Main&gt;c__AnonStorey1">
- <method name="Char &lt;&gt;m__1()" attrs="131">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Char &lt;&gt;m__0()" attrs="131">
+ <size>14</size>
+ </method>
</type>
</test>
<test name="test-anon-17.cs">
@@ -51381,37 +52218,45 @@
</method>
</type>
<type name="MyClass+&lt;Run&gt;c__AnonStorey0">
- <method name="Int32 &lt;&gt;m__4()" attrs="131">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="MyClass+&lt;Run&gt;c__AnonStorey1">
- <method name="Int32 &lt;&gt;m__5()" attrs="131">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="MyClass+&lt;Run2&gt;c__AnonStorey2">
- <method name="Int32 &lt;&gt;m__6()" attrs="131">
- <size>25</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="MyClass+&lt;Run2&gt;c__AnonStorey3">
- <method name="Int32 &lt;&gt;m__7()" attrs="131">
- <size>25</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="MyClass+&lt;Run&gt;c__AnonStorey0">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
+ <size>14</size>
+ </method>
+ </type>
+ <type name="MyClass+&lt;Run&gt;c__AnonStorey1">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
+ <size>14</size>
+ </method>
+ </type>
+ <type name="MyClass+&lt;Run2&gt;c__AnonStorey2">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
+ <size>25</size>
+ </method>
+ </type>
+ <type name="MyClass+&lt;Run2&gt;c__AnonStorey3">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
+ <size>25</size>
+ </method>
+ </type>
</test>
<test name="test-anon-171.cs">
<type name="TestAnonSwitch.MyClass">
@@ -51569,12 +52414,12 @@
</method>
</type>
<type name="X+&lt;MainHost&gt;c__AnonStorey0+&lt;MainHost&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>53</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>53</size>
+ </method>
</type>
</test>
<test name="test-anon-21.cs">
@@ -51615,12 +52460,12 @@
</method>
</type>
<type name="X+&lt;M&gt;c__AnonStorey0+&lt;M&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>82</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>82</size>
+ </method>
</type>
</test>
<test name="test-anon-22.cs">
@@ -51658,12 +52503,12 @@
</method>
</type>
<type name="X+&lt;T&gt;c__AnonStorey0+&lt;T&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>53</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>53</size>
+ </method>
</type>
</test>
<test name="test-anon-23.cs">
@@ -51701,12 +52546,12 @@
</method>
</type>
<type name="X+&lt;M&gt;c__AnonStorey0+&lt;M&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>25</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>25</size>
+ </method>
</type>
</test>
<test name="test-anon-24.cs">
@@ -51844,12 +52689,12 @@
</method>
</type>
<type name="X+&lt;M&gt;c__AnonStorey0+&lt;M&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>51</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>51</size>
+ </method>
</type>
</test>
<test name="test-anon-28.cs">
@@ -52088,12 +52933,12 @@
</method>
</type>
<type name="T+&lt;Main&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>13</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>13</size>
+ </method>
</type>
</test>
<test name="test-anon-34.cs">
@@ -52131,9 +52976,6 @@
</method>
</type>
<type name="Delegates.Space+&lt;Leak&gt;c__AnonStorey0">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>20</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -52146,6 +52988,11 @@
<size>7</size>
</method>
</type>
+ <type name="Delegates.Space+&lt;Leak&gt;c__AnonStorey0">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>20</size>
+ </method>
+ </type>
</test>
<test name="test-anon-35.cs">
<type name="ExceptionWithAnonMethod">
@@ -52308,12 +53155,12 @@
</method>
</type>
<type name="X+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>35</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>35</size>
+ </method>
</type>
</test>
<test name="test-anon-39.cs">
@@ -52478,12 +53325,12 @@
</method>
</type>
<type name="X+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>36</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>36</size>
+ </method>
</type>
</test>
<test name="test-anon-42.cs">
@@ -52588,12 +53435,12 @@
</method>
</type>
<type name="X+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>35</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>35</size>
+ </method>
</type>
</test>
<test name="test-anon-44.cs">
@@ -52646,21 +53493,25 @@
<method name="Simple &lt;&gt;m__1()" attrs="131">
<size>41</size>
</method>
- <method name="Void &lt;&gt;m__3()" attrs="131">
- <size>22</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="X+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__2()" attrs="131">
- <size>27</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="X+&lt;Test&gt;c__AnonStorey0">
+ <method name="Void &lt;&gt;m__2()" attrs="131">
+ <size>22</size>
+ </method>
+ </type>
+ <type name="X+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey1">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>27</size>
+ </method>
+ </type>
</test>
<test name="test-anon-45.cs">
<type name="TestFunc">
@@ -53048,12 +53899,12 @@
</method>
</type>
<type name="Test+&lt;Test&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>13</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>13</size>
+ </method>
</type>
</test>
<test name="test-anon-54.cs">
@@ -53355,12 +54206,12 @@
</method>
</type>
<type name="X+&lt;Test&gt;c__AnonStorey2+&lt;Test&gt;c__AnonStorey4">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>125</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>125</size>
+ </method>
</type>
</test>
<test name="test-anon-61.cs">
@@ -53531,9 +54382,6 @@
<method name="Void Main()" attrs="150">
<size>2</size>
</method>
- <method name="Void &lt;AddSource&gt;m__1(System.Object, System.EventArgs)" attrs="145">
- <size>2</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -53546,6 +54394,11 @@
<size>7</size>
</method>
</type>
+ <type name="Source">
+ <method name="Void &lt;AddSource&gt;m__0(System.Object, System.EventArgs)" attrs="145">
+ <size>2</size>
+ </method>
+ </type>
</test>
<test name="test-anon-65.cs">
<type name="BaseClass">
@@ -53770,9 +54623,6 @@
<method name="Void Main()" attrs="150">
<size>99</size>
</method>
- <method name="Void &lt;Main&gt;m__3()" attrs="145">
- <size>17</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -53801,15 +54651,22 @@
</type>
<type name="C+&lt;Main&gt;c__AnonStorey1">
<method name="Void &lt;&gt;m__1()" attrs="131">
- <size>49</size>
- </method>
- <method name="Void &lt;&gt;m__2()" attrs="131">
<size>36</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="C">
+ <method name="Void &lt;Main&gt;m__0()" attrs="145">
+ <size>17</size>
+ </method>
+ </type>
+ <type name="C+&lt;Main&gt;c__AnonStorey1">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>49</size>
+ </method>
+ </type>
</test>
<test name="test-anon-71.cs">
<type name="Program">
@@ -53989,14 +54846,14 @@
</type>
<type name="Test+&lt;TestMe&gt;c__AnonStorey0">
<method name="Boolean &lt;&gt;m__1()" attrs="131">
- <size>67</size>
- </method>
- <method name="Boolean &lt;&gt;m__2()" attrs="131">
<size>22</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Boolean &lt;&gt;m__0()" attrs="131">
+ <size>67</size>
+ </method>
</type>
</test>
<test name="test-anon-76.cs">
@@ -54248,21 +55105,25 @@
</method>
</type>
<type name="C+&lt;Test&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>45</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Test&gt;c__AnonStorey1+&lt;Test&gt;c__AnonStorey0">
- <method name="Void &lt;&gt;m__2()" attrs="131">
- <size>19</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="C+&lt;Test&gt;c__AnonStorey1">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>45</size>
+ </method>
+ </type>
+ <type name="C+&lt;Test&gt;c__AnonStorey1+&lt;Test&gt;c__AnonStorey0">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>19</size>
+ </method>
+ </type>
</test>
<test name="test-anon-82.cs">
<type name="StringSender">
@@ -54312,18 +55173,6 @@
<method name="Void SimpleCallback(MainClass, System.String)" attrs="145">
<size>8</size>
</method>
- <method name="Void &lt;Test2&gt;m__1(System.String)" attrs="145">
- <size>28</size>
- </method>
- <method name="Void &lt;Test3&gt;m__3()" attrs="145">
- <size>2</size>
- </method>
- <method name="Void &lt;Test4&gt;m__4()" attrs="145">
- <size>32</size>
- </method>
- <method name="Void &lt;Test4&gt;m__8()" attrs="145">
- <size>29</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -54346,50 +55195,74 @@
<method name="Void &lt;&gt;m__0()" attrs="131">
<size>26</size>
</method>
- <method name="Void &lt;&gt;m__6(System.String)" attrs="131">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="MainClass+&lt;Test3&gt;c__AnonStorey2">
- <method name="Void &lt;&gt;m__2()" attrs="131">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="MainClass+&lt;Test5&gt;c__AnonStorey4">
- <method name="Int32 &lt;&gt;m__5(Int32)" attrs="131">
- <size>54</size>
- </method>
- <method name="Int32 &lt;&gt;m__9(Int32)" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="MainClass+&lt;Test2&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__7()" attrs="131">
- <size>13</size>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
</method>
+ </type>
+ <type name="MainClass+&lt;Test4&gt;c__AnonStorey3">
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="MainClass">
+ <method name="Void &lt;Test2&gt;m__0(System.String)" attrs="145">
+ <size>28</size>
+ </method>
+ <method name="Void &lt;Test3&gt;m__1()" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void &lt;Test4&gt;m__2()" attrs="145">
+ <size>32</size>
+ </method>
+ <method name="Void &lt;Test4&gt;m__3()" attrs="145">
+ <size>29</size>
+ </method>
+ </type>
+ <type name="MainClass+&lt;Main&gt;c__AnonStorey0">
+ <method name="Void &lt;&gt;m__1(System.String)" attrs="131">
+ <size>14</size>
+ </method>
+ </type>
+ <type name="MainClass+&lt;Test3&gt;c__AnonStorey2">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="MainClass+&lt;Test5&gt;c__AnonStorey4">
+ <method name="Int32 &lt;&gt;m__0(Int32)" attrs="131">
+ <size>54</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="MainClass+&lt;Test2&gt;c__AnonStorey1">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>13</size>
+ </method>
+ </type>
<type name="MainClass+&lt;Test4&gt;c__AnonStorey3">
- <method name="Void &lt;&gt;m__A()" attrs="131">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
<size>15</size>
</method>
- <method name="Void &lt;&gt;m__B()" attrs="131">
+ <method name="Void &lt;&gt;m__1()" attrs="131">
<size>9</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
</type>
</test>
<test name="test-anon-83.cs">
@@ -54589,9 +55462,6 @@
</method>
</type>
<type name="C+&lt;Test&gt;c__AnonStorey0">
- <method name="Void &lt;&gt;m__2()" attrs="131">
- <size>9</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -54603,21 +55473,30 @@
<method name="Void &lt;&gt;m__1()" attrs="131">
<size>9</size>
</method>
- <method name="Void &lt;&gt;m__4()" attrs="145">
- <size>4</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Test&gt;c__AnonStorey2+&lt;Test&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__3()" attrs="131">
- <size>21</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="C+&lt;Test&gt;c__AnonStorey0">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="C+&lt;Test&gt;c__AnonStorey2">
+ <method name="Void &lt;&gt;m__2()" attrs="145">
+ <size>4</size>
+ </method>
+ </type>
+ <type name="C+&lt;Test&gt;c__AnonStorey2+&lt;Test&gt;c__AnonStorey1">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>21</size>
+ </method>
+ </type>
</test>
<test name="test-anon-89.cs">
<type name="C">
@@ -54658,24 +55537,28 @@
<method name="Void &lt;&gt;m__0()" attrs="131">
<size>113</size>
</method>
- <method name="Void &lt;&gt;m__3()" attrs="131">
- <size>32</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey1">
<method name="Void &lt;&gt;m__1()" attrs="131">
- <size>19</size>
- </method>
- <method name="Void &lt;&gt;m__2()" attrs="131">
<size>53</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="C+&lt;Test&gt;c__AnonStorey0">
+ <method name="Void &lt;&gt;m__1()" attrs="131">
+ <size>32</size>
+ </method>
+ </type>
+ <type name="C+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey1">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>19</size>
+ </method>
+ </type>
</test>
<test name="test-anon-90.cs">
<type name="C">
@@ -54717,12 +55600,12 @@
</method>
</type>
<type name="C+&lt;Foo&gt;c__AnonStorey0+&lt;Foo&gt;c__AnonStorey2">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>33</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>33</size>
+ </method>
</type>
</test>
<test name="test-anon-91.cs">
@@ -54768,12 +55651,12 @@
</method>
</type>
<type name="C+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>24</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>24</size>
+ </method>
</type>
</test>
<test name="test-anon-92.cs">
@@ -54825,9 +55708,6 @@
<method name="Void Main()" attrs="150">
<size>51</size>
</method>
- <method name="Void &lt;Main&gt;m__2(System.Object, System.EventArgs)" attrs="145">
- <size>13</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -54841,18 +55721,25 @@
</method>
</type>
<type name="BaseTest.MainClass+&lt;&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__1(System.Object, System.EventArgs)" attrs="131">
- <size>24</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="BaseTest.MainClass">
+ <method name="Void &lt;Main&gt;m__0(System.Object, System.EventArgs)" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="BaseTest.MainClass+&lt;&gt;c__AnonStorey1">
+ <method name="Void &lt;&gt;m__0(System.Object, System.EventArgs)" attrs="131">
+ <size>24</size>
+ </method>
+ </type>
</test>
<test name="test-anon-94.cs">
<type name="Program">
<method name="Int32 Main()" attrs="150">
- <size>75</size>
+ <size>97</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -54887,13 +55774,38 @@
<method name="Void &lt;Print&gt;__BaseCallProxy0(Int32)" attrs="129">
<size>8</size>
</method>
- <method name="Void &lt;Print&gt;m__1()" attrs="129">
- <size>9</size>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Program+BaseClass">
+ <method name="Void TestOut(Int32 ByRef)" attrs="454">
+ <size>5</size>
</method>
+ </type>
+ <type name="Program+Derived">
+ <method name="Void TestOut(Int32 ByRef)" attrs="198">
+ <size>50</size>
+ </method>
+ <method name="Void &lt;TestOut&gt;__BaseCallProxy1(Int32 ByRef)" attrs="129">
+ <size>8</size>
+ </method>
+ </type>
+ <type name="Program+Derived+&lt;TestOut&gt;c__AnonStorey0">
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="Program+DerivedLibrary">
+ <method name="Void &lt;Print&gt;m__0()" attrs="129">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Program+Derived+&lt;TestOut&gt;c__AnonStorey0">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>30</size>
+ </method>
+ </type>
</test>
<test name="test-anon-95.cs">
<type name="D">
@@ -55105,21 +56017,25 @@
</method>
</type>
<type name="C+&lt;Test&gt;c__AnonStorey0">
- <method name="Void &lt;&gt;m__1()" attrs="131">
- <size>72</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="C+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey2">
- <method name="Void &lt;&gt;m__2()" attrs="131">
- <size>25</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="C+&lt;Test&gt;c__AnonStorey0">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>72</size>
+ </method>
+ </type>
+ <type name="C+&lt;Test&gt;c__AnonStorey0+&lt;Test&gt;c__AnonStorey2">
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>25</size>
+ </method>
+ </type>
</test>
<test name="test-async-01.cs">
<type name="Program">
@@ -55332,9 +56248,6 @@
<method name="Int32 Main()" attrs="150">
<size>482</size>
</method>
- <method name="System.Threading.Tasks.Task`1[System.Decimal] &lt;Main&gt;m__4(Decimal)" attrs="145">
- <size>41</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -55390,9 +56303,6 @@
<method name="Void &lt;&gt;m__5()" attrs="131">
<size>34</size>
</method>
- <method name="Void &lt;&gt;m__6()" attrs="131">
- <size>34</size>
- </method>
</type>
<type name="Program+&lt;Main&gt;c__AnonStorey1+&lt;Main&gt;c__async5">
<method name="Void MoveNext()" attrs="486">
@@ -55403,17 +56313,11 @@
</method>
</type>
<type name="Program+&lt;Main&gt;c__AnonStorey1+&lt;Main&gt;c__async3+&lt;Main&gt;c__AnonStorey4">
- <method name="System.String &lt;&gt;m__7()" attrs="131">
- <size>52</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Program+&lt;Main&gt;c__AnonStorey1+&lt;Main&gt;c__async5+&lt;Main&gt;c__AnonStorey6">
- <method name="Decimal &lt;&gt;m__8()" attrs="131">
- <size>52</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -55426,15 +56330,32 @@
<size>13</size>
</method>
</type>
+ <type name="Program">
+ <method name="System.Threading.Tasks.Task`1[System.Decimal] &lt;Main&gt;m__0(Decimal)" attrs="145">
+ <size>41</size>
+ </method>
+ </type>
+ <type name="Program+&lt;Main&gt;c__AnonStorey1">
+ <method name="Void &lt;&gt;m__4()" attrs="131">
+ <size>34</size>
+ </method>
+ </type>
+ <type name="Program+&lt;Main&gt;c__AnonStorey1+&lt;Main&gt;c__async3+&lt;Main&gt;c__AnonStorey4">
+ <method name="System.String &lt;&gt;m__0()" attrs="131">
+ <size>52</size>
+ </method>
+ </type>
+ <type name="Program+&lt;Main&gt;c__AnonStorey1+&lt;Main&gt;c__async5+&lt;Main&gt;c__AnonStorey6">
+ <method name="Decimal &lt;&gt;m__0()" attrs="131">
+ <size>52</size>
+ </method>
+ </type>
</test>
<test name="test-async-07.cs">
<type name="Program">
<method name="Int32 Main()" attrs="150">
<size>358</size>
</method>
- <method name="System.Threading.Tasks.Task`1[System.Int16] &lt;Main&gt;m__2(Int16)" attrs="145">
- <size>41</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -55447,7 +56368,7 @@
<size>41</size>
</method>
<method name="Void &lt;&gt;m__3()" attrs="131">
- <size>35</size>
+ <size>34</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -55461,14 +56382,6 @@
<size>13</size>
</method>
</type>
- <type name="Program+&lt;Main&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__5()" attrs="131">
- <size>34</size>
- </method>
- <method name="Void &lt;&gt;m__6()" attrs="131">
- <size>46</size>
- </method>
- </type>
<type name="Program+&lt;Main&gt;c__AnonStorey1+&lt;Main&gt;c__async3">
<method name="Void MoveNext()" attrs="486">
<size>191</size>
@@ -55486,9 +56399,6 @@
</method>
</type>
<type name="Program+&lt;Main&gt;c__AnonStorey1+&lt;Main&gt;c__async0+&lt;Main&gt;c__AnonStorey2">
- <method name="System.String &lt;&gt;m__4()" attrs="131">
- <size>52</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -55501,6 +56411,24 @@
<size>13</size>
</method>
</type>
+ <type name="Program">
+ <method name="System.Threading.Tasks.Task`1[System.Int16] &lt;Main&gt;m__0(Int16)" attrs="145">
+ <size>41</size>
+ </method>
+ </type>
+ <type name="Program+&lt;Main&gt;c__AnonStorey1">
+ <method name="Void &lt;&gt;m__2()" attrs="131">
+ <size>35</size>
+ </method>
+ <method name="Void &lt;&gt;m__4()" attrs="131">
+ <size>46</size>
+ </method>
+ </type>
+ <type name="Program+&lt;Main&gt;c__AnonStorey1+&lt;Main&gt;c__async0+&lt;Main&gt;c__AnonStorey2">
+ <method name="System.String &lt;&gt;m__0()" attrs="131">
+ <size>52</size>
+ </method>
+ </type>
</test>
<test name="test-async-08.cs">
<type name="AsyncTypeInference">
@@ -55539,17 +56467,11 @@
<method name="Void MoveNext()" attrs="486">
<size>196</size>
</method>
- <method name="Int32 &lt;&gt;m__5()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="AsyncTypeInference+&lt;Main&gt;c__async5">
<method name="Void MoveNext()" attrs="486">
<size>197</size>
</method>
- <method name="Int32 &lt;&gt;m__6()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="AsyncTypeInference+&lt;Main&gt;c__async8">
<method name="Void MoveNext()" attrs="486">
@@ -55581,6 +56503,16 @@
<size>13</size>
</method>
</type>
+ <type name="AsyncTypeInference+&lt;Main&gt;c__async2">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="AsyncTypeInference+&lt;Main&gt;c__async5">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="test-async-09.cs">
<type name="Test">
@@ -55647,9 +56579,6 @@
<size>338</size>
</method>
<method name="System.String &lt;&gt;m__1()" attrs="145">
- <size>21</size>
- </method>
- <method name="System.String &lt;&gt;m__2()" attrs="145">
<size>13</size>
</method>
</type>
@@ -55657,58 +56586,31 @@
<method name="Void MoveNext()" attrs="486">
<size>257</size>
</method>
- <method name="System.String &lt;&gt;m__3()" attrs="145">
- <size>13</size>
- </method>
</type>
<type name="C+&lt;TestCompositionCall_3&gt;c__async2">
<method name="Void MoveNext()" attrs="486">
<size>310</size>
</method>
- <method name="Byte &lt;&gt;m__4()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="C+&lt;TestCompositionPair_1&gt;c__async3">
<method name="Void MoveNext()" attrs="486">
<size>208</size>
</method>
- <method name="Int32 &lt;&gt;m__5()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="C+&lt;TestCompositionPair_2&gt;c__async4">
<method name="Void MoveNext()" attrs="486">
<size>329</size>
</method>
- <method name="Int32 &lt;&gt;m__6()" attrs="145">
- <size>17</size>
- </method>
- <method name="Int32 &lt;&gt;m__7()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="C+&lt;TestCompositionPair_3&gt;c__async5">
<method name="Void MoveNext()" attrs="486">
<size>209</size>
</method>
- <method name="Int32 &lt;&gt;m__8()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="C+&lt;TestCompositionPair_4&gt;c__async6">
<method name="Void MoveNext()" attrs="486">
<size>467</size>
</method>
- <method name="Int32 &lt;&gt;m__9()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__A()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__B()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="C+&lt;M&gt;c__AnonStorey7">
<method name="Byte &lt;&gt;m__0()" attrs="131">
@@ -55753,6 +56655,50 @@
<size>13</size>
</method>
</type>
+ <type name="C+&lt;TestCompositionCall_1&gt;c__async0">
+ <method name="System.String &lt;&gt;m__0()" attrs="145">
+ <size>21</size>
+ </method>
+ </type>
+ <type name="C+&lt;TestCompositionCall_2&gt;c__async1">
+ <method name="System.String &lt;&gt;m__0()" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="C+&lt;TestCompositionCall_3&gt;c__async2">
+ <method name="Byte &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="C+&lt;TestCompositionPair_1&gt;c__async3">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="C+&lt;TestCompositionPair_2&gt;c__async4">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="C+&lt;TestCompositionPair_3&gt;c__async5">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="C+&lt;TestCompositionPair_4&gt;c__async6">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="test-async-11.cs">
<type name="G`1[T]">
@@ -55814,76 +56760,64 @@
<method name="Int32 &lt;&gt;m__0()" attrs="145">
<size>9</size>
</method>
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
</type>
- <type name="C+&lt;TestStack_1&gt;c__async1">
+ <type name="C+&lt;TestStack_1&gt;c__async0">
<method name="Void MoveNext()" attrs="486">
<size>327</size>
</method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
<size>9</size>
</method>
</type>
- <type name="C+&lt;TestStack_2&gt;c__async2">
+ <type name="C+&lt;TestStack_2&gt;c__async1">
<method name="Void MoveNext()" attrs="486">
<size>302</size>
</method>
- <method name="Int32 &lt;&gt;m__2()" attrs="145">
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
<size>9</size>
</method>
</type>
- <type name="C+&lt;TestStack_3&gt;c__async3">
+ <type name="C+&lt;TestStack_3&gt;c__async2">
<method name="Void MoveNext()" attrs="486">
<size>467</size>
</method>
- <method name="Int32 &lt;&gt;m__3()" attrs="145">
- <size>9</size>
- </method>
- </type>
- <type name="C+&lt;TestStack_4&gt;c__async4">
- <method name="Void MoveNext()" attrs="486">
- <size>323</size>
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__4()" attrs="145">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
<size>9</size>
</method>
</type>
- <type name="C+&lt;TestStack_5&gt;c__async5">
+ <type name="C+&lt;TestStack_4&gt;c__async3">
<method name="Void MoveNext()" attrs="486">
- <size>347</size>
- </method>
- </type>
- <type name="G`1+&lt;TestStack_1&gt;c__async0[T]">
- <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
- <size>13</size>
- </method>
- </type>
- <type name="C+&lt;TestStack_1&gt;c__async1">
- <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <size>323</size>
</method>
- </type>
- <type name="C+&lt;TestStack_2&gt;c__async2">
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- </type>
- <type name="C+&lt;TestStack_3&gt;c__async3">
- <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
</method>
</type>
- <type name="C+&lt;TestStack_4&gt;c__async4">
- <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <type name="C+&lt;TestStack_5&gt;c__async4">
+ <method name="Void MoveNext()" attrs="486">
+ <size>347</size>
</method>
- </type>
- <type name="C+&lt;TestStack_5&gt;c__async5">
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
</type>
- <type name="C+&lt;TestStack_5&gt;c__async5+&lt;TestStack_5&gt;c__AnonStorey6">
- <method name="Int32 &lt;&gt;m__5()" attrs="131">
+ <type name="C+&lt;TestStack_5&gt;c__async4+&lt;TestStack_5&gt;c__AnonStorey5">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
<size>48</size>
</method>
<method name="Void .ctor()" attrs="6278">
@@ -56220,129 +57154,51 @@
<method name="Void MoveNext()" attrs="486">
<size>335</size>
</method>
- <method name="Boolean &lt;&gt;m__4()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__5()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;ArrayAccessTest_2&gt;c__async1">
<method name="Void MoveNext()" attrs="486">
<size>740</size>
</method>
- <method name="Int32 &lt;&gt;m__6()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__7()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__8()" attrs="145">
- <size>9</size>
- </method>
- <method name="Double &lt;&gt;m__9()" attrs="145">
- <size>17</size>
- </method>
</type>
<type name="Tester+&lt;ArrayAccessTest_3&gt;c__async2">
<method name="Void MoveNext()" attrs="486">
<size>1090</size>
</method>
- <method name="Int32 &lt;&gt;m__A()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__B()" attrs="145">
- <size>9</size>
- </method>
- <method name="Decimal &lt;&gt;m__C()" attrs="145">
- <size>19</size>
- </method>
- <method name="Int32 &lt;&gt;m__D()" attrs="145">
- <size>9</size>
- </method>
- <method name="Decimal &lt;&gt;m__E()" attrs="145">
- <size>19</size>
- </method>
</type>
<type name="Tester+&lt;ArrayAccessTest_4&gt;c__async3">
<method name="Void MoveNext()" attrs="486">
<size>421</size>
</method>
- <method name="Int32 &lt;&gt;m__F()" attrs="145">
- <size>9</size>
- </method>
- <method name="System.String &lt;&gt;m__10()" attrs="145">
- <size>13</size>
- </method>
</type>
<type name="Tester+&lt;ArrayAccessTest_5&gt;c__async4">
<method name="Void MoveNext()" attrs="486">
<size>428</size>
</method>
- <method name="Int32 &lt;&gt;m__11()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;ArrayAccessTest_6&gt;c__async5">
<method name="Void MoveNext()" attrs="486">
<size>257</size>
</method>
- <method name="Int64 &lt;&gt;m__13()" attrs="145">
- <size>10</size>
- </method>
</type>
<type name="Tester+&lt;ArrayAccessTest_7&gt;c__async6">
<method name="Void MoveNext()" attrs="486">
<size>426</size>
</method>
- <method name="Int32 &lt;&gt;m__14()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;ArrayAccessTest_8&gt;c__async7">
<method name="Void MoveNext()" attrs="486">
<size>792</size>
</method>
- <method name="Int32 &lt;&gt;m__15()" attrs="145">
- <size>9</size>
- </method>
- <method name="Byte &lt;&gt;m__16()" attrs="145">
- <size>10</size>
- </method>
</type>
<type name="Tester+&lt;ArrayAccessTest_9&gt;c__async8">
<method name="Void MoveNext()" attrs="486">
<size>1209</size>
</method>
- <method name="Int32 &lt;&gt;m__17()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__18()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__19()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__1A()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__1B()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__1C()" attrs="145">
- <size>9</size>
- </method>
- <method name="S &lt;&gt;m__1D()" attrs="145">
- <size>25</size>
- </method>
</type>
<type name="Tester+&lt;AssignTest_1&gt;c__async9">
<method name="Void MoveNext()" attrs="486">
<size>223</size>
</method>
- <method name="Int32 &lt;&gt;m__1E()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;AssignTest_2&gt;c__asyncA">
<method name="Void MoveNext()" attrs="486">
@@ -56353,26 +57209,11 @@
<method name="Void MoveNext()" attrs="486">
<size>364</size>
</method>
- <method name="Int32 &lt;&gt;m__20()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__21()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;BinaryTest_1&gt;c__asyncC">
<method name="Void MoveNext()" attrs="486">
<size>435</size>
</method>
- <method name="Int32 &lt;&gt;m__22()" attrs="145">
- <size>17</size>
- </method>
- <method name="Int32 &lt;&gt;m__23()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__24()" attrs="145">
- <size>10</size>
- </method>
</type>
<type name="Tester+&lt;BinaryTest_2&gt;c__asyncD">
<method name="Void MoveNext()" attrs="486">
@@ -56482,57 +57323,52 @@
<size>13</size>
</method>
</type>
- <type name="Tester+&lt;CallTest_1&gt;c__async11">
+ <type name="Tester">
+ <method name="System.Threading.Tasks.Task`1[System.Boolean] BinaryTest_6()" attrs="129">
+ <size>33</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;BinaryTest_6&gt;c__async11">
<method name="Void MoveNext()" attrs="486">
- <size>430</size>
+ <size>209</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__32()" attrs="145">
- <size>17</size>
- </method>
- <method name="Int32 &lt;&gt;m__33()" attrs="145">
- <size>10</size>
+ </type>
+ <type name="Tester+&lt;CallTest_1&gt;c__async12">
+ <method name="Void MoveNext()" attrs="486">
+ <size>430</size>
</method>
- <method name="Int32 &lt;&gt;m__34()" attrs="145">
- <size>9</size>
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
- <type name="Tester+&lt;CallTest_2&gt;c__async12">
+ <type name="Tester+&lt;CallTest_2&gt;c__async13">
<method name="Void MoveNext()" attrs="486">
<size>267</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__35()" attrs="145">
- <size>17</size>
- </method>
</type>
- <type name="Tester+&lt;CallTest_3&gt;c__async13">
+ <type name="Tester+&lt;CallTest_3&gt;c__async14">
<method name="Void MoveNext()" attrs="486">
<size>237</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__36()" attrs="145">
- <size>10</size>
- </method>
</type>
- <type name="Tester+&lt;CallTest_4&gt;c__async14">
+ <type name="Tester+&lt;CallTest_4&gt;c__async15">
<method name="Void MoveNext()" attrs="486">
<size>234</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="E &lt;&gt;m__37()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;CallTest_5&gt;c__async15">
+ <type name="Tester+&lt;CallTest_5&gt;c__async16">
<method name="Void MoveNext()" attrs="486">
<size>250</size>
</method>
@@ -56540,18 +57376,15 @@
<size>13</size>
</method>
</type>
- <type name="Tester+&lt;CastTest_1&gt;c__async16">
+ <type name="Tester+&lt;CastTest_1&gt;c__async17">
<method name="Void MoveNext()" attrs="486">
<size>246</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Decimal &lt;&gt;m__39()" attrs="145">
- <size>15</size>
- </method>
</type>
- <type name="Tester+&lt;CastTest_2&gt;c__async17">
+ <type name="Tester+&lt;CastTest_2&gt;c__async18">
<method name="Void MoveNext()" attrs="486">
<size>233</size>
</method>
@@ -56559,96 +57392,63 @@
<size>13</size>
</method>
</type>
- <type name="Tester+&lt;CoalescingTest_1&gt;c__async18">
+ <type name="Tester+&lt;CoalescingTest_1&gt;c__async19">
<method name="Void MoveNext()" attrs="486">
<size>358</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="System.String &lt;&gt;m__3B()" attrs="145">
- <size>9</size>
- </method>
- <method name="System.String &lt;&gt;m__3C()" attrs="145">
- <size>13</size>
- </method>
</type>
- <type name="Tester+&lt;CoalescingTest_2&gt;c__async19">
+ <type name="Tester+&lt;CoalescingTest_2&gt;c__async1A">
<method name="Void MoveNext()" attrs="486">
<size>364</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Byte &lt;&gt;m__3E()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;ConditionalTest_1&gt;c__async1A">
+ <type name="Tester+&lt;ConditionalTest_1&gt;c__async1B">
<method name="Void MoveNext()" attrs="486">
<size>197</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__3F()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;ConditionalTest_2&gt;c__async1B">
+ <type name="Tester+&lt;ConditionalTest_2&gt;c__async1C">
<method name="Void MoveNext()" attrs="486">
<size>329</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__40()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__41()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;ConditionalTest_3&gt;c__async1C">
+ <type name="Tester+&lt;ConditionalTest_3&gt;c__async1D">
<method name="Void MoveNext()" attrs="486">
<size>347</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Boolean &lt;&gt;m__42()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__43()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;ConditionalTest_4&gt;c__async1D">
+ <type name="Tester+&lt;ConditionalTest_4&gt;c__async1E">
<method name="Void MoveNext()" attrs="486">
<size>243</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__44()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;DelegateInvoke_4&gt;c__async1E">
+ <type name="Tester+&lt;DelegateInvoke_4&gt;c__async1F">
<method name="Void MoveNext()" attrs="486">
<size>271</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__45(Int32)" attrs="145">
- <size>11</size>
- </method>
- <method name="Int32 &lt;&gt;m__46()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;EventInvoke_1&gt;c__async1F">
+ <type name="Tester+&lt;EventInvoke_1&gt;c__async20">
<method name="Void MoveNext()" attrs="486">
<size>260</size>
</method>
@@ -56656,96 +57456,63 @@
<size>13</size>
</method>
</type>
- <type name="Tester+&lt;FieldTest_1&gt;c__async20">
+ <type name="Tester+&lt;FieldTest_1&gt;c__async21">
<method name="Void MoveNext()" attrs="486">
<size>535</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__49()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__4A()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;IndexerTest_1&gt;c__async21">
+ <type name="Tester+&lt;IndexerTest_1&gt;c__async22">
<method name="Void MoveNext()" attrs="486">
<size>225</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__4B()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;IndexerTest_2&gt;c__async22">
+ <type name="Tester+&lt;IndexerTest_2&gt;c__async23">
<method name="Void MoveNext()" attrs="486">
<size>335</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__4C()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__4D()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;IndexerTest_3&gt;c__async23">
+ <type name="Tester+&lt;IndexerTest_3&gt;c__async24">
<method name="Void MoveNext()" attrs="486">
<size>402</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__4F()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;IndexerTest_4&gt;c__async24">
+ <type name="Tester+&lt;IndexerTest_4&gt;c__async25">
<method name="Void MoveNext()" attrs="486">
<size>442</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__51()" attrs="145">
- <size>10</size>
- </method>
</type>
- <type name="Tester+&lt;IndexerTest_5&gt;c__async25">
+ <type name="Tester+&lt;IndexerTest_5&gt;c__async26">
<method name="Void MoveNext()" attrs="486">
<size>548</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__53()" attrs="145">
- <size>10</size>
- </method>
</type>
- <type name="Tester+&lt;IndexerTest_6&gt;c__async26">
+ <type name="Tester+&lt;IndexerTest_6&gt;c__async27">
<method name="Void MoveNext()" attrs="486">
<size>544</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__54()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__55()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__56()" attrs="145">
- <size>10</size>
- </method>
</type>
- <type name="Tester+&lt;IndexerTest_7&gt;c__async27">
+ <type name="Tester+&lt;IndexerTest_7&gt;c__async28">
<method name="Void MoveNext()" attrs="486">
<size>295</size>
</method>
@@ -56753,18 +57520,15 @@
<size>13</size>
</method>
</type>
- <type name="Tester+&lt;IsTest_1&gt;c__async28">
+ <type name="Tester+&lt;IsTest_1&gt;c__async29">
<method name="Void MoveNext()" attrs="486">
<size>233</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Tester &lt;&gt;m__58()" attrs="145">
- <size>13</size>
- </method>
</type>
- <type name="Tester+&lt;IsTest_2&gt;c__async29">
+ <type name="Tester+&lt;IsTest_2&gt;c__async2A">
<method name="Void MoveNext()" attrs="486">
<size>233</size>
</method>
@@ -56772,256 +57536,151 @@
<size>13</size>
</method>
</type>
- <type name="Tester+&lt;LogicalUserOperator_1&gt;c__async2A">
+ <type name="Tester+&lt;LogicalUserOperator_1&gt;c__async2B">
<method name="Void MoveNext()" attrs="486">
<size>391</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Base &lt;&gt;m__5A()" attrs="145">
- <size>13</size>
- </method>
- <method name="Base &lt;&gt;m__5B()" attrs="145">
- <size>13</size>
- </method>
</type>
- <type name="Tester+&lt;LogicalUserOperator_2&gt;c__async2B">
+ <type name="Tester+&lt;LogicalUserOperator_2&gt;c__async2C">
<method name="Void MoveNext()" attrs="486">
<size>299</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Base &lt;&gt;m__5C()" attrs="145">
- <size>13</size>
- </method>
</type>
- <type name="Tester+&lt;LogicalUserOperator_3&gt;c__async2C">
+ <type name="Tester+&lt;LogicalUserOperator_3&gt;c__async2D">
<method name="Void MoveNext()" attrs="486">
<size>390</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Base &lt;&gt;m__5D()" attrs="145">
- <size>13</size>
- </method>
- <method name="Base &lt;&gt;m__5E()" attrs="145">
- <size>13</size>
- </method>
</type>
- <type name="Tester+&lt;NewTest_1&gt;c__async2D">
+ <type name="Tester+&lt;NewTest_1&gt;c__async2E">
<method name="Void MoveNext()" attrs="486">
<size>260</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__5F()" attrs="145">
- <size>10</size>
- </method>
</type>
- <type name="Tester+&lt;NewTest_2&gt;c__async2E">
+ <type name="Tester+&lt;NewTest_2&gt;c__async2F">
<method name="Void MoveNext()" attrs="486">
<size>348</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__60()" attrs="145">
- <size>10</size>
- </method>
- <method name="System.String &lt;&gt;m__61()" attrs="145">
- <size>13</size>
- </method>
</type>
- <type name="Tester+&lt;NewInitTest_1&gt;c__async2F">
+ <type name="Tester+&lt;NewInitTest_1&gt;c__async30">
<method name="Void MoveNext()" attrs="486">
<size>1026</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__62()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__63()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__64()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__65()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__66()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__67()" attrs="145">
- <size>10</size>
- </method>
</type>
- <type name="Tester+&lt;NewInitTest_2&gt;c__async30">
+ <type name="Tester+&lt;NewInitTest_2&gt;c__async31">
<method name="Void MoveNext()" attrs="486">
<size>739</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="System.String &lt;&gt;m__68()" attrs="145">
- <size>13</size>
- </method>
- <method name="System.String &lt;&gt;m__69()" attrs="145">
- <size>13</size>
- </method>
- <method name="Int32 &lt;&gt;m__6A()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__6B()" attrs="145">
- <size>10</size>
- </method>
</type>
- <type name="Tester+&lt;NewArrayInitTest_1&gt;c__async31">
+ <type name="Tester+&lt;NewArrayInitTest_1&gt;c__async32">
<method name="Void MoveNext()" attrs="486">
<size>240</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__6C()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;NewArrayInitTest_2&gt;c__async32">
+ <type name="Tester+&lt;NewArrayInitTest_2&gt;c__async33">
<method name="Void MoveNext()" attrs="486">
<size>355</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__6D()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__6E()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;NewArrayInitTest_3&gt;c__async33">
+ <type name="Tester+&lt;NewArrayInitTest_3&gt;c__async34">
<method name="Void MoveNext()" attrs="486">
<size>246</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Byte &lt;&gt;m__6F()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;NewArrayInitTest_4&gt;c__async34">
+ <type name="Tester+&lt;NewArrayInitTest_4&gt;c__async35">
<method name="Void MoveNext()" attrs="486">
<size>427</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="UInt16 &lt;&gt;m__70()" attrs="145">
- <size>9</size>
- </method>
- <method name="UInt16 &lt;&gt;m__71()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;NewArrayInitTest_5&gt;c__async35">
+ <type name="Tester+&lt;NewArrayInitTest_5&gt;c__async36">
<method name="Void MoveNext()" attrs="486">
<size>264</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="S &lt;&gt;m__72()" attrs="145">
- <size>25</size>
- </method>
</type>
- <type name="Tester+&lt;NewArrayInitTest_6&gt;c__async36">
+ <type name="Tester+&lt;NewArrayInitTest_6&gt;c__async37">
<method name="Void MoveNext()" attrs="486">
<size>266</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__73()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;PropertyTest_1&gt;c__async37">
+ <type name="Tester+&lt;PropertyTest_1&gt;c__async38">
<method name="Void MoveNext()" attrs="486">
<size>222</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__74()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;PropertyTest_2&gt;c__async38">
+ <type name="Tester+&lt;PropertyTest_2&gt;c__async39">
<method name="Void MoveNext()" attrs="486">
<size>295</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__75()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;PropertyTest_3&gt;c__async39">
+ <type name="Tester+&lt;PropertyTest_3&gt;c__async3A">
<method name="Void MoveNext()" attrs="486">
<size>645</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__76()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__77()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__78()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;StringConcatTest_1&gt;c__async3A">
+ <type name="Tester+&lt;StringConcatTest_1&gt;c__async3B">
<method name="Void MoveNext()" attrs="486">
<size>455</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="System.String &lt;&gt;m__79()" attrs="145">
- <size>13</size>
- </method>
- <method name="System.String &lt;&gt;m__7A()" attrs="145">
- <size>13</size>
- </method>
- <method name="System.String &lt;&gt;m__7B()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;UnaryTest_1&gt;c__async3B">
+ <type name="Tester+&lt;UnaryTest_1&gt;c__async3C">
<method name="Void MoveNext()" attrs="486">
<size>233</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__7C()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;UnaryTest_2&gt;c__async3C">
+ <type name="Tester+&lt;UnaryTest_2&gt;c__async3D">
<method name="Void MoveNext()" attrs="486">
<size>339</size>
</method>
@@ -57029,165 +57688,571 @@
<size>13</size>
</method>
</type>
- <type name="Tester+&lt;UnaryTest_3&gt;c__async3D">
+ <type name="Tester+&lt;UnaryTest_3&gt;c__async3E">
<method name="Void MoveNext()" attrs="486">
<size>372</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__7E()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester+&lt;VariableInitializer_1&gt;c__async3E">
+ <type name="Tester+&lt;VariableInitializer_1&gt;c__async3F">
<method name="Void MoveNext()" attrs="486">
<size>348</size>
</method>
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__7F()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__80()" attrs="145">
- <size>9</size>
- </method>
</type>
- <type name="Tester">
- <method name="Tester &lt;CastTest_2&gt;m__3A()" attrs="129">
- <size>9</size>
+ <type name="Tester+&lt;ArrayAccessTest_5&gt;c__async4+&lt;ArrayAccessTest_5&gt;c__AnonStorey40">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
</method>
</type>
- <type name="Tester+&lt;ArrayAccessTest_5&gt;c__async4+&lt;ArrayAccessTest_5&gt;c__AnonStorey3F">
- <method name="Int32 &lt;&gt;m__12()" attrs="131">
- <size>25</size>
+ <type name="Tester+&lt;BinaryTest_2&gt;c__asyncD+&lt;BinaryTest_2&gt;c__AnonStorey41">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
</method>
+ </type>
+ <type name="Tester+&lt;CallTest_5&gt;c__async16+&lt;CallTest_5&gt;c__AnonStorey42">
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
- <type name="Tester+&lt;BinaryTest_2&gt;c__asyncD+&lt;BinaryTest_2&gt;c__AnonStorey40">
- <method name="Boolean &lt;&gt;m__25()" attrs="131">
- <size>24</size>
+ <type name="Tester+&lt;EventInvoke_1&gt;c__async20+&lt;EventInvoke_1&gt;c__AnonStorey43">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
</method>
- <method name="Boolean &lt;&gt;m__26()" attrs="131">
- <size>24</size>
+ </type>
+ <type name="Tester+&lt;IndexerTest_3&gt;c__async24+&lt;IndexerTest_3&gt;c__AnonStorey44">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
</method>
- <method name="Boolean &lt;&gt;m__27()" attrs="131">
- <size>24</size>
+ </type>
+ <type name="Tester+&lt;IndexerTest_4&gt;c__async25+&lt;IndexerTest_4&gt;c__AnonStorey45">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
</method>
+ </type>
+ <type name="Tester+&lt;IndexerTest_5&gt;c__async26+&lt;IndexerTest_5&gt;c__AnonStorey46">
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
- <type name="Tester+&lt;CallTest_5&gt;c__async15+&lt;CallTest_5&gt;c__AnonStorey41">
- <method name="Int32 &lt;&gt;m__38()" attrs="131">
- <size>25</size>
+ <type name="Tester+&lt;IndexerTest_7&gt;c__async28+&lt;IndexerTest_7&gt;c__AnonStorey47">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
</method>
+ </type>
+ <type name="Tester+&lt;UnaryTest_2&gt;c__async3D+&lt;UnaryTest_2&gt;c__AnonStorey48">
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
- <type name="Tester+&lt;EventInvoke_1&gt;c__async1F+&lt;EventInvoke_1&gt;c__AnonStorey42">
- <method name="System.Action &lt;&gt;m__47()" attrs="131">
- <size>23</size>
+ <type name="Tester">
+ <method name="Tester &lt;CastTest_2&gt;m__4()" attrs="129">
+ <size>9</size>
</method>
- <method name="Void &lt;&gt;m__48()" attrs="131">
+ </type>
+ <type name="Tester+&lt;ArrayAccessTest_1&gt;c__async0">
+ <method name="Boolean &lt;&gt;m__0()" attrs="145">
<size>9</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
</method>
</type>
- <type name="Tester+&lt;IndexerTest_3&gt;c__async23+&lt;IndexerTest_3&gt;c__AnonStorey43">
- <method name="Int32 &lt;&gt;m__4E()" attrs="131">
- <size>25</size>
+ <type name="Tester+&lt;ArrayAccessTest_2&gt;c__async1">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Double &lt;&gt;m__3()" attrs="145">
+ <size>17</size>
</method>
</type>
- <type name="Tester+&lt;IndexerTest_4&gt;c__async24+&lt;IndexerTest_4&gt;c__AnonStorey44">
- <method name="Int32 &lt;&gt;m__50()" attrs="131">
- <size>25</size>
+ <type name="Tester+&lt;ArrayAccessTest_3&gt;c__async2">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Decimal &lt;&gt;m__2()" attrs="145">
+ <size>19</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__3()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Decimal &lt;&gt;m__4()" attrs="145">
+ <size>19</size>
</method>
</type>
- <type name="Tester+&lt;IndexerTest_5&gt;c__async25+&lt;IndexerTest_5&gt;c__AnonStorey45">
- <method name="Int32 &lt;&gt;m__52()" attrs="131">
- <size>25</size>
+ <type name="Tester+&lt;ArrayAccessTest_4&gt;c__async3">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
+ <method name="System.String &lt;&gt;m__1()" attrs="145">
+ <size>13</size>
</method>
</type>
- <type name="Tester+&lt;IndexerTest_7&gt;c__async27+&lt;IndexerTest_7&gt;c__AnonStorey46">
- <method name="Int32 &lt;&gt;m__57()" attrs="131">
- <size>25</size>
+ <type name="Tester+&lt;ArrayAccessTest_5&gt;c__async4">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
+ </type>
+ <type name="Tester+&lt;ArrayAccessTest_6&gt;c__async5">
+ <method name="Int64 &lt;&gt;m__0()" attrs="145">
+ <size>10</size>
</method>
</type>
- <type name="Tester+&lt;UnaryTest_2&gt;c__async3C+&lt;UnaryTest_2&gt;c__AnonStorey47">
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
+ <type name="Tester+&lt;ArrayAccessTest_7&gt;c__async6">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ArrayAccessTest_8&gt;c__async7">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Byte &lt;&gt;m__1()" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ArrayAccessTest_9&gt;c__async8">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2()" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__3()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__4()" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__5()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="S &lt;&gt;m__6()" attrs="145">
+ <size>25</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;AssignTest_1&gt;c__async9">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
</method>
</type>
<type name="Tester+&lt;AssignTest_2&gt;c__asyncA">
- <method name="System.Nullable`1[System.SByte] &lt;&gt;m__1F()" attrs="145">
+ <method name="System.Nullable`1[System.SByte] &lt;&gt;m__0()" attrs="145">
<size>17</size>
</method>
</type>
+ <type name="Tester+&lt;AssignTest_3&gt;c__asyncB">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;BinaryTest_1&gt;c__asyncC">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2()" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
<type name="Tester+&lt;BinaryTest_3&gt;c__asyncE">
- <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__28()" attrs="145">
+ <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__0()" attrs="145">
<size>14</size>
</method>
- <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__29()" attrs="145">
+ <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__1()" attrs="145">
<size>17</size>
</method>
- <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__2A()" attrs="145">
+ <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__2()" attrs="145">
<size>17</size>
</method>
- <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__2B()" attrs="145">
+ <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__3()" attrs="145">
<size>14</size>
</method>
- <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__2C()" attrs="145">
+ <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__4()" attrs="145">
<size>17</size>
</method>
- <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__2D()" attrs="145">
+ <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__5()" attrs="145">
<size>14</size>
</method>
</type>
<type name="Tester+&lt;BinaryTest_4&gt;c__asyncF">
- <method name="System.Nullable`1[System.Int16] &lt;&gt;m__2E()" attrs="145">
+ <method name="System.Nullable`1[System.Int16] &lt;&gt;m__0()" attrs="145">
<size>14</size>
</method>
- <method name="System.Nullable`1[System.Byte] &lt;&gt;m__2F()" attrs="145">
+ <method name="System.Nullable`1[System.Byte] &lt;&gt;m__1()" attrs="145">
<size>17</size>
</method>
- <method name="System.Nullable`1[System.Decimal] &lt;&gt;m__30()" attrs="145">
+ <method name="System.Nullable`1[System.Decimal] &lt;&gt;m__2()" attrs="145">
<size>20</size>
</method>
- <method name="System.Nullable`1[System.Decimal] &lt;&gt;m__31()" attrs="145">
+ <method name="System.Nullable`1[System.Decimal] &lt;&gt;m__3()" attrs="145">
+ <size>17</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;CallTest_1&gt;c__async12">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
<size>17</size>
</method>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2()" attrs="145">
+ <size>9</size>
+ </method>
</type>
- <type name="Tester+&lt;CoalescingTest_2&gt;c__async19">
- <method name="System.Nullable`1[System.Int16] &lt;&gt;m__3D()" attrs="145">
+ <type name="Tester+&lt;CallTest_2&gt;c__async13">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
<size>17</size>
</method>
</type>
- <type name="Tester+&lt;IsTest_2&gt;c__async29">
- <method name="System.Nullable`1[System.UInt32] &lt;&gt;m__59()" attrs="145">
+ <type name="Tester+&lt;CallTest_3&gt;c__async14">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;CallTest_4&gt;c__async15">
+ <method name="E &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;CastTest_1&gt;c__async17">
+ <method name="Decimal &lt;&gt;m__0()" attrs="145">
+ <size>15</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;CoalescingTest_1&gt;c__async19">
+ <method name="System.String &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="System.String &lt;&gt;m__1()" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;CoalescingTest_2&gt;c__async1A">
+ <method name="System.Nullable`1[System.Int16] &lt;&gt;m__0()" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="Byte &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ConditionalTest_1&gt;c__async1B">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ConditionalTest_2&gt;c__async1C">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ConditionalTest_3&gt;c__async1D">
+ <method name="Boolean &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ConditionalTest_4&gt;c__async1E">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;DelegateInvoke_4&gt;c__async1F">
+ <method name="Int32 &lt;&gt;m__0(Int32)" attrs="145">
+ <size>11</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;FieldTest_1&gt;c__async21">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IndexerTest_1&gt;c__async22">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IndexerTest_2&gt;c__async23">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IndexerTest_3&gt;c__async24">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IndexerTest_4&gt;c__async25">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IndexerTest_5&gt;c__async26">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IndexerTest_6&gt;c__async27">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2()" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IsTest_1&gt;c__async29">
+ <method name="Tester &lt;&gt;m__0()" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IsTest_2&gt;c__async2A">
+ <method name="System.Nullable`1[System.UInt32] &lt;&gt;m__0()" attrs="145">
<size>14</size>
</method>
</type>
- <type name="Tester+&lt;UnaryTest_2&gt;c__async3C+&lt;UnaryTest_2&gt;c__AnonStorey47">
- <method name="System.Nullable`1[System.Int16] &lt;&gt;m__7D()" attrs="131">
+ <type name="Tester+&lt;LogicalUserOperator_1&gt;c__async2B">
+ <method name="Base &lt;&gt;m__0()" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="Base &lt;&gt;m__1()" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;LogicalUserOperator_2&gt;c__async2C">
+ <method name="Base &lt;&gt;m__0()" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;LogicalUserOperator_3&gt;c__async2D">
+ <method name="Base &lt;&gt;m__0()" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="Base &lt;&gt;m__1()" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewTest_1&gt;c__async2E">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewTest_2&gt;c__async2F">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="System.String &lt;&gt;m__1()" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewInitTest_1&gt;c__async30">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2()" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__3()" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__4()" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__5()" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewInitTest_2&gt;c__async31">
+ <method name="System.String &lt;&gt;m__0()" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="System.String &lt;&gt;m__1()" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2()" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__3()" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewArrayInitTest_1&gt;c__async32">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewArrayInitTest_2&gt;c__async33">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewArrayInitTest_3&gt;c__async34">
+ <method name="Byte &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewArrayInitTest_4&gt;c__async35">
+ <method name="UInt16 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="UInt16 &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewArrayInitTest_5&gt;c__async36">
+ <method name="S &lt;&gt;m__0()" attrs="145">
+ <size>25</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewArrayInitTest_6&gt;c__async37">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;PropertyTest_1&gt;c__async38">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;PropertyTest_2&gt;c__async39">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;PropertyTest_3&gt;c__async3A">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;StringConcatTest_1&gt;c__async3B">
+ <method name="System.String &lt;&gt;m__0()" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="System.String &lt;&gt;m__1()" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="System.String &lt;&gt;m__2()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;UnaryTest_1&gt;c__async3C">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;UnaryTest_3&gt;c__async3E">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;VariableInitializer_1&gt;c__async3F">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ArrayAccessTest_5&gt;c__async4+&lt;ArrayAccessTest_5&gt;c__AnonStorey40">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
+ <size>25</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;BinaryTest_2&gt;c__asyncD+&lt;BinaryTest_2&gt;c__AnonStorey41">
+ <method name="Boolean &lt;&gt;m__0()" attrs="131">
+ <size>24</size>
+ </method>
+ <method name="Boolean &lt;&gt;m__1()" attrs="131">
+ <size>24</size>
+ </method>
+ <method name="Boolean &lt;&gt;m__2()" attrs="131">
+ <size>24</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;CallTest_5&gt;c__async16+&lt;CallTest_5&gt;c__AnonStorey42">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
+ <size>25</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;EventInvoke_1&gt;c__async20+&lt;EventInvoke_1&gt;c__AnonStorey43">
+ <method name="System.Action &lt;&gt;m__0()" attrs="131">
+ <size>23</size>
+ </method>
+ <method name="Void &lt;&gt;m__1()" attrs="131">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IndexerTest_3&gt;c__async24+&lt;IndexerTest_3&gt;c__AnonStorey44">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
+ <size>25</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IndexerTest_4&gt;c__async25+&lt;IndexerTest_4&gt;c__AnonStorey45">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
+ <size>25</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IndexerTest_5&gt;c__async26+&lt;IndexerTest_5&gt;c__AnonStorey46">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
+ <size>25</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IndexerTest_7&gt;c__async28+&lt;IndexerTest_7&gt;c__AnonStorey47">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
+ <size>25</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;UnaryTest_2&gt;c__async3D+&lt;UnaryTest_2&gt;c__AnonStorey48">
+ <method name="System.Nullable`1[System.Int16] &lt;&gt;m__0()" attrs="131">
<size>14</size>
</method>
</type>
@@ -57211,17 +58276,11 @@
<method name="Void MoveNext()" attrs="486">
<size>222</size>
</method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="C+&lt;Main&gt;c__async1">
<method name="Void MoveNext()" attrs="486">
<size>232</size>
</method>
- <method name="Int32 &lt;&gt;m__2()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="C+&lt;TestResult&gt;c__async0">
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
@@ -57233,6 +58292,16 @@
<size>13</size>
</method>
</type>
+ <type name="C+&lt;TestResult&gt;c__async0">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="C+&lt;Main&gt;c__async1">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="test-async-15.cs">
<type name="S">
@@ -57320,9 +58389,6 @@
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="System.String &lt;&gt;m__4()" attrs="145">
- <size>13</size>
- </method>
</type>
<type name="Tester+&lt;Using_1&gt;c__async1">
<method name="Void MoveNext()" attrs="486">
@@ -57331,27 +58397,36 @@
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Base &lt;&gt;m__5()" attrs="145">
+ </type>
+ <type name="Tester+&lt;Foreach_1&gt;c__async2">
+ <method name="Void MoveNext()" attrs="486">
+ <size>331</size>
+ </method>
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Tester &lt;&gt;m__6()" attrs="145">
+ </type>
+ <type name="Tester+&lt;SwitchTest_1&gt;c__async0">
+ <method name="System.String &lt;&gt;m__0()" attrs="145">
<size>13</size>
</method>
- <method name="Base &lt;&gt;m__7()" attrs="145">
+ </type>
+ <type name="Tester+&lt;Using_1&gt;c__async1">
+ <method name="Base &lt;&gt;m__0()" attrs="145">
<size>13</size>
</method>
- <method name="Base &lt;&gt;m__8()" attrs="145">
+ <method name="Tester &lt;&gt;m__1()" attrs="145">
<size>13</size>
</method>
- </type>
- <type name="Tester+&lt;Foreach_1&gt;c__async2">
- <method name="Void MoveNext()" attrs="486">
- <size>331</size>
+ <method name="Base &lt;&gt;m__2()" attrs="145">
+ <size>13</size>
</method>
- <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
+ <method name="Base &lt;&gt;m__3()" attrs="145">
<size>13</size>
</method>
- <method name="System.Collections.Generic.List`1[System.Int32] &lt;&gt;m__9()" attrs="145">
+ </type>
+ <type name="Tester+&lt;Foreach_1&gt;c__async2">
+ <method name="System.Collections.Generic.List`1[System.Int32] &lt;&gt;m__0()" attrs="145">
<size>36</size>
</method>
</type>
@@ -57402,49 +58477,31 @@
<method name="Void MoveNext()" attrs="486">
<size>207</size>
</method>
- <method name="Void &lt;&gt;m__4()" attrs="145">
- <size>7</size>
- </method>
</type>
<type name="Tester+&lt;TestException_2&gt;c__async1">
<method name="Void MoveNext()" attrs="486">
<size>199</size>
</method>
- <method name="Void &lt;&gt;m__5()" attrs="145">
- <size>7</size>
- </method>
</type>
<type name="Tester+&lt;TestException_3&gt;c__async2">
<method name="Void MoveNext()" attrs="486">
<size>206</size>
</method>
- <method name="System.Threading.Tasks.Task &lt;&gt;m__6()" attrs="145">
- <size>33</size>
- </method>
</type>
<type name="Tester+&lt;TestException_4&gt;c__async3">
<method name="Void MoveNext()" attrs="486">
<size>239</size>
</method>
- <method name="Int32 &lt;&gt;m__8()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;TestException_5&gt;c__async4">
<method name="Void MoveNext()" attrs="486">
<size>289</size>
</method>
- <method name="Void &lt;&gt;m__9()" attrs="145">
- <size>7</size>
- </method>
</type>
<type name="Tester+&lt;TestException_6&gt;c__async5">
<method name="Void MoveNext()" attrs="486">
<size>243</size>
</method>
- <method name="Void &lt;&gt;m__A()" attrs="145">
- <size>7</size>
- </method>
</type>
<type name="Tester+&lt;TestException_1&gt;c__async0">
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
@@ -57488,9 +58545,6 @@
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Void &lt;&gt;m__B()" attrs="145">
- <size>7</size>
- </method>
</type>
<type name="Tester+&lt;TestException_3&gt;c__async2+&lt;TestException_3&gt;c__async7">
<method name="Void MoveNext()" attrs="486">
@@ -57499,7 +58553,44 @@
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Void &lt;&gt;m__7()" attrs="145">
+ </type>
+ <type name="Tester+&lt;TestException_1&gt;c__async0">
+ <method name="Void &lt;&gt;m__0()" attrs="145">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;TestException_2&gt;c__async1">
+ <method name="Void &lt;&gt;m__0()" attrs="145">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;TestException_3&gt;c__async2">
+ <method name="System.Threading.Tasks.Task &lt;&gt;m__0()" attrs="145">
+ <size>33</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;TestException_4&gt;c__async3">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;TestException_5&gt;c__async4">
+ <method name="Void &lt;&gt;m__0()" attrs="145">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;TestException_6&gt;c__async5">
+ <method name="Void &lt;&gt;m__0()" attrs="145">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;TestException_7&gt;c__async6">
+ <method name="Void &lt;&gt;m__0()" attrs="145">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;TestException_3&gt;c__async2+&lt;TestException_3&gt;c__async7">
+ <method name="Void &lt;&gt;m__0()" attrs="145">
<size>7</size>
</method>
</type>
@@ -57566,21 +58657,25 @@
</method>
</type>
<type name="Tester+&lt;Lambda_2&gt;c__async1+&lt;Lambda_2&gt;c__AnonStorey4">
- <method name="Int32 &lt;&gt;m__1()" attrs="131">
- <size>26</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Tester+&lt;Lambda_3&gt;c__async2`1+&lt;Lambda_3&gt;c__AnonStorey6`1[T]">
- <method name="Int32 &lt;&gt;m__2()" attrs="131">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
+ <type name="Tester+&lt;Lambda_2&gt;c__async1+&lt;Lambda_2&gt;c__AnonStorey4">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
+ <size>26</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;Lambda_3&gt;c__async2`1+&lt;Lambda_3&gt;c__AnonStorey6`1[T]">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
+ <size>14</size>
+ </method>
+ </type>
</test>
<test name="test-async-19.cs">
<type name="C">
@@ -57665,9 +58760,6 @@
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__4()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;AssignCompound_1&gt;c__async1">
<method name="Void MoveNext()" attrs="486">
@@ -57676,9 +58768,6 @@
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__5()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;Convert_1&gt;c__async2">
<method name="Void MoveNext()" attrs="486">
@@ -57687,9 +58776,6 @@
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="System.Object &lt;&gt;m__6()" attrs="145">
- <size>13</size>
- </method>
</type>
<type name="Tester+&lt;Invocation_1&gt;c__async3">
<method name="Void MoveNext()" attrs="486">
@@ -57698,7 +58784,24 @@
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="System.Object &lt;&gt;m__7()" attrs="145">
+ </type>
+ <type name="Tester+&lt;Add_1&gt;c__async0">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;AssignCompound_1&gt;c__async1">
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;Convert_1&gt;c__async2">
+ <method name="System.Object &lt;&gt;m__0()" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;Invocation_1&gt;c__async3">
+ <method name="System.Object &lt;&gt;m__0()" attrs="145">
<size>13</size>
</method>
</type>
@@ -57795,14 +58898,9 @@
<size>0</size>
</method>
</type>
- <type name="A+&lt;async&gt;c__async0">
- <method name="Void MoveNext()" attrs="486">
- <size>38</size>
- </method>
- </type>
<type name="A+&lt;async&gt;c__async1">
<method name="Void MoveNext()" attrs="486">
- <size>37</size>
+ <size>38</size>
</method>
</type>
<type name="A">
@@ -57810,26 +58908,11 @@
<size>35</size>
</method>
</type>
- <type name="A+&lt;CastTest&gt;c__async2">
- <method name="Void MoveNext()" attrs="486">
- <size>285</size>
- </method>
- </type>
- <type name="A+&lt;async&gt;c__async0">
- <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
- <size>13</size>
- </method>
- </type>
<type name="A+&lt;async&gt;c__async1">
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
</type>
- <type name="A+&lt;CastTest&gt;c__async2">
- <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
- <size>13</size>
- </method>
- </type>
<type name="C">
<method name="Void Test(Boolean)" attrs="145">
<size>20</size>
@@ -57942,6 +59025,35 @@
<size>14</size>
</method>
</type>
+ <type name="A">
+ <method name="Void Iasync.async()" attrs="481">
+ <size>27</size>
+ </method>
+ </type>
+ <type name="A+&lt;async&gt;c__async2">
+ <method name="Void MoveNext()" attrs="486">
+ <size>37</size>
+ </method>
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="A+&lt;CastTest&gt;c__async3">
+ <method name="Void MoveNext()" attrs="486">
+ <size>285</size>
+ </method>
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="A+async&gt;c__async0">
+ <method name="Void MoveNext()" attrs="486">
+ <size>31</size>
+ </method>
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
+ </type>
</test>
<test name="test-async-23.cs">
<type name="MyContext">
@@ -58031,12 +59143,12 @@
</method>
</type>
<type name="Program+&lt;CompilationTestOnly&gt;c__AnonStorey0">
- <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;&gt;m__1()" attrs="131">
- <size>15</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;&gt;m__0()" attrs="131">
+ <size>15</size>
+ </method>
</type>
</test>
<test name="test-async-26.cs">
@@ -58210,9 +59322,6 @@
</method>
</type>
<type name="C+&lt;Test2&gt;c__Iterator1+&lt;Test2&gt;c__AnonStorey5">
- <method name="System.Threading.Tasks.Task`1[System.String] &lt;&gt;m__1()" attrs="131">
- <size>41</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -58243,6 +59352,11 @@
<size>26</size>
</method>
</type>
+ <type name="C+&lt;Test2&gt;c__Iterator1+&lt;Test2&gt;c__AnonStorey5">
+ <method name="System.Threading.Tasks.Task`1[System.String] &lt;&gt;m__0()" attrs="131">
+ <size>41</size>
+ </method>
+ </type>
</test>
<test name="test-async-31.cs">
<type name="C">
@@ -58292,12 +59406,12 @@
</method>
</type>
<type name="C+&lt;M2&gt;c__async1+&lt;M2&gt;c__AnonStorey4">
- <method name="Void &lt;&gt;m__2()" attrs="131">
- <size>20</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>20</size>
+ </method>
</type>
</test>
<test name="test-async-32.cs">
@@ -58619,7 +59733,7 @@
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Void &lt;&gt;m__1()" attrs="145">
+ <method name="Void &lt;&gt;m__0()" attrs="145">
<size>2</size>
</method>
</type>
@@ -58655,9 +59769,6 @@
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;&gt;m__1()" attrs="145">
- <size>33</size>
- </method>
</type>
<type name="AmbiguousGeneric+&lt;NestedVoidTestSuccess&gt;c__async0+&lt;NestedVoidTestSuccess&gt;c__async4">
<method name="Void MoveNext()" attrs="486">
@@ -58667,6 +59778,11 @@
<size>13</size>
</method>
</type>
+ <type name="AmbiguousGeneric+&lt;NestedVoidTestSuccess&gt;c__async0">
+ <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;&gt;m__0()" attrs="145">
+ <size>33</size>
+ </method>
+ </type>
</test>
<test name="test-async-42.cs">
<type name="A">
@@ -58947,6 +60063,227 @@
</method>
</type>
</test>
+ <test name="test-async-49.cs">
+ <type name="TodoItem">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="MobileServiceTable2`1[T]">
+ <method name="System.Threading.Tasks.Task`1[System.Collections.Generic.List`1[T]] ToListAsync()" attrs="134">
+ <size>36</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Tests">
+ <method name="Int32 foo(System.Action)" attrs="129">
+ <size>16</size>
+ </method>
+ <method name="Void OnTap(TodoItem)" attrs="129">
+ <size>2</size>
+ </method>
+ <method name="System.Threading.Tasks.Task RefreshAsync()" attrs="129">
+ <size>41</size>
+ </method>
+ <method name="Void Main(System.String[])" attrs="150">
+ <size>19</size>
+ </method>
+ <method name="Int32 &lt;RefreshAsync&gt;m__0(TodoItem)" attrs="129">
+ <size>46</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Tests+&lt;RefreshAsync&gt;c__async0">
+ <method name="Void MoveNext()" attrs="486">
+ <size>213</size>
+ </method>
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="Tests+&lt;RefreshAsync&gt;c__AnonStorey1">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>18</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-async-50.cs">
+ <type name="X">
+ <method name="Void Main()" attrs="145">
+ <size>19</size>
+ </method>
+ <method name="System.Threading.Tasks.Task`1[System.Int32] AnimateAsync(System.Action)" attrs="129">
+ <size>21</size>
+ </method>
+ <method name="Void SecondLevel(System.Action)" attrs="129">
+ <size>8</size>
+ </method>
+ <method name="System.Threading.Tasks.Task Run()" attrs="129">
+ <size>41</size>
+ </method>
+ <method name="Void &lt;Run&gt;m__0()" attrs="129">
+ <size>20</size>
+ </method>
+ <method name="Void &lt;Run&gt;m__1()" attrs="129">
+ <size>8</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="X+&lt;Run&gt;c__async0">
+ <method name="Void MoveNext()" attrs="486">
+ <size>185</size>
+ </method>
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-async-51.cs">
+ <type name="Program">
+ <method name="Void Main(System.String[])" attrs="150">
+ <size>19</size>
+ </method>
+ <method name="System.Threading.Tasks.Task LoadPlayers()" attrs="129">
+ <size>41</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>18</size>
+ </method>
+ </type>
+ <type name="Program+Model">
+ <method name="Program+Player get_SelectedPlayer()" attrs="2182">
+ <size>14</size>
+ </method>
+ <method name="Void set_SelectedPlayer(Program+Player)" attrs="2182">
+ <size>8</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Program+Player">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Program+&lt;LoadPlayers&gt;c__async0">
+ <method name="Void MoveNext()" attrs="486">
+ <size>87</size>
+ </method>
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
+ <method name="Void &lt;&gt;m__0(Program+Player)" attrs="145">
+ <size>2</size>
+ </method>
+ </type>
+ <type name="Program">
+ <method name="System.Action`1[Program+Player] &lt;LoadPlayers&gt;m__0(System.Action`1[Program+Player])" attrs="129">
+ <size>20</size>
+ </method>
+ <method name="Void &lt;LoadPlayers&gt;m__1(Program+Player)" attrs="129">
+ <size>13</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-async-52.cs">
+ <type name="ActualValueDelegate`1[T]">
+ <method name="T Invoke()" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="T EndInvoke(IAsyncResult)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="Void .ctor(Object, IntPtr)" attrs="6278">
+ <size>0</size>
+ </method>
+ </type>
+ <type name="X">
+ <method name="Void Main()" attrs="150">
+ <size>37</size>
+ </method>
+ <method name="Boolean Matches[T](ActualValueDelegate`1[T])" attrs="145">
+ <size>30</size>
+ </method>
+ <method name="System.Threading.Tasks.Task Throw()" attrs="145">
+ <size>33</size>
+ </method>
+ <method name="System.Threading.Tasks.Task &lt;Main&gt;m__0()" attrs="145">
+ <size>33</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="X+&lt;Throw&gt;c__async0">
+ <method name="Void MoveNext()" attrs="486">
+ <size>157</size>
+ </method>
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="X+&lt;Main&gt;c__async3">
+ <method name="Void MoveNext()" attrs="486">
+ <size>160</size>
+ </method>
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-async-53.cs">
+ <type name="Y">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="X">
+ <method name="Void add_E(System.Action`2[System.Int32,System.String])" attrs="2182">
+ <size>42</size>
+ </method>
+ <method name="Void remove_E(System.Action`2[System.Int32,System.String])" attrs="2182">
+ <size>42</size>
+ </method>
+ <method name="Void Foo()" attrs="129">
+ <size>54</size>
+ </method>
+ <method name="Void Main()" attrs="150">
+ <size>14</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="X+&lt;Foo&gt;c__AnonStorey1">
+ <method name="Void &lt;&gt;m__0(Int32, System.String)" attrs="131">
+ <size>35</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="X+&lt;Foo&gt;c__AnonStorey1+&lt;Foo&gt;c__async0">
+ <method name="Void MoveNext()" attrs="486">
+ <size>44</size>
+ </method>
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
+ </type>
+ </test>
<test name="test-cls-00.cs">
<type name="CLSCLass_6">
<method name="Void add_Disposed(Delegate)" attrs="2182">
@@ -59970,12 +61307,12 @@
</method>
</type>
<type name="C+&lt;Test_Capturing_1&gt;c__AnonStorey0">
- <method name="Int32 &lt;&gt;m__3()" attrs="131">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
+ <size>14</size>
+ </method>
</type>
</test>
<test name="test-debug-15.cs">
@@ -60109,9 +61446,6 @@
<method name="Void MoveNext()" attrs="486">
<size>1229</size>
</method>
- <method name="Int32 &lt;&gt;m__2()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="C+&lt;Test_1&gt;c__async0">
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
@@ -60127,6 +61461,9 @@
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
+ <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <size>9</size>
+ </method>
</type>
</test>
<test name="test-debug-20.cs">
@@ -60320,6 +61657,61 @@
</method>
</type>
</test>
+ <test name="test-debug-27.cs">
+ <type name="S">
+ <method name="Int32 op_Implicit(S)" attrs="2198">
+ <size>10</size>
+ </method>
+ <method name="Void .ctor(Int32)" attrs="6278">
+ <size>2</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="Int32 A()" attrs="150">
+ <size>10</size>
+ </method>
+ <method name="Int32 B(C)" attrs="150">
+ <size>10</size>
+ </method>
+ <method name="C Test()" attrs="150">
+ <size>14</size>
+ </method>
+ <method name="System.String Foo()" attrs="134">
+ <size>10</size>
+ </method>
+ <method name="Void Test_1()" attrs="129">
+ <size>46</size>
+ </method>
+ <method name="Void Test_2()" attrs="129">
+ <size>10</size>
+ </method>
+ <method name="Void Test_3()" attrs="129">
+ <size>32</size>
+ </method>
+ <method name="Void Test_4()" attrs="129">
+ <size>13</size>
+ </method>
+ <method name="Int32 Main()" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-debug-28.cs">
+ <type name="StatementsAsBlocks">
+ <method name="Void ForEach(System.String[])" attrs="145">
+ <size>64</size>
+ </method>
+ <method name="Int32 Main()" attrs="150">
+ <size>10</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-externalias-01.cs">
<type name="Test">
<method name="Int32 Main()" attrs="150">
@@ -60780,16 +62172,23 @@
<size>7</size>
</method>
</type>
- <type name="X+&lt;Get&gt;c__Iterator2">
+ <type name="S+&lt;Get&gt;c__Iterator0">
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">
+ <size>52</size>
+ </method>
+ </type>
+ <type name="S+&lt;GetS&gt;c__Iterator1">
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">
+ <size>40</size>
+ </method>
+ </type>
+ <type name="X+&lt;Get&gt;c__Iterator0">
<method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()" attrs="2529">
<size>14</size>
</method>
<method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
<size>14</size>
</method>
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
<method name="Boolean MoveNext()" attrs="486">
<size>154</size>
</method>
@@ -60799,20 +62198,23 @@
<method name="Void Reset()" attrs="486">
<size>6</size>
</method>
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">
+ <size>40</size>
+ </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
- <type name="X+&lt;GetS&gt;c__Iterator3">
+ <type name="X+&lt;GetS&gt;c__Iterator1">
<method name="System.Object System.Collections.Generic.IEnumerator&lt;object&gt;.get_Current()" attrs="2529">
<size>14</size>
</method>
<method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">
<size>14</size>
</method>
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
<method name="Boolean MoveNext()" attrs="486">
<size>159</size>
</method>
@@ -60822,28 +62224,14 @@
<method name="Void Reset()" attrs="486">
<size>6</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
- <type name="S+&lt;Get&gt;c__Iterator0">
- <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">
- <size>52</size>
- </method>
- </type>
- <type name="S+&lt;GetS&gt;c__Iterator1">
- <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">
- <size>40</size>
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
</method>
- </type>
- <type name="X+&lt;Get&gt;c__Iterator2">
<method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">
<size>40</size>
</method>
- </type>
- <type name="X+&lt;GetS&gt;c__Iterator3">
- <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable&lt;object&gt;.GetEnumerator()" attrs="481">
- <size>40</size>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
</method>
</type>
</test>
@@ -61895,6 +63283,25 @@
</method>
</type>
</test>
+ <test name="test-named-08.cs">
+ <type name="C">
+ <method name="Int32 Foo(System.String, Int32)" attrs="145">
+ <size>18</size>
+ </method>
+ <method name="Int32 Foo(System.String, Int32, Boolean, Boolean)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 Foo(Double, Boolean, Boolean, Boolean)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 Main()" attrs="150">
+ <size>34</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-partial-01.cs">
<type name="Foo.Hello">
<method name="Void .ctor()" attrs="6278">
@@ -62663,6 +64070,31 @@
</method>
</type>
</test>
+ <test name="test-partial-32.cs">
+ <type name="A.C">
+ <method name="Void Main()" attrs="150">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="A.C+N">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="X.C1">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="X.C1+N1">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-var-01.cs">
<type name="Test">
<method name="Int32 Main()" attrs="150">
diff --git a/mcs/tools/cil-strip/Mono.Cecil.Cil/CodeReader.cs b/mcs/tools/cil-strip/Mono.Cecil.Cil/CodeReader.cs
index 9fe965f5569..4e7ca90fa6e 100644
--- a/mcs/tools/cil-strip/Mono.Cecil.Cil/CodeReader.cs
+++ b/mcs/tools/cil-strip/Mono.Cecil.Cil/CodeReader.cs
@@ -98,7 +98,11 @@ namespace Mono.Cecil.Cil {
public static VariableDefinition GetVariable (MethodBody body, int index)
{
- return body.Variables [index];
+ // bug 15727 - newer cecil does the same (in MethodDefinition.GetVariable)
+ var variables = body.Variables;
+ if (index < 0 || index >= variables.Count)
+ return null;
+ return variables [index];
}
void ReadCilBody (MethodBody body, BinaryReader br)
diff --git a/mcs/tools/cil-strip/cil-strip.csproj b/mcs/tools/cil-strip/cil-strip.csproj
new file mode 100644
index 00000000000..8f4e0687b97
--- /dev/null
+++ b/mcs/tools/cil-strip/cil-strip.csproj
@@ -0,0 +1,991 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{7B3D8F99-304A-4C2E-BAC5-7D1A29747B01}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>cilstrip</RootNamespace>
+ <AssemblyName>cil-strip</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <Commandlineparameters>/Users/sebastienpouliot/Dropbox/iCatalogXniOS.exe /Users/sebastienpouliot/Dropbox/iCatalogXniOS-out.exe</Commandlineparameters>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>full</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Externalconsole>true</Externalconsole>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ItemGroup>
+ <Folder Include="cil-strip\" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AssemblyStripper.cs">
+ <Link>cil-strip\AssemblyStripper.cs</Link>
+ </Compile>
+ <Compile Include="cilstrip.cs">
+ <Link>cil-strip\cilstrip.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\AggressiveReflectionReader.cs">
+ <Link>cil-strip\Mono.Cecil\AggressiveReflectionReader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ArrayDimension.cs">
+ <Link>cil-strip\Mono.Cecil\ArrayDimension.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ArrayDimensionCollection.cs">
+ <Link>cil-strip\Mono.Cecil\ArrayDimensionCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ArrayType.cs">
+ <Link>cil-strip\Mono.Cecil\ArrayType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\AssemblyDefinition.cs">
+ <Link>cil-strip\Mono.Cecil\AssemblyDefinition.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\AssemblyFactory.cs">
+ <Link>cil-strip\Mono.Cecil\AssemblyFactory.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\AssemblyFlags.cs">
+ <Link>cil-strip\Mono.Cecil\AssemblyFlags.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\AssemblyHashAlgorithm.cs">
+ <Link>cil-strip\Mono.Cecil\AssemblyHashAlgorithm.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\AssemblyInfo.cs">
+ <Link>cil-strip\Mono.Cecil\AssemblyInfo.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\AssemblyKind.cs">
+ <Link>cil-strip\Mono.Cecil\AssemblyKind.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\AssemblyLinkedResource.cs">
+ <Link>cil-strip\Mono.Cecil\AssemblyLinkedResource.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\AssemblyNameDefinition.cs">
+ <Link>cil-strip\Mono.Cecil\AssemblyNameDefinition.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\AssemblyNameReference.cs">
+ <Link>cil-strip\Mono.Cecil\AssemblyNameReference.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\AssemblyNameReferenceCollection.cs">
+ <Link>cil-strip\Mono.Cecil\AssemblyNameReferenceCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\BaseAssemblyResolver.cs">
+ <Link>cil-strip\Mono.Cecil\BaseAssemblyResolver.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\BaseReflectionReader.cs">
+ <Link>cil-strip\Mono.Cecil\BaseReflectionReader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\BaseReflectionVisitor.cs">
+ <Link>cil-strip\Mono.Cecil\BaseReflectionVisitor.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\BaseStructureVisitor.cs">
+ <Link>cil-strip\Mono.Cecil\BaseStructureVisitor.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\CallSite.cs">
+ <Link>cil-strip\Mono.Cecil\CallSite.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\CompactFrameworkCompatibility.cs">
+ <Link>cil-strip\Mono.Cecil\CompactFrameworkCompatibility.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\Constants.cs">
+ <Link>cil-strip\Mono.Cecil\Constants.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ConstraintCollection.cs">
+ <Link>cil-strip\Mono.Cecil\ConstraintCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ConstructorCollection.cs">
+ <Link>cil-strip\Mono.Cecil\ConstructorCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\CustomAttribute.cs">
+ <Link>cil-strip\Mono.Cecil\CustomAttribute.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\CustomAttributeCollection.cs">
+ <Link>cil-strip\Mono.Cecil\CustomAttributeCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\DefaultAssemblyResolver.cs">
+ <Link>cil-strip\Mono.Cecil\DefaultAssemblyResolver.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\DefaultImporter.cs">
+ <Link>cil-strip\Mono.Cecil\DefaultImporter.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\EmbeddedResource.cs">
+ <Link>cil-strip\Mono.Cecil\EmbeddedResource.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\EventAttributes.cs">
+ <Link>cil-strip\Mono.Cecil\EventAttributes.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\EventDefinition.cs">
+ <Link>cil-strip\Mono.Cecil\EventDefinition.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\EventDefinitionCollection.cs">
+ <Link>cil-strip\Mono.Cecil\EventDefinitionCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\EventReference.cs">
+ <Link>cil-strip\Mono.Cecil\EventReference.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ExternTypeCollection.cs">
+ <Link>cil-strip\Mono.Cecil\ExternTypeCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\FieldAttributes.cs">
+ <Link>cil-strip\Mono.Cecil\FieldAttributes.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\FieldDefinition.cs">
+ <Link>cil-strip\Mono.Cecil\FieldDefinition.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\FieldDefinitionCollection.cs">
+ <Link>cil-strip\Mono.Cecil\FieldDefinitionCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\FieldReference.cs">
+ <Link>cil-strip\Mono.Cecil\FieldReference.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\FileAttributes.cs">
+ <Link>cil-strip\Mono.Cecil\FileAttributes.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\FunctionPointerType.cs">
+ <Link>cil-strip\Mono.Cecil\FunctionPointerType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\GenericArgumentCollection.cs">
+ <Link>cil-strip\Mono.Cecil\GenericArgumentCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\GenericContext.cs">
+ <Link>cil-strip\Mono.Cecil\GenericContext.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\GenericInstanceMethod.cs">
+ <Link>cil-strip\Mono.Cecil\GenericInstanceMethod.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\GenericInstanceType.cs">
+ <Link>cil-strip\Mono.Cecil\GenericInstanceType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\GenericParameter.cs">
+ <Link>cil-strip\Mono.Cecil\GenericParameter.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\GenericParameterAttributes.cs">
+ <Link>cil-strip\Mono.Cecil\GenericParameterAttributes.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\GenericParameterCollection.cs">
+ <Link>cil-strip\Mono.Cecil\GenericParameterCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\HashCodeProvider.cs">
+ <Link>cil-strip\Mono.Cecil\HashCodeProvider.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IAnnotationProvider.cs">
+ <Link>cil-strip\Mono.Cecil\IAnnotationProvider.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IAssemblyResolver.cs">
+ <Link>cil-strip\Mono.Cecil\IAssemblyResolver.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ICustomAttributeProvider.cs">
+ <Link>cil-strip\Mono.Cecil\ICustomAttributeProvider.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IDetailReader.cs">
+ <Link>cil-strip\Mono.Cecil\IDetailReader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IGenericInstance.cs">
+ <Link>cil-strip\Mono.Cecil\IGenericInstance.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IGenericParameterProvider.cs">
+ <Link>cil-strip\Mono.Cecil\IGenericParameterProvider.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IHasConstant.cs">
+ <Link>cil-strip\Mono.Cecil\IHasConstant.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IHasMarshalSpec.cs">
+ <Link>cil-strip\Mono.Cecil\IHasMarshalSpec.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IHasSecurity.cs">
+ <Link>cil-strip\Mono.Cecil\IHasSecurity.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IImporter.cs">
+ <Link>cil-strip\Mono.Cecil\IImporter.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IMemberDefinition.cs">
+ <Link>cil-strip\Mono.Cecil\IMemberDefinition.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IMemberReference.cs">
+ <Link>cil-strip\Mono.Cecil\IMemberReference.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IMetadataScope.cs">
+ <Link>cil-strip\Mono.Cecil\IMetadataScope.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IMetadataTokenProvider.cs">
+ <Link>cil-strip\Mono.Cecil\IMetadataTokenProvider.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IMethodSignature.cs">
+ <Link>cil-strip\Mono.Cecil\IMethodSignature.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IReflectionStructureVisitable.cs">
+ <Link>cil-strip\Mono.Cecil\IReflectionStructureVisitable.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IReflectionStructureVisitor.cs">
+ <Link>cil-strip\Mono.Cecil\IReflectionStructureVisitor.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IReflectionVisitable.cs">
+ <Link>cil-strip\Mono.Cecil\IReflectionVisitable.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IReflectionVisitor.cs">
+ <Link>cil-strip\Mono.Cecil\IReflectionVisitor.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\IRequireResolving.cs">
+ <Link>cil-strip\Mono.Cecil\IRequireResolving.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ImportContext.cs">
+ <Link>cil-strip\Mono.Cecil\ImportContext.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\InterfaceCollection.cs">
+ <Link>cil-strip\Mono.Cecil\InterfaceCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\LinkedResource.cs">
+ <Link>cil-strip\Mono.Cecil\LinkedResource.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ManifestResourceAttributes.cs">
+ <Link>cil-strip\Mono.Cecil\ManifestResourceAttributes.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\MarshalSpec.cs">
+ <Link>cil-strip\Mono.Cecil\MarshalSpec.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\MemberReference.cs">
+ <Link>cil-strip\Mono.Cecil\MemberReference.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\MemberReferenceCollection.cs">
+ <Link>cil-strip\Mono.Cecil\MemberReferenceCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\MetadataResolver.cs">
+ <Link>cil-strip\Mono.Cecil\MetadataResolver.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\MethodAttributes.cs">
+ <Link>cil-strip\Mono.Cecil\MethodAttributes.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\MethodCallingConvention.cs">
+ <Link>cil-strip\Mono.Cecil\MethodCallingConvention.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\MethodDefinition.cs">
+ <Link>cil-strip\Mono.Cecil\MethodDefinition.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\MethodDefinitionCollection.cs">
+ <Link>cil-strip\Mono.Cecil\MethodDefinitionCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\MethodImplAttributes.cs">
+ <Link>cil-strip\Mono.Cecil\MethodImplAttributes.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\MethodReference.cs">
+ <Link>cil-strip\Mono.Cecil\MethodReference.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\MethodReturnType.cs">
+ <Link>cil-strip\Mono.Cecil\MethodReturnType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\MethodSemanticsAttributes.cs">
+ <Link>cil-strip\Mono.Cecil\MethodSemanticsAttributes.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\MethodSpecification.cs">
+ <Link>cil-strip\Mono.Cecil\MethodSpecification.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\Modifiers.cs">
+ <Link>cil-strip\Mono.Cecil\Modifiers.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ModuleDefinition.cs">
+ <Link>cil-strip\Mono.Cecil\ModuleDefinition.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ModuleDefinitionCollection.cs">
+ <Link>cil-strip\Mono.Cecil\ModuleDefinitionCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ModuleReference.cs">
+ <Link>cil-strip\Mono.Cecil\ModuleReference.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ModuleReferenceCollection.cs">
+ <Link>cil-strip\Mono.Cecil\ModuleReferenceCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\NameObjectCollectionBase.cs">
+ <Link>cil-strip\Mono.Cecil\NameObjectCollectionBase.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\NativeType.cs">
+ <Link>cil-strip\Mono.Cecil\NativeType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\NestedTypeCollection.cs">
+ <Link>cil-strip\Mono.Cecil\NestedTypeCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\NullReferenceImporter.cs">
+ <Link>cil-strip\Mono.Cecil\NullReferenceImporter.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\OverrideCollection.cs">
+ <Link>cil-strip\Mono.Cecil\OverrideCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\PInvokeAttributes.cs">
+ <Link>cil-strip\Mono.Cecil\PInvokeAttributes.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\PInvokeInfo.cs">
+ <Link>cil-strip\Mono.Cecil\PInvokeInfo.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ParameterAttributes.cs">
+ <Link>cil-strip\Mono.Cecil\ParameterAttributes.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ParameterDefinition.cs">
+ <Link>cil-strip\Mono.Cecil\ParameterDefinition.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ParameterDefinitionCollection.cs">
+ <Link>cil-strip\Mono.Cecil\ParameterDefinitionCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ParameterReference.cs">
+ <Link>cil-strip\Mono.Cecil\ParameterReference.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\PinnedType.cs">
+ <Link>cil-strip\Mono.Cecil\PinnedType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\PointerType.cs">
+ <Link>cil-strip\Mono.Cecil\PointerType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\PropertyAttributes.cs">
+ <Link>cil-strip\Mono.Cecil\PropertyAttributes.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\PropertyDefinition.cs">
+ <Link>cil-strip\Mono.Cecil\PropertyDefinition.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\PropertyDefinitionCollection.cs">
+ <Link>cil-strip\Mono.Cecil\PropertyDefinitionCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\PropertyReference.cs">
+ <Link>cil-strip\Mono.Cecil\PropertyReference.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ReferenceType.cs">
+ <Link>cil-strip\Mono.Cecil\ReferenceType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ReflectionController.cs">
+ <Link>cil-strip\Mono.Cecil\ReflectionController.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ReflectionException.cs">
+ <Link>cil-strip\Mono.Cecil\ReflectionException.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ReflectionHelper.cs">
+ <Link>cil-strip\Mono.Cecil\ReflectionHelper.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ReflectionReader.cs">
+ <Link>cil-strip\Mono.Cecil\ReflectionReader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ReflectionWriter.cs">
+ <Link>cil-strip\Mono.Cecil\ReflectionWriter.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\Resource.cs">
+ <Link>cil-strip\Mono.Cecil\Resource.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\ResourceCollection.cs">
+ <Link>cil-strip\Mono.Cecil\ResourceCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\SecurityAction.cs">
+ <Link>cil-strip\Mono.Cecil\SecurityAction.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\SecurityDeclaration.cs">
+ <Link>cil-strip\Mono.Cecil\SecurityDeclaration.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\SecurityDeclarationCollection.cs">
+ <Link>cil-strip\Mono.Cecil\SecurityDeclarationCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\SecurityDeclarationReader.cs">
+ <Link>cil-strip\Mono.Cecil\SecurityDeclarationReader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\SentinelType.cs">
+ <Link>cil-strip\Mono.Cecil\SentinelType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\StructureReader.cs">
+ <Link>cil-strip\Mono.Cecil\StructureReader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\StructureWriter.cs">
+ <Link>cil-strip\Mono.Cecil\StructureWriter.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\TableComparers.cs">
+ <Link>cil-strip\Mono.Cecil\TableComparers.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\TargetRuntime.cs">
+ <Link>cil-strip\Mono.Cecil\TargetRuntime.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\TypeAttributes.cs">
+ <Link>cil-strip\Mono.Cecil\TypeAttributes.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\TypeDefinition.cs">
+ <Link>cil-strip\Mono.Cecil\TypeDefinition.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\TypeDefinitionCollection.cs">
+ <Link>cil-strip\Mono.Cecil\TypeDefinitionCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\TypeReference.cs">
+ <Link>cil-strip\Mono.Cecil\TypeReference.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\TypeReferenceCollection.cs">
+ <Link>cil-strip\Mono.Cecil\TypeReferenceCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\TypeSpecification.cs">
+ <Link>cil-strip\Mono.Cecil\TypeSpecification.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil\VariantType.cs">
+ <Link>cil-strip\Mono.Cecil\VariantType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\BaseImageVisitor.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\BaseImageVisitor.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\CLIHeader.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\CLIHeader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\CopyImageVisitor.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\CopyImageVisitor.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\DOSHeader.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\DOSHeader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\DataDirectory.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\DataDirectory.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\DebugHeader.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\DebugHeader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\DebugStoreType.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\DebugStoreType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\ExportTable.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\ExportTable.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\IBinaryVisitable.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\IBinaryVisitable.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\IBinaryVisitor.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\IBinaryVisitor.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\IHeader.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\IHeader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\Image.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\Image.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\ImageCharacteristics.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\ImageCharacteristics.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\ImageFormatException.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\ImageFormatException.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\ImageInitializer.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\ImageInitializer.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\ImageReader.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\ImageReader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\ImageWriter.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\ImageWriter.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\Imports.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\Imports.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\MemoryBinaryWriter.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\MemoryBinaryWriter.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\PEFileHeader.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\PEFileHeader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\PEOptionalHeader.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\PEOptionalHeader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\RVA.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\RVA.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\ResourceDataEntry.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\ResourceDataEntry.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\ResourceDirectoryEntry.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\ResourceDirectoryEntry.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\ResourceDirectoryString.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\ResourceDirectoryString.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\ResourceDirectoryTable.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\ResourceDirectoryTable.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\ResourceNode.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\ResourceNode.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\ResourceReader.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\ResourceReader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\ResourceWriter.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\ResourceWriter.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\RuntimeImage.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\RuntimeImage.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\Section.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\Section.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\SectionCharacteristics.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\SectionCharacteristics.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\SectionCollection.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\SectionCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Binary\SubSystem.cs">
+ <Link>cil-strip\Mono.Cecil.Binary\SubSystem.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\BaseCodeVisitor.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\BaseCodeVisitor.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\CilWorker.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\CilWorker.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\Code.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\Code.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\CodeReader.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\CodeReader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\CodeWriter.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\CodeWriter.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\Document.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\Document.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\DocumentHashAlgorithm.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\DocumentHashAlgorithm.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\DocumentLanguage.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\DocumentLanguage.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\DocumentLanguageVendor.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\DocumentLanguageVendor.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\DocumentType.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\DocumentType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\ExceptionHandler.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\ExceptionHandler.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\ExceptionHandlerCollection.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\ExceptionHandlerCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\ExceptionHandlerType.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\ExceptionHandlerType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\FlowControl.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\FlowControl.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\GuidAttribute.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\GuidAttribute.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\ICodeVisitable.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\ICodeVisitable.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\ICodeVisitor.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\ICodeVisitor.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\IScopeProvider.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\IScopeProvider.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\ISymbolReader.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\ISymbolReader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\ISymbolStoreFactory.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\ISymbolStoreFactory.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\ISymbolWriter.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\ISymbolWriter.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\IVariableDefinitionProvider.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\IVariableDefinitionProvider.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\Instruction.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\Instruction.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\InstructionCollection.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\InstructionCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\MethodBody.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\MethodBody.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\MethodDataSection.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\MethodDataSection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\MethodHeader.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\MethodHeader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\OpCode.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\OpCode.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\OpCodeNames.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\OpCodeNames.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\OpCodeType.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\OpCodeType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\OpCodes.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\OpCodes.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\OperandType.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\OperandType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\Scope.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\Scope.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\ScopeCollection.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\ScopeCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\SequencePoint.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\SequencePoint.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\StackBehaviour.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\StackBehaviour.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\SymbolStoreHelper.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\SymbolStoreHelper.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\VariableDefinition.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\VariableDefinition.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\VariableDefinitionCollection.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\VariableDefinitionCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Cil\VariableReference.cs">
+ <Link>cil-strip\Mono.Cecil.Cil\VariableReference.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\Assembly.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\Assembly.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\AssemblyOS.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\AssemblyOS.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\AssemblyProcessor.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\AssemblyProcessor.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\AssemblyRef.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\AssemblyRef.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\AssemblyRefOS.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\AssemblyRefOS.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\AssemblyRefProcessor.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\AssemblyRefProcessor.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\BaseMetadataVisitor.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\BaseMetadataVisitor.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\BlobHeap.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\BlobHeap.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\ClassLayout.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\ClassLayout.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\CodedIndex.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\CodedIndex.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\Constant.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\Constant.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\CultureUtils.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\CultureUtils.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\CustomAttribute.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\CustomAttribute.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\DeclSecurity.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\DeclSecurity.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\ElementType.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\ElementType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\Event.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\Event.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\EventMap.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\EventMap.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\EventPtr.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\EventPtr.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\ExportedType.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\ExportedType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\Field.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\Field.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\FieldLayout.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\FieldLayout.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\FieldMarshal.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\FieldMarshal.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\FieldPtr.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\FieldPtr.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\FieldRVA.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\FieldRVA.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\File.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\File.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\GenericParam.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\GenericParam.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\GenericParamConstraint.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\GenericParamConstraint.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\GuidHeap.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\GuidHeap.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\IMetadataRow.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\IMetadataRow.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\IMetadataTable.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\IMetadataTable.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\IMetadataVisitable.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\IMetadataVisitable.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\IMetadataVisitor.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\IMetadataVisitor.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\ImplMap.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\ImplMap.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\InterfaceImpl.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\InterfaceImpl.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\ManifestResource.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\ManifestResource.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MemberRef.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MemberRef.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MetadataFormatException.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MetadataFormatException.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MetadataHeap.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MetadataHeap.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MetadataInitializer.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MetadataInitializer.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MetadataReader.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MetadataReader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MetadataRoot.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MetadataRoot.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MetadataRowReader.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MetadataRowReader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MetadataRowWriter.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MetadataRowWriter.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MetadataStream.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MetadataStream.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MetadataStreamCollection.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MetadataStreamCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MetadataTableReader.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MetadataTableReader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MetadataTableWriter.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MetadataTableWriter.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MetadataToken.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MetadataToken.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MetadataWriter.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MetadataWriter.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\Method.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\Method.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MethodImpl.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MethodImpl.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MethodPtr.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MethodPtr.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MethodSemantics.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MethodSemantics.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\MethodSpec.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\MethodSpec.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\Module.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\Module.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\ModuleRef.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\ModuleRef.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\NestedClass.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\NestedClass.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\Param.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\Param.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\ParamPtr.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\ParamPtr.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\Property.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\Property.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\PropertyMap.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\PropertyMap.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\PropertyPtr.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\PropertyPtr.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\RowCollection.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\RowCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\StandAloneSig.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\StandAloneSig.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\StringsHeap.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\StringsHeap.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\TableCollection.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\TableCollection.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\TablesHeap.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\TablesHeap.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\TokenType.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\TokenType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\TypeDef.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\TypeDef.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\TypeRef.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\TypeRef.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\TypeSpec.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\TypeSpec.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\UserStringsHeap.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\UserStringsHeap.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Metadata\Utilities.cs">
+ <Link>cil-strip\Mono.Cecil.Metadata\Utilities.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\Array.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\Array.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\ArrayShape.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\ArrayShape.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\BaseSignatureVisitor.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\BaseSignatureVisitor.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\Class.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\Class.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\Constraint.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\Constraint.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\CustomAttrib.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\CustomAttrib.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\CustomMod.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\CustomMod.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\FieldSig.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\FieldSig.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\FnPtr.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\FnPtr.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\GenericArg.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\GenericArg.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\GenericInst.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\GenericInst.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\GenericInstSignature.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\GenericInstSignature.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\ISignatureVisitable.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\ISignatureVisitable.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\ISignatureVisitor.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\ISignatureVisitor.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\InputOutputItem.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\InputOutputItem.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\LocalVarSig.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\LocalVarSig.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\MVar.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\MVar.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\MarshalSig.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\MarshalSig.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\MethodDefSig.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\MethodDefSig.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\MethodRefSig.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\MethodRefSig.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\MethodSig.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\MethodSig.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\MethodSpec.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\MethodSpec.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\Param.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\Param.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\PropertySig.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\PropertySig.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\Ptr.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\Ptr.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\RetType.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\RetType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\SigType.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\SigType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\Signature.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\Signature.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\SignatureReader.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\SignatureReader.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\SignatureWriter.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\SignatureWriter.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\SzArray.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\SzArray.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\TypeSpec.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\TypeSpec.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\ValueType.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\ValueType.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Cecil.Signatures\Var.cs">
+ <Link>cil-strip\Mono.Cecil.Signatures\Var.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Xml\SecurityParser.cs">
+ <Link>cil-strip\Mono.Xml\SecurityParser.cs</Link>
+ </Compile>
+ <Compile Include="Mono.Xml\SmallXmlParser.cs">
+ <Link>cil-strip\Mono.Xml\SmallXmlParser.cs</Link>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Mono.Xml\ChangeLog">
+ <Link>cil-strip\Mono.Xml\ChangeLog</Link>
+ </None>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/mcs/tools/corcompare/corcompare.sln b/mcs/tools/corcompare/corcompare.sln
index 386a14519f2..377f94ec09c 100644
--- a/mcs/tools/corcompare/corcompare.sln
+++ b/mcs/tools/corcompare/corcompare.sln
@@ -1,24 +1,103 @@

-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mono-api-info", "mono-api-info.csproj", "{6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil", "..\..\class\Mono.Cecil\Mono.Cecil.csproj", "{D8F63DFF-5230-43E4-9AB2-DA6E721A1FAE}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil", "..\..\..\external\cecil\Mono.Cecil.csproj", "{D68133BD-1E63-496E-9EDE-4FBDBF77B486}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mono-api-html", "mono-api-html\mono-api-html.csproj", "{D25986E2-7A41-4966-A26D-5614BAC7B8A7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
+ net_2_0_Debug|Any CPU = net_2_0_Debug|Any CPU
+ net_2_0_Release|Any CPU = net_2_0_Release|Any CPU
+ net_3_5_Debug|Any CPU = net_3_5_Debug|Any CPU
+ net_3_5_Release|Any CPU = net_3_5_Release|Any CPU
+ net_4_0_Debug|Any CPU = net_4_0_Debug|Any CPU
+ net_4_0_Release|Any CPU = net_4_0_Release|Any CPU
+ silverlight_Debug|Any CPU = silverlight_Debug|Any CPU
+ silverlight_Release|Any CPU = silverlight_Release|Any CPU
+ winphone_Debug|Any CPU = winphone_Debug|Any CPU
+ winphone_Release|Any CPU = winphone_Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.net_2_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.net_2_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.net_2_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.net_2_0_Release|Any CPU.Build.0 = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.net_3_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.net_3_5_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.net_3_5_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.net_3_5_Release|Any CPU.Build.0 = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.net_4_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.net_4_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.net_4_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.net_4_0_Release|Any CPU.Build.0 = Debug|Any CPU
{6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.Release|Any CPU.Build.0 = Release|Any CPU
- {D8F63DFF-5230-43E4-9AB2-DA6E721A1FAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D8F63DFF-5230-43E4-9AB2-DA6E721A1FAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D8F63DFF-5230-43E4-9AB2-DA6E721A1FAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D8F63DFF-5230-43E4-9AB2-DA6E721A1FAE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.silverlight_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.silverlight_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.silverlight_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.silverlight_Release|Any CPU.Build.0 = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.winphone_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.winphone_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.winphone_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {6446D5E1-8F4E-4692-8EF3-B1D4CA290ECF}.winphone_Release|Any CPU.Build.0 = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.net_2_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.net_2_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.net_2_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.net_2_0_Release|Any CPU.Build.0 = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.net_3_5_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.net_3_5_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.net_3_5_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.net_3_5_Release|Any CPU.Build.0 = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.net_4_0_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.net_4_0_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.net_4_0_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.net_4_0_Release|Any CPU.Build.0 = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.silverlight_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.silverlight_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.silverlight_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.silverlight_Release|Any CPU.Build.0 = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.winphone_Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.winphone_Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.winphone_Release|Any CPU.ActiveCfg = Debug|Any CPU
+ {D25986E2-7A41-4966-A26D-5614BAC7B8A7}.winphone_Release|Any CPU.Build.0 = Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|Any CPU.ActiveCfg = net_2_0_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|Any CPU.Build.0 = net_2_0_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_2_0_Debug|Any CPU.ActiveCfg = net_2_0_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_2_0_Debug|Any CPU.Build.0 = net_2_0_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_2_0_Release|Any CPU.ActiveCfg = net_2_0_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_2_0_Release|Any CPU.Build.0 = net_2_0_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_3_5_Debug|Any CPU.ActiveCfg = net_3_5_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_3_5_Debug|Any CPU.Build.0 = net_3_5_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_3_5_Release|Any CPU.ActiveCfg = net_3_5_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_3_5_Release|Any CPU.Build.0 = net_3_5_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_4_0_Debug|Any CPU.ActiveCfg = net_4_0_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_4_0_Debug|Any CPU.Build.0 = net_4_0_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_4_0_Release|Any CPU.ActiveCfg = net_4_0_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.net_4_0_Release|Any CPU.Build.0 = net_4_0_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Release|Any CPU.ActiveCfg = net_2_0_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Release|Any CPU.Build.0 = net_2_0_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.silverlight_Debug|Any CPU.ActiveCfg = silverlight_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.silverlight_Debug|Any CPU.Build.0 = silverlight_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.silverlight_Release|Any CPU.ActiveCfg = silverlight_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.silverlight_Release|Any CPU.Build.0 = silverlight_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.winphone_Debug|Any CPU.ActiveCfg = winphone_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.winphone_Debug|Any CPU.Build.0 = winphone_Debug|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.winphone_Release|Any CPU.ActiveCfg = winphone_Release|Any CPU
+ {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.winphone_Release|Any CPU.Build.0 = winphone_Release|Any CPU
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = mono-api-html\mono-api-html.csproj
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/mcs/tools/corcompare/mono-api-html/ApiDiff.cs b/mcs/tools/corcompare/mono-api-html/ApiDiff.cs
new file mode 100644
index 00000000000..ecfcceaa663
--- /dev/null
+++ b/mcs/tools/corcompare/mono-api-html/ApiDiff.cs
@@ -0,0 +1,101 @@
+//
+// The main differences with mono-api-diff are:
+// * this tool directly produce HTML similar to gdiff.sh used for Xamarin.iOS
+// * this tool reports changes in an "evolutionary" way, not in a breaking way,
+// i.e. it does not assume the source assembly is right (but simply older)
+// * the diff .xml output was not easy to convert back into the HTML format
+// that gdiff.sh produced
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.IO;
+
+namespace Xamarin.ApiDiff {
+
+ public static class State {
+ static TextWriter output;
+
+ public static TextWriter Output {
+ get {
+ if (output == null)
+ output = Console.Out;
+ return output;
+ }
+ set { output = value; }
+ }
+
+ public static string Assembly { get; set; }
+ public static string Namespace { get; set; }
+ public static string Type { get; set; }
+ public static string BaseType { get; set; }
+
+ public static int Indent { get; set; }
+ }
+
+ class Program {
+
+ public static int Main (string[] args)
+ {
+ if (args.Length < 2) {
+ Console.WriteLine ("mono-api-html reference.xml assembly.xml [diff.html]");
+ return 1;
+ }
+
+ try {
+ string input = args [0];
+ string output = args [1];
+ var ac = new AssemblyComparer (input, output);
+ if (args.Length > 2) {
+ string diff = String.Empty;
+ using (var writer = new StringWriter ()) {
+ State.Output = writer;
+ ac.Compare ();
+ diff = State.Output.ToString ();
+ }
+ if (diff.Length > 0) {
+ using (var file = new StreamWriter (args [2])) {
+ if (ac.SourceAssembly == ac.TargetAssembly) {
+ file.WriteLine ("<h1>{0}.dll</h1>", ac.SourceAssembly);
+ } else {
+ file.WriteLine ("<h1>{0}.dll vs {1}.dll</h1>", ac.SourceAssembly, ac.TargetAssembly);
+ }
+ file.Write (diff);
+ }
+ }
+ } else {
+ State.Output = Console.Out;
+ ac.Compare ();
+ }
+ }
+ catch (Exception e) {
+ Console.WriteLine (e);
+ return 1;
+ }
+ return 0;
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tools/corcompare/mono-api-html/AssemblyComparer.cs b/mcs/tools/corcompare/mono-api-html/AssemblyComparer.cs
new file mode 100644
index 00000000000..e083c270850
--- /dev/null
+++ b/mcs/tools/corcompare/mono-api-html/AssemblyComparer.cs
@@ -0,0 +1,78 @@
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public class AssemblyComparer : Comparer {
+
+ XDocument source;
+ XDocument target;
+ NamespaceComparer comparer;
+
+ public AssemblyComparer (string sourceFile, string targetFile)
+ {
+ source = XDocument.Load (sourceFile);
+ target = XDocument.Load (targetFile);
+ comparer = new NamespaceComparer ();
+ }
+
+ public string SourceAssembly { get; private set; }
+ public string TargetAssembly { get; private set; }
+
+ public void Compare ()
+ {
+ Compare (source.Element ("assemblies").Elements ("assembly"),
+ target.Element ("assemblies").Elements ("assembly"));
+ }
+
+ public override void SetContext (XElement current)
+ {
+ State.Assembly = current.GetAttribute ("name");
+ }
+
+ public override void Added (XElement target)
+ {
+ // one assembly per xml file
+ }
+
+ public override void Modified (XElement source, XElement target)
+ {
+ SourceAssembly = source.GetAttribute ("name");
+ TargetAssembly = target.GetAttribute ("name");
+ // TODO: version
+ // ? custom attributes ?
+ comparer.Compare (source, target);
+ }
+
+ public override void Removed (XElement source)
+ {
+ // one assembly per xml file
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tools/corcompare/mono-api-html/ClassComparer.cs b/mcs/tools/corcompare/mono-api-html/ClassComparer.cs
new file mode 100644
index 00000000000..bdf22fea489
--- /dev/null
+++ b/mcs/tools/corcompare/mono-api-html/ClassComparer.cs
@@ -0,0 +1,245 @@
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public class ClassComparer : Comparer {
+
+ InterfaceComparer icomparer;
+ ConstructorComparer ccomparer;
+ FieldComparer fcomparer;
+ PropertyComparer pcomparer;
+ EventComparer ecomparer;
+ MethodComparer mcomparer;
+ ClassComparer kcomparer;
+
+ public ClassComparer ()
+ {
+ icomparer = new InterfaceComparer ();
+ ccomparer = new ConstructorComparer ();
+ fcomparer = new FieldComparer ();
+ pcomparer = new PropertyComparer ();
+ ecomparer = new EventComparer ();
+ mcomparer = new MethodComparer ();
+ }
+
+ public override void SetContext (XElement current)
+ {
+ State.Type = current.GetAttribute ("name");
+ State.BaseType = current.GetAttribute ("base");
+ }
+
+ public void Compare (XElement source, XElement target)
+ {
+ var s = source.Element ("classes");
+ var t = target.Element ("classes");
+ if (XNode.DeepEquals (s, t))
+ return;
+ Compare (s.Elements ("class"), t.Elements ("class"));
+ }
+
+ public override void Added (XElement target)
+ {
+ Output.WriteLine ("<h3>New Type {0}.{1}</h3>", State.Namespace, target.Attribute ("name").Value);
+ Output.WriteLine ("<pre>");
+ State.Indent = 0;
+ AddedInner (target);
+ Output.WriteLine ("</pre>");
+ }
+
+ public void AddedInner (XElement target)
+ {
+ SetContext (target);
+ if (target.IsTrue ("serializable"))
+ Indent ().WriteLine ("[Serializable]");
+
+ var type = target.Attribute ("type").Value;
+
+ if (type == "enum") {
+ // check if [Flags] is present
+ var cattrs = target.Element ("attributes");
+ if (cattrs != null) {
+ foreach (var ca in cattrs.Elements ("attribute")) {
+ if (ca.GetAttribute ("name") == "System.FlagsAttribute") {
+ Indent ().WriteLine ("[Flags]");
+ break;
+ }
+ }
+ }
+ }
+
+ Indent ().Write ("public");
+
+ if (type != "enum") {
+ bool seal = target.IsTrue ("sealed");
+ bool abst = target.IsTrue ("abstract");
+ if (seal && abst)
+ Output.Write (" static");
+ else if (seal && type != "struct")
+ Output.Write (" sealed");
+ else if (abst && type != "interface")
+ Output.Write (" abstract");
+ }
+
+ Output.Write (' ');
+ Output.Write (type);
+ Output.Write (' ');
+ Output.Write (target.GetAttribute ("name"));
+
+ var baseclass = target.GetAttribute ("base");
+ if ((type != "enum") && (type != "struct")) {
+ if (baseclass != null) {
+ if (baseclass == "System.Object") {
+ // while true we do not need to be reminded every time...
+ baseclass = null;
+ } else {
+ Output.Write (" : ");
+ Output.Write (baseclass);
+ }
+ }
+ }
+
+ // interfaces on enums are "standard" not user provided - so we do not want to show them
+ if (type != "enum") {
+ var i = target.Element ("interfaces");
+ if (i != null) {
+ var interfaces = new List<string> ();
+ foreach (var iface in i.Elements ("interface"))
+ interfaces.Add (icomparer.GetDescription (iface));
+ Output.Write ((baseclass == null) ? " : " : ", ");
+ Output.Write (String.Join (", ", interfaces));
+ }
+ }
+
+ Output.WriteLine (" {");
+
+ var t = target.Element ("constructors");
+ if (t != null) {
+ Indent ().WriteLine ("\t// constructors");
+ foreach (var ctor in t.Elements ("constructor"))
+ ccomparer.Added (ctor);
+ }
+
+ t = target.Element ("fields");
+ if (t != null) {
+ if (type != "enum")
+ Indent ().WriteLine ("\t// fields");
+ else
+ SetContext (target);
+ foreach (var field in t.Elements ("field"))
+ fcomparer.Added (field);
+ }
+
+ t = target.Element ("properties");
+ if (t != null) {
+ Indent ().WriteLine ("\t// properties");
+ foreach (var property in t.Elements ("property"))
+ pcomparer.Added (property);
+ }
+
+ t = target.Element ("events");
+ if (t != null) {
+ Indent ().WriteLine ("\t// events");
+ foreach (var evnt in t.Elements ("event"))
+ ecomparer.Added (evnt);
+ }
+
+ t = target.Element ("methods");
+ if (t != null) {
+ Indent ().WriteLine ("\t// methods");
+ foreach (var method in t.Elements ("method"))
+ mcomparer.Added (method);
+ }
+
+ t = target.Element ("classes");
+ if (t != null) {
+ Output.WriteLine ();
+ Indent ().WriteLine ("\t// inner types");
+ kcomparer = new NestedClassComparer ();
+ State.Indent++;
+ foreach (var inner in t.Elements ("class"))
+ kcomparer.AddedInner (inner);
+ State.Indent--;
+ }
+ Indent ().WriteLine ("}");
+ }
+
+ public override void Modified (XElement source, XElement target)
+ {
+ // hack - there could be changes that we're not monitoring (e.g. attributes properties)
+ var output = Output;
+ State.Output = new StringWriter ();
+
+ ccomparer.Compare (source, target);
+ icomparer.Compare (source, target);
+ fcomparer.Compare (source, target);
+ pcomparer.Compare (source, target);
+ ecomparer.Compare (source, target);
+ mcomparer.Compare (source, target);
+
+ var si = source.Element ("classes");
+ if (si != null) {
+ var ti = target.Element ("classes");
+ kcomparer = new NestedClassComparer ();
+ kcomparer.Compare (si.Elements ("class"), ti == null ? null : ti.Elements ("class"));
+ }
+
+ var s = (Output as StringWriter).ToString ();
+ State.Output = output;
+ if (s.Length > 0) {
+ Output.WriteLine ("<h3>Type Changed: {0}.{1}</h3>", State.Namespace, GetTypeName (target));
+ Output.WriteLine (s);
+ }
+ }
+
+ public override void Removed (XElement source)
+ {
+ Output.WriteLine ("<h3>Removed Type {0}.{1}", State.Namespace, GetTypeName (source));
+ }
+
+ public virtual string GetTypeName (XElement type)
+ {
+ return type.GetAttribute ("name");
+ }
+ }
+
+ public class NestedClassComparer : ClassComparer {
+
+ public override void SetContext (XElement current)
+ {
+ }
+
+ public override string GetTypeName (XElement type)
+ {
+ return State.Type + "." + base.GetTypeName (type);
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tools/corcompare/mono-api-html/Comparer.cs b/mcs/tools/corcompare/mono-api-html/Comparer.cs
new file mode 100644
index 00000000000..7869637c472
--- /dev/null
+++ b/mcs/tools/corcompare/mono-api-html/Comparer.cs
@@ -0,0 +1,96 @@
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public abstract class Comparer {
+
+ protected List<XElement> removed = new List<XElement> ();
+
+ public TextWriter Output {
+ get { return State.Output; }
+ }
+
+ protected TextWriter Indent ()
+ {
+ for (int i = 0; i < State.Indent; i++)
+ State.Output.Write ("\t");
+ return State.Output;
+ }
+
+ public abstract void Added (XElement target);
+ public abstract void Modified (XElement source, XElement target);
+ public abstract void Removed (XElement source);
+
+ public virtual bool Equals (XElement source, XElement target)
+ {
+ return XNode.DeepEquals (source, target);
+ }
+
+ public abstract void SetContext (XElement current);
+
+ public virtual void Compare (IEnumerable<XElement> source, IEnumerable<XElement> target)
+ {
+ removed.Clear ();
+
+ foreach (var s in source) {
+ SetContext (s);
+ string sn = s.GetAttribute ("name");
+ var t = target == null ? null : target.SingleOrDefault (x => x.GetAttribute ("name") == sn);
+ if (t == null) {
+ // not in target, it was removed
+ removed.Add (s);
+ } else {
+ t.Remove ();
+ // possibly modified
+ if (Equals (s, t))
+ continue;
+
+ // still in target so will be part of Added
+ Modified (s, t);
+ }
+ }
+ // delayed, that way we show "Modified", "Added" and then "Removed"
+ foreach (var item in removed) {
+ SetContext (item);
+ Removed (item);
+ }
+ // remaining == newly added in target
+ if (target != null) {
+ foreach (var item in target) {
+ SetContext (item);
+ Added (item);
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tools/corcompare/mono-api-html/ConstructorComparer.cs b/mcs/tools/corcompare/mono-api-html/ConstructorComparer.cs
new file mode 100644
index 00000000000..93c4dbd590b
--- /dev/null
+++ b/mcs/tools/corcompare/mono-api-html/ConstructorComparer.cs
@@ -0,0 +1,114 @@
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Text;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public class ConstructorComparer : MemberComparer {
+
+ public override string GroupName {
+ get { return "constructors"; }
+ }
+
+ public override string ElementName {
+ get { return "constructor"; }
+ }
+
+ public override bool Find (XElement e)
+ {
+ return (e.Attribute ("name").Value == Source.Attribute ("name").Value);
+ }
+
+ public override string GetDescription (XElement e)
+ {
+ StringBuilder sb = GetObsoleteMessage (e);
+ bool obsolete = sb.Length > 0;
+
+ var attribs = e.Attribute ("attrib");
+ if (attribs != null) {
+ var attr = (MethodAttributes) Int32.Parse (attribs.Value);
+ if ((attr & MethodAttributes.Public) != MethodAttributes.Public) {
+ sb.Append ("protected ");
+ } else {
+ sb.Append ("public ");
+ }
+
+ if ((attr & MethodAttributes.Static) != 0) {
+ sb.Append ("static ");
+ } else if ((attr & MethodAttributes.Virtual) != 0) {
+ if ((attr & MethodAttributes.VtableLayoutMask) == 0)
+ sb.Append ("override ");
+ else
+ sb.Append ("virtual ");
+ }
+ }
+
+ string name = e.GetAttribute ("name");
+
+ var r = e.GetTypeName ("returntype");
+ if (r != null) {
+ // ctor dont' have a return type
+ sb.Append (r).Append (' ');
+ } else {
+ // show the constructor as it would be defined in C#
+ name = name.Replace (".ctor", State.Type);
+ }
+
+ // the XML file `name` does not contain parameter names, so we must process them ourselves
+ // which gives us the opportunity to simplify type names
+ sb.Append (name.Substring (0, name.IndexOf ('(')));
+
+ var genericp = e.Element ("generic-parameters");
+ if (genericp != null) {
+ var list = new List<string> ();
+ foreach (var p in genericp.Elements ("generic-parameter")) {
+ list.Add (p.GetTypeName ("name"));
+ }
+ sb.Append ("&lt;").Append (String.Join (", ", list)).Append ("&gt;");
+ }
+
+ sb.Append (" (");
+ var parameters = e.Element ("parameters");
+ if (parameters != null) {
+ var list = new List<string> ();
+ foreach (var p in parameters.Elements ("parameter")) {
+ list.Add (p.GetTypeName ("type") + " " + p.GetAttribute ("name"));
+ }
+ sb.Append (String.Join (", ", list));
+ }
+ sb.Append (");");
+
+ if (obsolete)
+ sb.AppendLine (); // more readable output
+ return sb.ToString ();
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tools/corcompare/mono-api-html/EventComparer.cs b/mcs/tools/corcompare/mono-api-html/EventComparer.cs
new file mode 100644
index 00000000000..c7d1e8bc886
--- /dev/null
+++ b/mcs/tools/corcompare/mono-api-html/EventComparer.cs
@@ -0,0 +1,53 @@
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Text;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public class EventComparer : MemberComparer {
+
+ public override string GroupName {
+ get { return "events"; }
+ }
+
+ public override string ElementName {
+ get { return "event"; }
+ }
+
+ public override string GetDescription (XElement e)
+ {
+ StringBuilder sb = GetObsoleteMessage (e);
+ // TODO: attribs
+ sb.Append ("public event ");
+ sb.Append (e.GetTypeName ("eventtype")).Append (' ');
+ sb.Append (e.GetAttribute ("name")).Append (';');
+ return sb.ToString ();
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tools/corcompare/mono-api-html/FieldComparer.cs b/mcs/tools/corcompare/mono-api-html/FieldComparer.cs
new file mode 100644
index 00000000000..54942b64043
--- /dev/null
+++ b/mcs/tools/corcompare/mono-api-html/FieldComparer.cs
@@ -0,0 +1,100 @@
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Text;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public class FieldComparer : MemberComparer {
+
+ public override string GroupName {
+ get { return "fields"; }
+ }
+
+ public override string ElementName {
+ get { return "field"; }
+ }
+
+ public override string GetDescription (XElement e)
+ {
+ var sb = GetObsoleteMessage (e);
+ bool obsolete = sb.Length > 0;
+
+ string name = e.GetAttribute ("name");
+ string value = e.GetAttribute ("value");
+
+ if (State.BaseType == "System.Enum") {
+ sb.Append (name).Append (" = ").Append (value).Append (',');
+ } else {
+ var attribs = e.Attribute ("attrib");
+ if (attribs != null) {
+ var attr = (FieldAttributes)Int32.Parse (attribs.Value);
+ if ((attr & FieldAttributes.Public) != FieldAttributes.Public) {
+ sb.Append ("protected ");
+ } else {
+ sb.Append ("public ");
+ }
+
+ if ((attr & FieldAttributes.Static) != 0)
+ sb.Append ("static ");
+
+ if ((attr & FieldAttributes.Literal) != 0)
+ sb.Append ("const ");
+ }
+
+ string ftype = e.GetTypeName ("fieldtype");
+ sb.Append (ftype).Append (' ');
+ sb.Append (name);
+ if (ftype == "string")
+ sb.Append (" = \"").Append (e.Attribute ("value").Value).Append ('"');
+ sb.Append (';');
+ }
+
+ if (obsolete)
+ sb.AppendLine (); // more readable output
+ return sb.ToString ();
+ }
+
+ public override void BeforeAdding ()
+ {
+ if (State.BaseType == "System.Enum")
+ Output.WriteLine ("<p>Added values:</p><pre>");
+ else
+ base.BeforeAdding ();
+ }
+
+ public override void BeforeRemoving ()
+ {
+ if (State.BaseType == "System.Enum")
+ Output.WriteLine ("<p>Removed values:</p><pre>");
+ else
+ base.BeforeRemoving ();
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tools/corcompare/mono-api-html/Helpers.cs b/mcs/tools/corcompare/mono-api-html/Helpers.cs
new file mode 100644
index 00000000000..098b29b29a0
--- /dev/null
+++ b/mcs/tools/corcompare/mono-api-html/Helpers.cs
@@ -0,0 +1,130 @@
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public static class Helper {
+
+ public static bool IsTrue (this XElement self, string name)
+ {
+ return (self.GetAttribute (name) == "true");
+ }
+
+ public static string GetAttribute (this XElement self, string name)
+ {
+ var n = self.Attribute (name);
+ if (n == null)
+ return null;
+ return n.Value;
+ }
+
+ // null == no obsolete, String.Empty == no description
+ public static string GetObsoleteMessage (this XElement self)
+ {
+ var cattrs = self.Element ("attributes");
+ if (cattrs == null)
+ return null;
+
+ foreach (var ca in cattrs.Elements ("attribute")) {
+ if (ca.GetAttribute ("name") != "System.ObsoleteAttribute")
+ continue;
+ var props = ca.Element ("properties");
+ if (props == null)
+ return String.Empty; // no description
+ foreach (var p in props.Elements ("property")) {
+ if (p.GetAttribute ("name") != "Message")
+ continue;
+ return p.GetAttribute ("value");
+ }
+ }
+ return null;
+ }
+
+ // make it beautiful (.NET -> C#)
+ public static string GetTypeName (this XElement self, string name)
+ {
+ string type = self.GetAttribute (name);
+ if (type == null)
+ return null;
+
+ // inner types
+ return GetTypeName (type.Replace ('+', '.'));
+ }
+
+ static string GetTypeName (string type)
+ {
+ if (type.StartsWith ("System.Nullable`1[", StringComparison.Ordinal))
+ return type.Substring (18, type.Length - 19) + "?";
+
+ int pos = type.IndexOf ('`');
+ if (pos >= 0) {
+ int end = type.LastIndexOf (']');
+ string subtype = type.Substring (pos + 3, end - pos - 3);
+ return type.Substring (0, pos) + "&lt;" + GetTypeName (subtype) + "&gt;";
+ }
+
+ switch (type) {
+ case "System.String":
+ return "string";
+ case "System.Int32":
+ return "int";
+ case "System.UInt32":
+ return "uint";
+ case "System.Int64":
+ return "long";
+ case "System.UInt64":
+ return "ulong";
+ case "System.Void":
+ return "void";
+ case "System.Boolean":
+ return "bool";
+ case "System.Object":
+ return "object";
+ case "System.Single":
+ return "float";
+ case "System.Double":
+ return "double";
+ case "System.Byte":
+ return "byte";
+ case "System.SByte":
+ return "sbyte";
+ case "System.Int16":
+ return "short";
+ case "System.UInt16":
+ return "ushort";
+ case "System.Char":
+ return "char";
+ default:
+ if (type.StartsWith (State.Namespace, StringComparison.Ordinal))
+ type = type.Substring (State.Namespace.Length + 1);
+ return type;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tools/corcompare/mono-api-html/InterfaceComparer.cs b/mcs/tools/corcompare/mono-api-html/InterfaceComparer.cs
new file mode 100644
index 00000000000..df52f162e49
--- /dev/null
+++ b/mcs/tools/corcompare/mono-api-html/InterfaceComparer.cs
@@ -0,0 +1,47 @@
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public class InterfaceComparer : MemberComparer {
+
+ public override string GroupName {
+ get { return "interfaces"; }
+ }
+
+ public override string ElementName {
+ get { return "interface"; }
+ }
+
+ public override string GetDescription (XElement e)
+ {
+ return e.GetTypeName ("name");
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tools/corcompare/mono-api-html/MemberComparer.cs b/mcs/tools/corcompare/mono-api-html/MemberComparer.cs
new file mode 100644
index 00000000000..8dcdff546d3
--- /dev/null
+++ b/mcs/tools/corcompare/mono-api-html/MemberComparer.cs
@@ -0,0 +1,178 @@
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public abstract class MemberComparer : Comparer {
+
+ public abstract string GroupName { get; }
+ public abstract string ElementName { get; }
+
+ public void Compare (XElement source, XElement target)
+ {
+ var s = source.Element (GroupName);
+ var t = target.Element (GroupName);
+ if (XNode.DeepEquals (s, t))
+ return;
+
+ if (s == null) {
+ BeforeAdding ();
+ foreach (var item in t.Elements (ElementName))
+ Added (item);
+ AfterAdding ();
+ } else if (t == null) {
+ BeforeRemoving ();
+ foreach (var item in s.Elements (ElementName))
+ Removed (item);
+ AfterRemoving ();
+ } else {
+ Compare (s.Elements (ElementName), t.Elements (ElementName));
+ }
+ }
+
+ public override void SetContext (XElement current)
+ {
+ }
+
+ public XElement Source { get; set; }
+
+ public virtual bool Find (XElement e)
+ {
+ return e.GetAttribute ("name") == Source.GetAttribute ("name");
+ }
+
+ public override void Compare (IEnumerable<XElement> source, IEnumerable<XElement> target)
+ {
+ removed.Clear ();
+
+ foreach (var s in source) {
+ SetContext (s);
+ Source = s;
+ var t = target.SingleOrDefault (Find);
+ if (t == null) {
+ // not in target, it was removed
+ removed.Add (s);
+ } else {
+ // possibly modified
+ if (Equals (s, t)) {
+ t.Remove ();
+ continue;
+ }
+
+ // still in target so will be part of Added
+ removed.Add (s);
+ Modified (s, t);
+ }
+ }
+ // delayed, that way we show "Modified", "Added" and then "Removed"
+ bool r = false;
+ foreach (var item in removed) {
+ SetContext (item);
+ if (!r) {
+ BeforeRemoving ();
+ r = true;
+ }
+ Removed (item);
+ }
+ if (r)
+ AfterRemoving ();
+ // remaining == newly added in target
+ bool a = false;
+ foreach (var item in target) {
+ SetContext (item);
+ if (!a) {
+ BeforeAdding ();
+ a = true;
+ }
+ Added (item);
+ }
+ if (a)
+ AfterAdding ();
+ }
+
+ public abstract string GetDescription (XElement e);
+
+ protected StringBuilder GetObsoleteMessage (XElement e)
+ {
+ var sb = new StringBuilder ();
+ string o = e.GetObsoleteMessage ();
+ if (o != null) {
+ sb.Append ("[Obsolete (\"").Append (o).AppendLine ("\")]");
+ for (int i = 0; i < State.Indent + 1; i++)
+ sb.Append ('\t');
+ }
+ return sb;
+ }
+
+ public override bool Equals (XElement source, XElement target)
+ {
+ if (base.Equals (source, target))
+ return true;
+
+ return GetDescription (source) == GetDescription (target);
+ }
+
+ public virtual void BeforeAdding ()
+ {
+ Output.WriteLine ("<p>Added {0}:</p><pre>", GroupName);
+ }
+
+ public override void Added (XElement target)
+ {
+ Indent ().WriteLine ("\t{0}", GetDescription (target));
+ }
+
+ public virtual void AfterAdding ()
+ {
+ Output.WriteLine ("</pre>");
+ }
+
+ public override void Modified (XElement source, XElement target)
+ {
+ }
+
+ public virtual void BeforeRemoving ()
+ {
+ Output.WriteLine ("<p>Removed {0}:</p><pre>", GroupName);
+ }
+
+ public override void Removed (XElement source)
+ {
+ Indent ().WriteLine ("\t{0}", GetDescription (source));
+ }
+
+ public virtual void AfterRemoving ()
+ {
+ Output.WriteLine ("</pre>");
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tools/corcompare/mono-api-html/MethodComparer.cs b/mcs/tools/corcompare/mono-api-html/MethodComparer.cs
new file mode 100644
index 00000000000..fb28c40cccd
--- /dev/null
+++ b/mcs/tools/corcompare/mono-api-html/MethodComparer.cs
@@ -0,0 +1,49 @@
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public class MethodComparer : ConstructorComparer {
+
+ public override string GroupName {
+ get { return "methods"; }
+ }
+
+ public override string ElementName {
+ get { return "method"; }
+ }
+
+ // operators have identical names but vary by return types
+ public override bool Find (XElement e)
+ {
+ return (e.GetAttribute ("name") == Source.GetAttribute ("name")) &&
+ (e.GetAttribute ("returntype") == Source.GetAttribute ("returntype"));
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tools/corcompare/mono-api-html/NamespaceComparer.cs b/mcs/tools/corcompare/mono-api-html/NamespaceComparer.cs
new file mode 100644
index 00000000000..7239385870e
--- /dev/null
+++ b/mcs/tools/corcompare/mono-api-html/NamespaceComparer.cs
@@ -0,0 +1,90 @@
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.IO;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public class NamespaceComparer : Comparer {
+
+ ClassComparer comparer;
+
+ public NamespaceComparer ()
+ {
+ comparer = new ClassComparer ();
+ }
+
+ public void Compare (XElement source, XElement target)
+ {
+ var s = source.Element ("namespaces");
+ var t = target.Element ("namespaces");
+ if (XNode.DeepEquals (s, t))
+ return;
+ Compare (s.Elements ("namespace"), t.Elements ("namespace"));
+ }
+
+ public override void SetContext (XElement current)
+ {
+ State.Namespace = current.Attribute ("name").Value;
+ }
+
+ public override void Added (XElement target)
+ {
+ Output.WriteLine ("<h2>New Namespace {0}</h2>", target.Attribute ("name").Value);
+ Output.WriteLine ();
+ // list all new types
+ foreach (var addedType in target.Element ("classes").Elements ("class"))
+ comparer.Added (addedType);
+ Output.WriteLine ();
+ }
+
+ public override void Modified (XElement source, XElement target)
+ {
+ var output = Output;
+ State.Output = new StringWriter ();
+ comparer.Compare (source, target);
+
+ var s = Output.ToString ();
+ State.Output = output;
+ if (s.Length > 0) {
+ Output.WriteLine ("<h2>Namespace {0}</h2>", target.Attribute ("name").Value);
+ Output.WriteLine (s);
+ }
+ }
+
+ public override void Removed (XElement source)
+ {
+ Output.WriteLine ("<h2>Removed Namespace {0}</h2>", source.Attribute ("name").Value);
+ Output.WriteLine ();
+ // list all removed types
+ foreach (var removedType in source.Element ("classes").Elements ("class"))
+ comparer.Removed (removedType);
+ Output.WriteLine ();
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tools/corcompare/mono-api-html/PropertyComparer.cs b/mcs/tools/corcompare/mono-api-html/PropertyComparer.cs
new file mode 100644
index 00000000000..0971e71b3d8
--- /dev/null
+++ b/mcs/tools/corcompare/mono-api-html/PropertyComparer.cs
@@ -0,0 +1,97 @@
+//
+// Authors
+// Sebastien Pouliot <sebastien@xamarin.com>
+//
+// Copyright 2013 Xamarin Inc. http://www.xamarin.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Text;
+using System.Xml.Linq;
+
+namespace Xamarin.ApiDiff {
+
+ public class PropertyComparer : MemberComparer {
+
+ public override string GroupName {
+ get { return "properties"; }
+ }
+
+ public override string ElementName {
+ get { return "property"; }
+ }
+
+ public override bool Find (XElement e)
+ {
+ if (!base.Find (e))
+ return false;
+ // the same Item (indexer) property can have different parameters
+ return e.GetAttribute ("params") == Source.GetAttribute ("params");
+ }
+
+ public override string GetDescription (XElement e)
+ {
+ string name = e.Attribute ("name").Value;
+ string ptype = e.GetTypeName ("ptype");
+
+ bool virt = false;
+ bool over = false;
+ bool stat = false;
+ bool getter = false;
+ bool setter = false;
+ bool family = false;
+ var methods = e.Element ("methods");
+ if (methods != null) {
+ foreach (var m in methods.Elements ("method")) {
+ virt |= m.IsTrue ("virtual");
+ stat |= m.IsTrue ("static");
+ var n = m.GetAttribute ("name");
+ getter |= n.StartsWith ("get_", StringComparison.Ordinal);
+ setter |= n.StartsWith ("set_", StringComparison.Ordinal);
+ var attribs = (MethodAttributes) Int32.Parse (m.GetAttribute ("attrib"));
+ family = ((attribs & MethodAttributes.Public) != MethodAttributes.Public);
+ over |= (attribs & MethodAttributes.VtableLayoutMask) == 0;
+ }
+ }
+
+ var sb = GetObsoleteMessage (e);
+ bool obsolete = sb.Length > 0;
+
+ sb.Append (family ? "protected " : "public ");
+ if (virt)
+ sb.Append (over ? "override " : "virtual ");
+ else if (stat)
+ sb.Append ("static ");
+ sb.Append (ptype).Append (' ').Append (name).Append (" { ");
+ if (getter)
+ sb.Append ("get; ");
+ if (setter)
+ sb.Append ("set; ");
+ sb.Append ("}");
+
+ if (obsolete)
+ sb.AppendLine (); // more readable output
+ return sb.ToString ();
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tools/corcompare/mono-api-html/mono-api-html.csproj b/mcs/tools/corcompare/mono-api-html/mono-api-html.csproj
new file mode 100644
index 00000000000..6a205f2956a
--- /dev/null
+++ b/mcs/tools/corcompare/mono-api-html/mono-api-html.csproj
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.0</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{D25986E2-7A41-4966-A26D-5614BAC7B8A7}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>Xamarin.ApiDiff</RootNamespace>
+ <AssemblyName>mono-api-html</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ <Commandlineparameters>../../../6.4.5.xml ../../../7.0.2.xml</Commandlineparameters>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>full</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <Externalconsole>true</Externalconsole>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Helpers.cs" />
+ <Compile Include="InterfaceComparer.cs" />
+ <Compile Include="NamespaceComparer.cs" />
+ <Compile Include="MemberComparer.cs" />
+ <Compile Include="FieldComparer.cs" />
+ <Compile Include="PropertyComparer.cs" />
+ <Compile Include="EventComparer.cs" />
+ <Compile Include="MethodComparer.cs" />
+ <Compile Include="ConstructorComparer.cs" />
+ <Compile Include="Comparer.cs" />
+ <Compile Include="AssemblyComparer.cs" />
+ <Compile Include="ClassComparer.cs" />
+ <Compile Include="ApiDiff.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+</Project> \ No newline at end of file
diff --git a/mcs/tools/corcompare/mono-api-info.csproj b/mcs/tools/corcompare/mono-api-info.csproj
index 1596015470e..44ef75821a1 100644
--- a/mcs/tools/corcompare/mono-api-info.csproj
+++ b/mcs/tools/corcompare/mono-api-info.csproj
@@ -56,7 +56,7 @@
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
- <Reference Include="System.XML" />
+ <Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyResolver.cs" />
@@ -76,15 +76,6 @@
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\external\cecil\Mono.Cecil.csproj">
- <Project>{d68133bd-1e63-496e-9ede-4fbdbf77b486}</Project>
- <Name>Mono.Cecil</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="app.config" />
- </ItemGroup>
<Import Project="$(MSBuildToolsPath)\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.
@@ -93,4 +84,10 @@
<Target Name="AfterBuild">
</Target>
-->
+ <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.Steps/BlacklistStep.cs b/mcs/tools/linker/Mono.Linker.Steps/BlacklistStep.cs
index 1c3175fbf4f..08761871fd6 100644
--- a/mcs/tools/linker/Mono.Linker.Steps/BlacklistStep.cs
+++ b/mcs/tools/linker/Mono.Linker.Steps/BlacklistStep.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System.Collections;
using System.IO;
using System.Reflection;
using System.Xml.XPath;
@@ -54,7 +53,7 @@ namespace Mono.Linker.Steps {
static string GetAssemblyName (string descriptor)
{
- int pos = descriptor.LastIndexOf (".");
+ int pos = descriptor.LastIndexOf ('.');
if (pos == -1)
return descriptor;
diff --git a/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs b/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs
index cadab17357a..bb944b1b551 100644
--- a/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs
+++ b/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs
@@ -868,7 +868,7 @@ namespace Mono.Linker.Steps {
(Annotations.GetAction (assembly) == AssemblyAction.Link && Annotations.GetAction (method) == MethodAction.Parse));
}
- static bool IsPropertyMethod (MethodDefinition md)
+ static internal bool IsPropertyMethod (MethodDefinition md)
{
return (md.SemanticsAttributes & MethodSemanticsAttributes.Getter) != 0 ||
(md.SemanticsAttributes & MethodSemanticsAttributes.Setter) != 0;
@@ -881,7 +881,7 @@ namespace Mono.Linker.Steps {
(md.SemanticsAttributes & MethodSemanticsAttributes.RemoveOn) != 0;
}
- static PropertyDefinition GetProperty (MethodDefinition md)
+ static internal PropertyDefinition GetProperty (MethodDefinition md)
{
TypeDefinition declaringType = (TypeDefinition) md.DeclaringType;
foreach (PropertyDefinition prop in declaringType.Properties)
diff --git a/mcs/tools/linker/Mono.Linker.Steps/OutputStep.cs b/mcs/tools/linker/Mono.Linker.Steps/OutputStep.cs
index af3325a77af..5dfa488d625 100644
--- a/mcs/tools/linker/Mono.Linker.Steps/OutputStep.cs
+++ b/mcs/tools/linker/Mono.Linker.Steps/OutputStep.cs
@@ -61,6 +61,7 @@ namespace Mono.Linker.Steps {
CopyConfigFileIfNeeded (assembly, directory);
switch (Annotations.GetAction (assembly)) {
+ case AssemblyAction.Save:
case AssemblyAction.Link:
assembly.Write (GetAssemblyFileName (assembly, directory), SaveSymbols (assembly));
break;
diff --git a/mcs/tools/linker/Mono.Linker.Steps/SweepStep.cs b/mcs/tools/linker/Mono.Linker.Steps/SweepStep.cs
index 0f2518843ff..552693546be 100644
--- a/mcs/tools/linker/Mono.Linker.Steps/SweepStep.cs
+++ b/mcs/tools/linker/Mono.Linker.Steps/SweepStep.cs
@@ -37,6 +37,7 @@ namespace Mono.Linker.Steps {
public class SweepStep : BaseStep {
AssemblyDefinition [] assemblies;
+ HashSet<AssemblyDefinition> resolvedTypeReferences;
protected override void Process ()
{
@@ -100,7 +101,50 @@ namespace Mono.Linker.Steps {
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;
+ }
+ }
+
+ void ResolveAllTypeReferences (AssemblyDefinition assembly)
+ {
+ if (resolvedTypeReferences == null)
+ resolvedTypeReferences = new HashSet<AssemblyDefinition> ();
+ if (resolvedTypeReferences.Contains (assembly))
return;
+ resolvedTypeReferences.Add (assembly);
+
+ var hash = new Dictionary<TypeReference,IMetadataScope> ();
+
+ foreach (TypeReference tr in assembly.MainModule.GetTypeReferences ()) {
+ if (hash.ContainsKey (tr))
+ continue;
+ var td = tr.Resolve ();
+ // at this stage reference might include things that can't be resolved
+ var scope = td == null ? null : assembly.MainModule.Import (td).Scope;
+ hash.Add (tr, 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;
}
}
diff --git a/mcs/tools/linker/Mono.Linker/AssemblyAction.cs b/mcs/tools/linker/Mono.Linker/AssemblyAction.cs
index 8eac19e5e48..14282b376be 100644
--- a/mcs/tools/linker/Mono.Linker/AssemblyAction.cs
+++ b/mcs/tools/linker/Mono.Linker/AssemblyAction.cs
@@ -29,9 +29,18 @@
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/mdbrebase/mdbrebase.cs b/mcs/tools/mdbrebase/mdbrebase.cs
index 65e7f26fa91..40b68360031 100644
--- a/mcs/tools/mdbrebase/mdbrebase.cs
+++ b/mcs/tools/mdbrebase/mdbrebase.cs
@@ -2,6 +2,7 @@ using System;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
+using System.Text.RegularExpressions;
using System.IO;
using Mono.CompilerServices.SymbolWriter;
@@ -15,6 +16,11 @@ class Settings
public string OutputDirectory { get; set; }
public string InputPattern { get; set; }
public string OutputPattern { get; set; }
+ public bool InputPatternIsRegex { get; set; }
+ public bool FileNamesOnly { get; set; }
+ public bool Verbose { get; set; }
+
+ Regex inputPatternRegex;
public bool Validate ()
{
@@ -23,8 +29,15 @@ class Settings
public string Replace (string input)
{
- if (input.StartsWith (InputPattern))
- return input.Replace (InputPattern, OutputPattern);
+ if (InputPatternIsRegex) {
+ if (inputPatternRegex == null)
+ inputPatternRegex = new Regex (InputPattern);
+ return inputPatternRegex.Replace (input, OutputPattern);
+ } else {
+ if (input.StartsWith (InputPattern))
+ return OutputPattern + input.Substring (InputPattern.Length);
+ }
+
return input;
}
}
@@ -46,7 +59,14 @@ class MdbRebase
var output = new MonoSymbolFile ();
foreach (var s in input.Sources) {
- s.FileName = settings.Replace (s.FileName);
+ var newFileName = settings.FileNamesOnly
+ ? Path.Combine (Path.GetDirectoryName (s.FileName), settings.Replace (Path.GetFileName (s.FileName)))
+ : settings.Replace (s.FileName);
+
+ if (settings.Verbose)
+ Console.WriteLine ("{0} -> {1}", s.FileName, newFileName);
+
+ s.FileName = newFileName;
output.AddSource (s);
}
@@ -97,6 +117,9 @@ class Driver {
var p = new OptionSet () {
{ "d=|output=", "Output directory to the mdb file, replace existing one if ommited", v => s.OutputDirectory = v },
+ { "v|verbose", "Be verbose with output (show individual path rewrites)", v => s.Verbose = true },
+ { "f|filenames", "Only operate on file names, not full absolute paths", v => s.FileNamesOnly = true },
+ { "r|regex", "Input pattern is a regular expression", v => s.InputPatternIsRegex = true },
{ "i=|input-pattern=", "Input pattern to replace (must not be a prefix to output-pattern)(required)", v => s.InputPattern = v },
{ "o=|output-pattern=", "Output pattern to replace (required)", v => s.OutputPattern = v },
{ "h|?|help", v => showHelp = true },
diff --git a/mcs/tools/mdoc/Mono.Documentation/monodocer.cs b/mcs/tools/mdoc/Mono.Documentation/monodocer.cs
index 75592088688..244d0478bdf 100644
--- a/mcs/tools/mdoc/Mono.Documentation/monodocer.cs
+++ b/mcs/tools/mdoc/Mono.Documentation/monodocer.cs
@@ -3365,10 +3365,10 @@ public abstract class MemberFormatter {
if (type is PointerType) {
return AppendPointerTypeName (buf, type, context);
}
- AppendNamespace (buf, type);
if (type is GenericParameter) {
return AppendTypeName (buf, type, context);
}
+ AppendNamespace (buf, type);
GenericInstanceType genInst = type as GenericInstanceType;
if (type.GenericParameters.Count == 0 &&
(genInst == null ? true : genInst.GenericArguments.Count == 0)) {
diff --git a/mcs/tools/mdoc/Resources/monodoc-ecma.xsd b/mcs/tools/mdoc/Resources/monodoc-ecma.xsd
index fe14e2cdd26..7755b2c6e86 100644
--- a/mcs/tools/mdoc/Resources/monodoc-ecma.xsd
+++ b/mcs/tools/mdoc/Resources/monodoc-ecma.xsd
@@ -351,7 +351,7 @@ add masterdoc support?
<xs:element name="format">
<xs:complexType>
<xs:sequence>
- <xs:any minOccurs="0" processContents="lax" />
+ <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax" />
</xs:sequence>
<xs:attribute ref="type" />
</xs:complexType>
diff --git a/mcs/tools/mdoc/Test/DocTest-v1.cs b/mcs/tools/mdoc/Test/DocTest-v1.cs
index 6896008e2f2..52bc1961113 100644
--- a/mcs/tools/mdoc/Test/DocTest-v1.cs
+++ b/mcs/tools/mdoc/Test/DocTest-v1.cs
@@ -362,6 +362,10 @@ namespace Mono.DocTest {
/// <returns>A <see cref="T:Mono.DocTest.Widget" /> instance.</returns>
public static Widget operator+ (Widget x) {return null;}
+ /// <remarks><c>M:Mono.DocTest.Widget.op_Division</c>.</remarks>
+ /// <returns>A <see cref="T:Mono.DocTest.Widget" /> instance.</returns>
+ public static Widget op_Division = null;
+
/// <param name="x1">Yet Another <see cref="T:Mono.DocTest.Widget" />.</param>
/// <param name="x2">Yay, <see cref="T:Mono.DocTest.Widget" />s.</param>
/// <remarks><c>M:Mono.DocTest.Widget.op_Addition(Mono.DocTest.Widget,Mono.DocTest.Widget)</c>.</remarks>
diff --git a/mcs/tools/mdoc/Test/en.expected.delete/Mono.DocTest/Widget.xml b/mcs/tools/mdoc/Test/en.expected.delete/Mono.DocTest/Widget.xml
index 6d67e84a38e..8918f4d8688 100644
--- a/mcs/tools/mdoc/Test/en.expected.delete/Mono.DocTest/Widget.xml
+++ b/mcs/tools/mdoc/Test/en.expected.delete/Mono.DocTest/Widget.xml
@@ -712,6 +712,18 @@
<remarks>To be added.</remarks>
</Docs>
</Member>
+ <Member MemberName="op_Division">
+ <MemberSignature Language="C#" Value="public static Mono.DocTest.Widget op_Division;" />
+ <MemberSignature Language="ILAsm" Value=".field public static class Mono.DocTest.Widget op_Division" />
+ <MemberType>Field</MemberType>
+ <ReturnValue>
+ <ReturnType>Mono.DocTest.Widget</ReturnType>
+ </ReturnValue>
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ </Member>
<Member MemberName="op_Explicit">
<MemberSignature Language="C#" Value="public static int op_Explicit (Mono.DocTest.Widget x);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname int32 op_Explicit(class Mono.DocTest.Widget x) cil managed" />
diff --git a/mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Widget.xml b/mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Widget.xml
index 31435197800..c873e3aa415 100644
--- a/mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Widget.xml
+++ b/mcs/tools/mdoc/Test/en.expected.importslashdoc/Mono.DocTest/Widget.xml
@@ -866,6 +866,23 @@
<c>M:Mono.DocTest.Widget.op_Addition(Mono.DocTest.Widget,Mono.DocTest.Widget)</c>.</remarks>
</Docs>
</Member>
+ <Member MemberName="op_Division">
+ <MemberSignature Language="C#" Value="public static Mono.DocTest.Widget op_Division;" />
+ <MemberSignature Language="ILAsm" Value=".field public static class Mono.DocTest.Widget op_Division" />
+ <MemberType>Field</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>0.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <ReturnValue>
+ <ReturnType>Mono.DocTest.Widget</ReturnType>
+ </ReturnValue>
+ <Docs>
+ <summary>To be added.</summary>
+ <returns>A <see cref="T:Mono.DocTest.Widget" /> instance.</returns>
+ <remarks>
+ <c>M:Mono.DocTest.Widget.op_Division</c>.</remarks>
+ </Docs>
+ </Member>
<Member MemberName="op_Explicit">
<MemberSignature Language="C#" Value="public static int op_Explicit (Mono.DocTest.Widget x);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname int32 op_Explicit(class Mono.DocTest.Widget x) cil managed" />
diff --git a/mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/Widget.xml b/mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/Widget.xml
index 0c1f1893057..af7e8564c1a 100644
--- a/mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/Widget.xml
+++ b/mcs/tools/mdoc/Test/en.expected.since/Mono.DocTest/Widget.xml
@@ -846,6 +846,22 @@
<remarks>To be added.</remarks>
</Docs>
</Member>
+ <Member MemberName="op_Division">
+ <MemberSignature Language="C#" Value="public static Mono.DocTest.Widget op_Division;" />
+ <MemberSignature Language="ILAsm" Value=".field public static class Mono.DocTest.Widget op_Division" />
+ <MemberType>Field</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>0.0.0.0</AssemblyVersion>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <ReturnValue>
+ <ReturnType>Mono.DocTest.Widget</ReturnType>
+ </ReturnValue>
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ </Member>
<Member MemberName="op_Explicit">
<MemberSignature Language="C#" Value="public static int op_Explicit (Mono.DocTest.Widget x);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname int32 op_Explicit(class Mono.DocTest.Widget x) cil managed" />
diff --git a/mcs/tools/mdoc/Test/en.expected/Mono.DocTest/Widget.xml b/mcs/tools/mdoc/Test/en.expected/Mono.DocTest/Widget.xml
index b2242b00993..d7fb2ea21da 100644
--- a/mcs/tools/mdoc/Test/en.expected/Mono.DocTest/Widget.xml
+++ b/mcs/tools/mdoc/Test/en.expected/Mono.DocTest/Widget.xml
@@ -812,6 +812,21 @@
<remarks>To be added.</remarks>
</Docs>
</Member>
+ <Member MemberName="op_Division">
+ <MemberSignature Language="C#" Value="public static Mono.DocTest.Widget op_Division;" />
+ <MemberSignature Language="ILAsm" Value=".field public static class Mono.DocTest.Widget op_Division" />
+ <MemberType>Field</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>0.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <ReturnValue>
+ <ReturnType>Mono.DocTest.Widget</ReturnType>
+ </ReturnValue>
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ </Member>
<Member MemberName="op_Explicit">
<MemberSignature Language="C#" Value="public static int op_Explicit (Mono.DocTest.Widget x);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname int32 op_Explicit(class Mono.DocTest.Widget x) cil managed" />
diff --git a/mcs/tools/mdoc/Test/html.expected/Mono.DocTest/Widget.html b/mcs/tools/mdoc/Test/html.expected/Mono.DocTest/Widget.html
index 943c58d4227..7f29d8c54a2 100644
--- a/mcs/tools/mdoc/Test/html.expected/Mono.DocTest/Widget.html
+++ b/mcs/tools/mdoc/Test/html.expected/Mono.DocTest/Widget.html
@@ -361,6 +361,20 @@
</tr>
<tr valign="top">
<td>
+ <div>static </div>
+ </td>
+ <td>
+ <b>
+ <a href="#F:Mono.DocTest.Widget.op_Division">op_Division</a>
+ </b>
+ </td>
+ <td>
+ <i>
+ <a href="../Mono.DocTest/Widget.html">Widget</a>
+ </i>. <span class="NotEntered">Documentation for this section has not yet been entered.</span></td>
+ </tr>
+ <tr valign="top">
+ <td>
<div>
</div>
</td>
@@ -1771,6 +1785,23 @@
<b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
+ <h3 id="F:Mono.DocTest.Widget.op_Division">op_Division Field</h3>
+ <blockquote id="F:Mono.DocTest.Widget.op_Division:member">
+ <p class="Summary">
+ <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+ </p>
+ <h2>Syntax</h2>
+ <div class="Signature">public static <a href="../Mono.DocTest/Widget.html">Widget</a> operator/ </div>
+ <h4 class="Subsection">Returns</h4>
+ <blockquote class="SubsectionBox" id="F:Mono.DocTest.Widget.op_Division:Returns">A <a href="../Mono.DocTest/Widget.html">Mono.DocTest.Widget</a> instance.</blockquote>
+ <h2 class="Section">Remarks</h2>
+ <div class="SectionBox" id="F:Mono.DocTest.Widget.op_Division:Remarks">
+ <tt>M:Mono.DocTest.Widget.op_Division</tt>.</div>
+ <h2 class="Section">Requirements</h2>
+ <div class="SectionBox" id="F:Mono.DocTest.Widget.op_Division:Version Information">
+ <b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
+ <hr size="1" />
+ </blockquote>
<h3 id="M:Mono.DocTest.Widget.op_Explicit(Mono.DocTest.Widget)~System.Int32">Conversion Method</h3>
<blockquote id="M:Mono.DocTest.Widget.op_Explicit(Mono.DocTest.Widget)~System.Int32:member">
<p class="Summary">
diff --git a/mcs/tools/mdoc/Test/msxdoc-expected.importslashdoc.xml b/mcs/tools/mdoc/Test/msxdoc-expected.importslashdoc.xml
index e431794cd27..eb7fb859d71 100644
--- a/mcs/tools/mdoc/Test/msxdoc-expected.importslashdoc.xml
+++ b/mcs/tools/mdoc/Test/msxdoc-expected.importslashdoc.xml
@@ -568,6 +568,12 @@ class Example {
<remarks>
<c>M:Mono.DocTest.Widget.op_Addition(Mono.DocTest.Widget,Mono.DocTest.Widget)</c>.</remarks>
</member>
+ <member name="F:Mono.DocTest.Widget.op_Division">
+ <summary>To be added.</summary>
+ <returns>A <see cref="T:Mono.DocTest.Widget" /> instance.</returns>
+ <remarks>
+ <c>M:Mono.DocTest.Widget.op_Division</c>.</remarks>
+ </member>
<member name="M:Mono.DocTest.Widget.op_Explicit(Mono.DocTest.Widget)~System.Int32">
<param name="x">
<see cref="T:Mono.DocTest.Widget" />s are fun!.</param>
diff --git a/mcs/tools/mkbundle/mkbundle.cs b/mcs/tools/mkbundle/mkbundle.cs
index fa8e7166019..8f7e736ff63 100644..100755
--- a/mcs/tools/mkbundle/mkbundle.cs
+++ b/mcs/tools/mkbundle/mkbundle.cs
@@ -38,6 +38,8 @@ class MakeBundle {
static bool compress;
static bool nomain;
static bool? use_dos2unix = null;
+ static bool skip_scan;
+ static string ctor_func;
static int Main (string [] args)
{
@@ -146,6 +148,16 @@ class MakeBundle {
}
break;
+ case "--skip-scan":
+ skip_scan = true;
+ break;
+ case "--static-ctor":
+ if (i+1 == top) {
+ Help ();
+ return 1;
+ }
+ ctor_func = args [++i];
+ break;
default:
sources.Add (args [i]);
break;
@@ -163,10 +175,10 @@ class MakeBundle {
Environment.Exit (1);
}
- List<Assembly> assemblies = LoadAssemblies (sources);
+ List<string> assemblies = LoadAssemblies (sources);
List<string> files = new List<string> ();
- foreach (Assembly a in assemblies)
- QueueAssembly (files, a.CodeBase);
+ foreach (string file in assemblies)
+ QueueAssembly (files, file);
// Special casing mscorlib.dll: any specified mscorlib.dll cannot be loaded
// by Assembly.ReflectionFromLoadFrom(). Instead the fx assembly which runs
@@ -266,7 +278,6 @@ class MakeBundle {
try {
List<string> c_bundle_names = new List<string> ();
List<string[]> config_names = new List<string[]> ();
- byte [] buffer = new byte [8192];
using (StreamWriter ts = new StreamWriter (File.Create (temp_s))) {
using (StreamWriter tc = new StreamWriter (File.Create (temp_c))) {
@@ -309,10 +320,11 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
long real_size = stream.Length;
int n;
if (compress) {
+ byte[] cbuffer = new byte [8192];
MemoryStream ms = new MemoryStream ();
GZipStream deflate = new GZipStream (ms, CompressionMode.Compress, leaveOpen:true);
- while ((n = stream.Read (buffer, 0, buffer.Length)) != 0){
- deflate.Write (buffer, 0, n);
+ while ((n = stream.Read (cbuffer, 0, cbuffer.Length)) != 0){
+ deflate.Write (cbuffer, 0, n);
}
stream.Close ();
deflate.Close ();
@@ -335,6 +347,7 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
#endif
// The non-parallel part
+ byte [] buffer = new byte [8192];
foreach (var url in files) {
string fname = new Uri (url).LocalPath;
string aname = Path.GetFileName (fname);
@@ -436,6 +449,12 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
tc.WriteLine ("\tNULL\n};\n");
tc.WriteLine ("static char *image_name = \"{0}\";", prog);
+ if (ctor_func != null) {
+ tc.WriteLine ("\nextern void {0} (void);", ctor_func);
+ tc.WriteLine ("\n__attribute__ ((constructor)) static void mono_mkbundle_ctor (void)");
+ tc.WriteLine ("{{\n\t{0} ();\n}}", ctor_func);
+ }
+
tc.WriteLine ("\nstatic void install_dll_config_files (void) {\n");
foreach (string[] ass in config_names){
tc.WriteLine ("\tmono_register_config_for_assembly (\"{0}\", assembly_config_{1});\n", ass [0], ass [1]);
@@ -476,7 +495,7 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
string zlib = (compress ? "-lz" : "");
string debugging = "-g";
- string cc = GetEnv ("CC", IsUnix ? "cc" : "gcc -mno-cygwin");
+ string cc = GetEnv ("CC", IsUnix ? "cc" : "i686-pc-mingw32-gcc");
if (style == "linux")
debugging = "-ggdb";
@@ -517,20 +536,29 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
}
}
- static List<Assembly> LoadAssemblies (List<string> sources)
+ static List<string> LoadAssemblies (List<string> sources)
{
- List<Assembly> assemblies = new List<Assembly> ();
+ List<string> assemblies = new List<string> ();
bool error = false;
foreach (string name in sources){
- Assembly a = LoadAssembly (name);
+ try {
+ Assembly a = LoadAssembly (name);
- if (a == null){
- error = true;
- continue;
- }
+ if (a == null){
+ error = true;
+ continue;
+ }
- assemblies.Add (a);
+ assemblies.Add (a.CodeBase);
+ } catch (Exception e) {
+ if (skip_scan) {
+ Console.WriteLine ("File will not be scanned: {0}", name);
+ assemblies.Add (new Uri (new FileInfo (name).FullName).ToString ());
+ } else {
+ throw;
+ }
+ }
}
if (error)
@@ -543,18 +571,23 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
static void QueueAssembly (List<string> files, string codebase)
{
+ // Console.WriteLine ("CODE BASE IS {0}", codebase);
if (files.Contains (codebase))
return;
files.Add (codebase);
- Assembly a = universe.LoadFile (new Uri(codebase).LocalPath);
-
if (!autodeps)
return;
-
- foreach (AssemblyName an in a.GetReferencedAssemblies ()) {
- a = universe.Load (an.Name);
- QueueAssembly (files, a.CodeBase);
+ try {
+ Assembly a = universe.LoadFile (new Uri(codebase).LocalPath);
+
+ foreach (AssemblyName an in a.GetReferencedAssemblies ()) {
+ a = universe.Load (an.Name);
+ QueueAssembly (files, a.CodeBase);
+ }
+ } catch (Exception e) {
+ if (!skip_scan)
+ throw;
}
}
@@ -593,6 +626,8 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
Error ("Cannot find assembly `" + assembly + "'" );
Console.WriteLine ("Log: \n" + total_log);
} catch (IKVM.Reflection.BadImageFormatException f) {
+ if (skip_scan)
+ throw;
Error ("Cannot load assembly (bad file format) " + f.Message);
} catch (FileLoadException f){
Error ("Cannot load assembly " + f.Message);
@@ -625,6 +660,8 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
" --static Statically link to mono libs\n" +
" --nomain Don't include a main() function, for libraries\n" +
" -z Compress the assemblies before embedding.\n" +
+ " --skip-scan Skip scanning assemblies that could not be loaded (but still embed them).\n" +
+ " --static-ctor ctor Add a constructor call to the supplied function.\n" +
" You need zlib development headers and libraries.\n");
}
diff --git a/mcs/tools/mkbundle/template_z.c b/mcs/tools/mkbundle/template_z.c
index 8a8e6007985..9bd32cf8c66 100644
--- a/mcs/tools/mkbundle/template_z.c
+++ b/mcs/tools/mkbundle/template_z.c
@@ -13,7 +13,8 @@ my_inflate (const Byte *compr, uLong compr_len, Byte *uncompr, uLong uncompr_len
memset (&stream, 0, sizeof (z_stream));
stream.next_in = (Byte *) compr;
stream.avail_in = (uInt) compr_len;
- /* To decompress gzip format: http://stackoverflow.com/a/1838702/83444 */
+
+ // http://www.zlib.net/manual.html
err = inflateInit2 (&stream, 16+MAX_WBITS);
if (err != Z_OK)
return 1;
diff --git a/mcs/tools/security/sn.cs b/mcs/tools/security/sn.cs
index c84505d30ab..4f666007705 100644
--- a/mcs/tools/security/sn.cs
+++ b/mcs/tools/security/sn.cs
@@ -126,7 +126,7 @@ namespace Mono.Tools {
return new StrongName (data).RSA;
}
catch {
- if (data [0] != 0x30)
+ if (data.Length == 0 || data [0] != 0x30)
throw;
// this could be a PFX file
Console.Write ("Enter password for private key (will be visible when typed): ");
diff --git a/mcs/tools/tuner/Mono.Tuner/AdjustVisibility.cs b/mcs/tools/tuner/Mono.Tuner/AdjustVisibility.cs
index 30c5ac4b9db..6b684b60667 100644
--- a/mcs/tools/tuner/Mono.Tuner/AdjustVisibility.cs
+++ b/mcs/tools/tuner/Mono.Tuner/AdjustVisibility.cs
@@ -38,9 +38,6 @@ using Mono.Cecil;
namespace Mono.Tuner {
public class AdjustVisibility : BaseStep {
-
- static readonly object internalized_key = new object ();
-
protected override void ProcessAssembly (AssemblyDefinition assembly)
{
if (Annotations.GetAction (assembly) != AssemblyAction.Link)
diff --git a/mcs/tools/tuner/Mono.Tuner/PreserveSoapHttpClients.cs b/mcs/tools/tuner/Mono.Tuner/PreserveSoapHttpClients.cs
index 185bac96510..bdb04a94db2 100644
--- a/mcs/tools/tuner/Mono.Tuner/PreserveSoapHttpClients.cs
+++ b/mcs/tools/tuner/Mono.Tuner/PreserveSoapHttpClients.cs
@@ -62,7 +62,7 @@ namespace Mono.Tuner {
{
methodName = null;
- int pos = fullName.IndexOf (prefix);
+ int pos = fullName.IndexOf (prefix, StringComparison.Ordinal);
if (pos == -1)
return false;
@@ -74,7 +74,7 @@ namespace Mono.Tuner {
{
methodName = null;
- int pos = fullName.LastIndexOf (suffix);
+ int pos = fullName.LastIndexOf (suffix, StringComparison.Ordinal);
if (pos == -1)
return false;
diff --git a/mcs/tools/xbuild/Makefile b/mcs/tools/xbuild/Makefile
index 7838fcdc3ed..0fcbbfa7848 100644
--- a/mcs/tools/xbuild/Makefile
+++ b/mcs/tools/xbuild/Makefile
@@ -32,7 +32,7 @@ include $(XBUILD_DIR)/xbuild_targets.make
install-local: install-extras
-WEBAPP_DIR = Microsoft/VisualStudio/v9.0/WebApplications
+WEBAPP_DIR = Microsoft/VisualStudio
SILVERLIGHT_DIR = $(mono_libdir)/mono/xbuild/Microsoft/Silverlight
PORTABLE_DIR = $(mono_libdir)/mono/xbuild/Microsoft/Portable
EXTRAS_DIR = $(mono_libdir)/mono/$(INSTALL_FRAMEWORK_VERSION)
@@ -53,8 +53,12 @@ install-extras:
$(INSTALL_DATA) xbuild/MSBuild/Microsoft.Build.CommonTypes.xsd $(DESTDIR)$(EXTRAS_DIR)/MSBuild
$(INSTALL_DATA) xbuild/MSBuild/Microsoft.Build.Core.xsd $(DESTDIR)$(EXTRAS_DIR)/MSBuild
$(MKINSTALLDIRS) $(DESTDIR)$(mono_libdir)/mono/xbuild
- $(MKINSTALLDIRS) $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR)
- $(INSTALL_DATA) xbuild/Microsoft.WebApplication.targets $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR)
+ $(MKINSTALLDIRS) $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR)/v9.0/WebApplications
+ $(INSTALL_DATA) xbuild/Microsoft.WebApplication.targets $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR)/v9.0/WebApplications
+ $(MKINSTALLDIRS) $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR)/v10.0/WebApplications
+ $(INSTALL_DATA) xbuild/Microsoft.WebApplication.targets $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR)/v10.0/WebApplications
+ $(MKINSTALLDIRS) $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR)/v11.0/WebApplications
+ $(INSTALL_DATA) xbuild/Microsoft.WebApplication.targets $(DESTDIR)$(mono_libdir)/mono/xbuild/$(WEBAPP_DIR)/v11.0/WebApplications
$(MKINSTALLDIRS) $(DESTDIR)$(SILVERLIGHT_DIR)/v2.0
$(MKINSTALLDIRS) $(DESTDIR)$(SILVERLIGHT_DIR)/v3.0
$(INSTALL_DATA) xbuild/Microsoft.Silverlight.CSharp.targets $(DESTDIR)$(SILVERLIGHT_DIR)/v2.0
diff --git a/mcs/tools/xbuild/xbuild/2.0/Microsoft.Common.targets b/mcs/tools/xbuild/xbuild/2.0/Microsoft.Common.targets
index 345609f90a9..53c27b05869 100644
--- a/mcs/tools/xbuild/xbuild/2.0/Microsoft.Common.targets
+++ b/mcs/tools/xbuild/xbuild/2.0/Microsoft.Common.targets
@@ -1,5 +1,7 @@
<Project DefaultTargets="Build" InitialTargets="_ValidateEssentialProperties" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildProjectFullPath).user" Condition="Exists('$(MSBuildProjectFullPath).user')"/>
+
<PropertyGroup>
<TargetExt Condition="'$(OutputType)' == 'Winexe'">.exe</TargetExt>
<TargetExt Condition="'$(OutputType)' == 'Exe'">.exe</TargetExt>
@@ -132,7 +134,9 @@
</AllowedReferenceAssemblyFileExtensions>
<AllowedReferenceRelatedFileExtensions Condition=" '$(AllowedReferenceRelatedFileExtensions)' == '' ">
- .mdb
+ .exe.mdb;
+ .dll.mdb;
+ .xml
</AllowedReferenceRelatedFileExtensions>
<AssemblySearchPaths Condition="'$(AssemblySearchPaths)' == ''">
diff --git a/mcs/tools/xbuild/xbuild/3.5/Microsoft.Common.targets b/mcs/tools/xbuild/xbuild/3.5/Microsoft.Common.targets
index 6a2c6efe85d..bf686b06af2 100644
--- a/mcs/tools/xbuild/xbuild/3.5/Microsoft.Common.targets
+++ b/mcs/tools/xbuild/xbuild/3.5/Microsoft.Common.targets
@@ -1,5 +1,7 @@
<Project DefaultTargets="Build" InitialTargets="_ValidateEssentialProperties" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildProjectFullPath).user" Condition="Exists('$(MSBuildProjectFullPath).user')"/>
+
<PropertyGroup>
<TargetExt Condition="'$(OutputType)' == 'Winexe'">.exe</TargetExt>
<TargetExt Condition="'$(OutputType)' == 'Exe'">.exe</TargetExt>
@@ -139,7 +141,9 @@
</AllowedReferenceAssemblyFileExtensions>
<AllowedReferenceRelatedFileExtensions Condition=" '$(AllowedReferenceRelatedFileExtensions)' == '' ">
- .mdb
+ .exe.mdb;
+ .dll.mdb;
+ .xml
</AllowedReferenceRelatedFileExtensions>
<AssemblySearchPaths Condition="'$(AssemblySearchPaths)' == ''">
diff --git a/mcs/tools/xbuild/xbuild/4.0/Microsoft.Common.targets b/mcs/tools/xbuild/xbuild/4.0/Microsoft.Common.targets
index 86d8fb0b4f5..7bd9900af72 100644
--- a/mcs/tools/xbuild/xbuild/4.0/Microsoft.Common.targets
+++ b/mcs/tools/xbuild/xbuild/4.0/Microsoft.Common.targets
@@ -7,6 +7,8 @@
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportBefore\*"
Condition="'$(ImportByWildcardBeforeMicrosoftCommonTargets)' == 'true' and Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\$(MSBuildThisFile)\ImportBefore')"/>
+ <Import Project="$(MSBuildProjectFullPath).user" Condition="Exists('$(MSBuildProjectFullPath).user')"/>
+
<PropertyGroup>
<TargetExt Condition="'$(OutputType)' == 'Winexe'">.exe</TargetExt>
<TargetExt Condition="'$(OutputType)' == 'Exe'">.exe</TargetExt>
@@ -196,7 +198,9 @@
</AllowedReferenceAssemblyFileExtensions>
<AllowedReferenceRelatedFileExtensions Condition=" '$(AllowedReferenceRelatedFileExtensions)' == '' ">
- .mdb
+ .exe.mdb;
+ .dll.mdb;
+ .xml
</AllowedReferenceRelatedFileExtensions>
<AssemblySearchPaths Condition="'$(AssemblySearchPaths)' == ''">
@@ -248,6 +252,10 @@
ContinueOnError="true"
Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''"
/>
+
+ <ItemGroup Condition="'@(Compile)' != '' and '$(TargetFrameworkMonikerAssemblyAttributeText)' != ''">
+ <Compile Include="$(TargetFrameworkMonikerAssemblyAttributesPath)"/>
+ </ItemGroup>
</Target>
<Target Name="ResolveReferences" DependsOnTargets="$(ResolveReferencesDependsOn)"/>
diff --git a/mono-core.spec.in b/mono-core.spec.in
index d14e2cbbfd9..217bcaa0226 100644
--- a/mono-core.spec.in
+++ b/mono-core.spec.in
@@ -174,6 +174,7 @@ rm -rf %buildroot
%if %sgen == yes
%_bindir/mono-sgen
%endif
+%_bindir/mono-boehm
%_bindir/mono-test-install
%_bindir/mozroots
%_bindir/peverify
@@ -309,7 +310,6 @@ rm -rf %buildroot
%_prefix/lib/mono/4.5/System.Windows.dll
%_prefix/lib/mono/4.5/System.Xml.Serialization.dll
%_prefix/lib/mono/4.5/Facades/*.dll
-%_prefix/lib/mono/4.5/Facades/*.dll.mdb
%_prefix/lib/mono/compat-2.0/ICSharpCode.SharpZipLib.dll
%_prefix/lib/mono/gac/Commons.Xml.Relaxng
%_prefix/lib/mono/gac/CustomMarshalers
@@ -399,12 +399,12 @@ Development files for libmono.
%_libdir/pkgconfig/mono-2.pc
%if %sgen == yes
-%package -n libmonosgen-2_0-0
+%package -n libmonosgen-2_0-1
License: LGPL v2.1 only
Summary: A Library for embedding Mono in your Application (sgen version)
Group: Development/Libraries/C and C++
-%description -n libmonosgen-2_0-0
+%description -n libmonosgen-2_0-1
The Mono Project is an open development initiative that is working to
develop an open source, Unix version of the .NET development platform.
Its objective is to enable Unix developers to build and deploy
@@ -413,13 +413,13 @@ technologies that have been submitted to the ECMA for standardization.
A Library for embedding Mono in your Application (sgen version).
-%files -n libmonosgen-2_0-0
+%files -n libmonosgen-2_0-1
%defattr(-, root, root)
-%_libdir/libmonosgen-2.0.so.0*
+%_libdir/libmonosgen-2.0.so.1*
-%post -n libmonosgen-2_0-0 -p /sbin/ldconfig
+%post -n libmonosgen-2_0-1 -p /sbin/ldconfig
-%postun -n libmonosgen-2_0-0 -p /sbin/ldconfig
+%postun -n libmonosgen-2_0-1 -p /sbin/ldconfig
%package -n libmonosgen-2_0-devel
License: LGPL v2.1 only
@@ -445,6 +445,49 @@ Development files for libmonosgen.
%_libdir/pkgconfig/monosgen-2.pc
%endif
+%package -n libmonoboehm-2_0-1
+License: LGPL v2.1 only
+Summary: A Library for embedding Mono in your Application (boehm version)
+Group: Development/Libraries/C and C++
+
+%description -n libmonoboehm-2_0-1
+The Mono Project is an open development initiative that is working to
+develop an open source, Unix version of the .NET development platform.
+Its objective is to enable Unix developers to build and deploy
+cross-platform .NET applications. The project will implement various
+technologies that have been submitted to the ECMA for standardization.
+
+A Library for embedding Mono in your Application (boehm version).
+
+%files -n libmonoboehm-2_0-1
+%defattr(-, root, root)
+%_libdir/libmonoboehm-2.0.so.1*
+
+%post -n libmonoboehm-2_0-1 -p /sbin/ldconfig
+
+%postun -n libmonoboehm-2_0-1 -p /sbin/ldconfig
+
+%package -n libmonoboehm-2_0-devel
+License: LGPL v2.1 only
+Summary: Development files for libmonosgen
+Group: Development/Languages/Mono
+Requires: mono-core == %version-%release
+Requires: libmono-2_0-devel
+
+%description -n libmonoboehm-2_0-devel
+The Mono Project is an open development initiative that is working to
+develop an open source, Unix version of the .NET development platform.
+Its objective is to enable Unix developers to build and deploy
+cross-platform .NET applications. The project will implement various
+technologies that have been submitted to the ECMA for standardization.
+
+Development files for libmonoboehm.
+
+%files -n libmonoboehm-2_0-devel
+%defattr(-, root, root)
+%_libdir/libmonoboehm-2.0.a
+%_libdir/libmonoboehm-2.0.so
+
%if %llvm == yes
%package -n libmono-llvm0
License: LGPL v2.1 only
@@ -522,6 +565,7 @@ Provides: mono(Mono.Data.Tds) = 1.0.5000.0
Provides: mono(Novell.Directory.Ldap) = 1.0.5000.0
Provides: mono(System.Data) = 1.0.5000.0
Provides: mono(System.DirectoryServices) = 1.0.5000.0
+Provides: mono(System.DirectoryServices.Protocols) = 1.0.5000.0
Provides: mono(System.EnterpriseServices) = 1.0.5000.0
%description -n mono-data
@@ -544,6 +588,7 @@ Database connectivity for Mono.
%_prefix/lib/mono/2.0/System.Data.Linq.dll
%_prefix/lib/mono/2.0/System.Data.dll
%_prefix/lib/mono/2.0/System.DirectoryServices.dll
+%_prefix/lib/mono/2.0/System.DirectoryServices.Protocols.dll
%_prefix/lib/mono/2.0/System.EnterpriseServices.dll
%_prefix/lib/mono/2.0/System.Runtime.Serialization.dll
%_prefix/lib/mono/2.0/System.Transactions.dll
@@ -553,6 +598,7 @@ Database connectivity for Mono.
%_prefix/lib/mono/4.0/System.Data.Linq.dll
%_prefix/lib/mono/4.0/System.Data.dll
%_prefix/lib/mono/4.0/System.DirectoryServices.dll
+%_prefix/lib/mono/4.0/System.DirectoryServices.Protocols.dll
%_prefix/lib/mono/4.0/System.EnterpriseServices.dll
%_prefix/lib/mono/4.0/System.Runtime.Serialization.dll
%_prefix/lib/mono/4.0/System.Transactions.dll
@@ -563,6 +609,7 @@ Database connectivity for Mono.
%_prefix/lib/mono/4.5/System.Data.Linq.dll
%_prefix/lib/mono/4.5/System.Data.dll
%_prefix/lib/mono/4.5/System.DirectoryServices.dll
+%_prefix/lib/mono/4.5/System.DirectoryServices.Protocols.dll
%_prefix/lib/mono/4.5/System.EnterpriseServices.dll
%_prefix/lib/mono/4.5/System.Runtime.Serialization.dll
%_prefix/lib/mono/4.5/System.Transactions.dll
@@ -577,6 +624,7 @@ Database connectivity for Mono.
%_prefix/lib/mono/gac/System.Data.DataSetExtensions
%_prefix/lib/mono/gac/System.Data.Linq
%_prefix/lib/mono/gac/System.DirectoryServices
+%_prefix/lib/mono/gac/System.DirectoryServices.Protocols
%_prefix/lib/mono/gac/System.EnterpriseServices
%_prefix/lib/mono/gac/System.Runtime.Serialization
%_prefix/lib/mono/gac/System.Transactions
@@ -778,6 +826,7 @@ Mono implementation of WCF, Windows Communication Foundation
%_prefix/lib/mono/4.0/System.IdentityModel.Selectors.dll
%_prefix/lib/mono/4.0/System.IdentityModel.dll
%_prefix/lib/mono/4.0/System.Runtime.DurableInstancing.dll
+%_prefix/lib/mono/4.0/System.ServiceModel.Activation.dll
%_prefix/lib/mono/4.0/System.ServiceModel.Discovery.dll
%_prefix/lib/mono/4.0/System.ServiceModel.Routing.dll
%_prefix/lib/mono/4.0/System.ServiceModel.Web.dll
@@ -786,6 +835,7 @@ Mono implementation of WCF, Windows Communication Foundation
%_prefix/lib/mono/4.5/System.IdentityModel.Selectors.dll
%_prefix/lib/mono/4.5/System.IdentityModel.dll
%_prefix/lib/mono/4.5/System.Runtime.DurableInstancing.dll
+%_prefix/lib/mono/4.5/System.ServiceModel.Activation.dll
%_prefix/lib/mono/4.5/System.ServiceModel.Discovery.dll
%_prefix/lib/mono/4.5/System.ServiceModel.Routing.dll
%_prefix/lib/mono/4.5/System.ServiceModel.Web.dll
@@ -796,6 +846,7 @@ Mono implementation of WCF, Windows Communication Foundation
%_prefix/lib/mono/gac/System.IdentityModel.Selectors
%_prefix/lib/mono/gac/System.Runtime.DurableInstancing
%_prefix/lib/mono/gac/System.ServiceModel
+%_prefix/lib/mono/gac/System.ServiceModel.Activation
%_prefix/lib/mono/gac/System.ServiceModel.Discovery
%_prefix/lib/mono/gac/System.ServiceModel.Routing
%_prefix/lib/mono/gac/System.ServiceModel.Web
@@ -857,8 +908,10 @@ Mono implementation of ASP.NET, Remoting and Web Services.
%config %_sysconfdir/mono/2.0/Browsers
%config %_sysconfdir/mono/2.0/DefaultWsdlHelpGenerator.aspx
%config %_sysconfdir/mono/2.0/web.config
+%config %_sysconfdir/mono/4.0/Browsers
%config %_sysconfdir/mono/4.0/DefaultWsdlHelpGenerator.aspx
%config %_sysconfdir/mono/4.0/web.config
+%config %_sysconfdir/mono/4.5/Browsers
%config %_sysconfdir/mono/4.5/DefaultWsdlHelpGenerator.aspx
%config %_sysconfdir/mono/4.5/web.config
%config %_sysconfdir/mono/browscap.ini
@@ -1358,8 +1411,6 @@ Mono development tools.
%_prefix/lib/mono/gac/Mono.Debugger.Soft
%_prefix/lib/mono/gac/PEAPI
%_prefix/lib/mono/xbuild
-%_prefix/lib/mono/xbuild/Microsoft/Portable/v4.0/Microsoft.Portable.CSharp.targets
-%_prefix/lib/mono/xbuild/Microsoft/Portable/v4.5/Microsoft.Portable.CSharp.targets
%_prefix/lib/mono/xbuild-frameworks
%package -n monodoc-core
@@ -1420,7 +1471,7 @@ Requires: libmono-2_0-devel = %version-%release
Requires: libmono-llvm0 = %version-%release
%endif
%if %sgen == yes
-Requires: libmonosgen-2_0-0 = %version-%release
+Requires: libmonosgen-2_0-1 = %version-%release
Requires: libmonosgen-2_0-devel = %version-%release
%endif
Requires: mono-data = %version-%release
diff --git a/mono/Makefile.am b/mono/Makefile.am
index 0345c9ddd82..d74089a9c17 100644
--- a/mono/Makefile.am
+++ b/mono/Makefile.am
@@ -26,34 +26,7 @@ monotouch-do-clean:
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
done;
else
-if MOONLIGHT
-SUBDIRS = arch utils io-layer metadata mini
-
-moon-do-build:
- @list='$(SUBDIRS)'; for subdir in $$list; do \
- case "x$$subdir" in \
- xmetadata ) target="moon-do-build" ;; \
- xmini ) target="moon-do-build" ;; \
- * ) target="all" ;; \
- esac; \
- echo "Making $$target in $$subdir"; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
- done;
-
-moon-do-clean:
- @list='$(SUBDIRS)'; for subdir in $$list; do \
- case "x$$subdir" in \
- xmetadata ) target="moon-do-clean" ;; \
- xmini ) target="moon-do-clean" ;; \
- * ) target="clean" ;; \
- esac; \
- echo "Making $$target in $$subdir"; \
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
- done;
-
-else
SUBDIRS = arch utils io-layer cil metadata $(interpreter_dir) mini dis monograph tests benchmark profiler
endif
endif
-endif
DIST_SUBDIRS = arch utils io-layer cil metadata interpreter mini dis monograph tests benchmark profiler
diff --git a/mono/cil/opcode.def b/mono/cil/opcode.def
index 5dd8204a960..e9d998f1dd8 100644
--- a/mono/cil/opcode.def
+++ b/mono/cil/opcode.def
@@ -305,6 +305,7 @@ OPDEF(CEE_MONO_SAVE_LMF, "mono_save_lmf", Pop0, Push0, InlineNone, X, 2, 0xF0, 0
OPDEF(CEE_MONO_RESTORE_LMF, "mono_restore_lmf", Pop0, Push0, InlineNone, X, 2, 0xF0, 0x0A, NEXT)
OPDEF(CEE_MONO_CLASSCONST, "mono_classconst", Pop0, PushI, InlineI, X, 2, 0xF0, 0x0B, NEXT)
OPDEF(CEE_MONO_NOT_TAKEN, "mono_not_taken", Pop0, Push0, InlineNone, X, 2, 0xF0, 0x0C, NEXT)
+/* The argument should be one of the TLS_KEY values defined in mono-tls.h */
OPDEF(CEE_MONO_TLS, "mono_tls", Pop0, PushI, InlineI, X, 2, 0xF0, 0x0D, NEXT)
OPDEF(CEE_MONO_ICALL_ADDR, "mono_icall_addr", Pop0, PushI, InlineI, X, 2, 0xF0, 0x0E, NEXT)
OPDEF(CEE_MONO_DYN_CALL, "mono_dyn_call", Pop0, PushI, InlineI, X, 2, 0xF0, 0x0F, NEXT)
diff --git a/mono/dis/declsec.c b/mono/dis/declsec.c
index 93300c2b991..3d6cd252366 100644..100755
--- a/mono/dis/declsec.c
+++ b/mono/dis/declsec.c
@@ -17,6 +17,7 @@
#include "mono/utils/mono-compiler.h"
#include "declsec.h"
+#include "util.h"
static char*
declsec_20_get_classname (const char* p, const char **rptr)
@@ -113,12 +114,12 @@ declsec_20_write_value (GString *str, char type, const char *value)
float val;
int inf;
readr4 (value, &val);
- inf = isinf (val);
+ inf = dis_isinf (val);
if (inf == -1)
g_string_append_printf (str, "0xFF800000"); /* negative infinity */
else if (inf == 1)
g_string_append_printf (str, "0x7F800000"); /* positive infinity */
- else if (isnan (val))
+ else if (dis_isnan (val))
g_string_append_printf (str, "0xFFC00000"); /* NaN */
else
g_string_append_printf (str, "%.8g", val);
@@ -128,7 +129,7 @@ declsec_20_write_value (GString *str, char type, const char *value)
double val;
int inf;
readr8 (value, &val);
- inf = isinf (val);
+ inf = dis_isinf (val);
if (inf == -1)
g_string_append_printf (str, "0xFFF00000000000000"); /* negative infinity */
else if (inf == 1)
diff --git a/mono/dis/dis-cil.c b/mono/dis/dis-cil.c
index 52af86c5b5d..79f68fb8b24 100644..100755
--- a/mono/dis/dis-cil.c
+++ b/mono/dis/dis-cil.c
@@ -17,35 +17,11 @@
#include "get.h"
#include "dump.h"
#include "dis-cil.h"
+#include "util.h"
#include "mono/metadata/opcodes.h"
#include "mono/metadata/class-internals.h"
#include "mono/utils/mono-compiler.h"
-#ifndef HAVE_ISINF
-
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-int isinf (double);
-int
-isinf (double num)
-{
- fpclass_t klass;
-
- klass = fpclass (num);
- if (klass == FP_NINF)
- return -1;
-
- if (klass == FP_PINF)
- return 1;
-
- return 0;
-}
-#else
-#error "Don't know how to implement isinf for this platform."
-#endif
-
-#endif
-
#define CODE_INDENT g_assert (indent_level < 512); \
indent[indent_level*2] = ' '; \
indent[indent_level*2+1] = ' '; \
@@ -191,12 +167,12 @@ disassemble_cil (MonoImage *m, MonoMethodHeader *mh, MonoGenericContainer *conta
double r;
int inf;
readr8 (ptr, &r);
- inf = isinf (r);
+ inf = dis_isinf (r);
if (inf == -1)
fprintf (output, "(00 00 00 00 00 00 f0 ff)"); /* negative infinity */
else if (inf == 1)
fprintf (output, "(00 00 00 00 00 00 f0 7f)"); /* positive infinity */
- else if (isnan (r))
+ else if (dis_isnan (r))
fprintf (output, "(00 00 00 00 00 00 f8 ff)"); /* NaN */
else {
char *str = stringify_double (r);
@@ -300,12 +276,12 @@ disassemble_cil (MonoImage *m, MonoMethodHeader *mh, MonoGenericContainer *conta
readr4 (ptr, &f);
- inf = isinf (f);
+ inf = dis_isinf (f);
if (inf == -1)
fprintf (output, "(00 00 80 ff)"); /* negative infinity */
else if (inf == 1)
fprintf (output, "(00 00 80 7f)"); /* positive infinity */
- else if (isnan (f))
+ else if (dis_isnan (f))
fprintf (output, "(00 00 c0 ff)"); /* NaN */
else {
char *str = stringify_double ((double) f);
diff --git a/mono/dis/dump.c b/mono/dis/dump.c
index 72e528d2e31..2b3a4851de0 100644..100755
--- a/mono/dis/dump.c
+++ b/mono/dis/dump.c
@@ -21,14 +21,6 @@
#include "mono/metadata/class-internals.h"
#include "mono/utils/mono-compiler.h"
-#ifndef HAVE_ISINF
-
-#ifdef HAVE_IEEEFP_H
-extern int isinf (double);
-#endif
-
-#endif
-
#if defined(__native_client__) && defined(__GLIBC__)
volatile int __nacl_thread_suspension_needed = 0;
void __nacl_suspend_thread_if_needed() {}
@@ -870,12 +862,12 @@ handle_enum:
float val;
int inf;
readr4 (p, &val);
- inf = isinf (val);
+ inf = dis_isinf (val);
if (inf == -1)
g_string_append_printf (res, "(00 00 80 ff)"); /* negative infinity */
else if (inf == 1)
g_string_append_printf (res, "(00 00 80 7f)"); /* positive infinity */
- else if (isnan (val))
+ else if (dis_isnan (val))
g_string_append_printf (res, "(00 00 c0 ff)"); /* NaN */
else
g_string_append_printf (res, "%g", val);
@@ -887,7 +879,7 @@ handle_enum:
int inf;
readr8 (p, &val);
- inf = isinf (val);
+ inf = dis_isinf (val);
if (inf == -1)
g_string_append_printf (res, "(00 00 00 00 00 00 f0 ff)"); /* negative infinity */
else if (inf == 1)
diff --git a/mono/dis/get.c b/mono/dis/get.c
index 9c9ffaacd16..34f87b0c8ad 100644..100755
--- a/mono/dis/get.c
+++ b/mono/dis/get.c
@@ -2310,7 +2310,7 @@ get_constant (MonoImage *m, MonoTypeEnum t, guint32 blob_index)
#ifdef HAVE_ISFINITE
normal = isfinite (r);
#else
- normal = isnormal (r);
+ normal = !dis_isinf (r) && !dis_isnan (r);
#endif
if (!normal) {
return g_strdup_printf ("float32(0x%08x)", read32 (ptr));
diff --git a/mono/dis/main.c b/mono/dis/main.c
index d4719cac40c..42d735b0f75 100644
--- a/mono/dis/main.c
+++ b/mono/dis/main.c
@@ -30,6 +30,7 @@
#include <mono/metadata/loader.h>
#include <mono/metadata/assembly.h>
#include <mono/metadata/appdomain.h>
+#include <mono/utils/bsearch.h>
static void setup_filter (MonoImage *image);
static gboolean should_include_type (int idx);
@@ -1109,7 +1110,7 @@ dis_interfaces (MonoImage *m, guint32 typedef_row, MonoGenericContainer *contain
loc.col_idx = MONO_INTERFACEIMPL_CLASS;
loc.idx = typedef_row;
- if (!bsearch (&loc, table->base, table->rows, table->row_size, table_locator))
+ if (!mono_binary_search (&loc, table->base, table->rows, table->row_size, table_locator))
return;
start = loc.result;
@@ -1680,7 +1681,7 @@ table_includes (TableFilter *tf, int idx)
{
if (!tf->count)
return FALSE;
- return bsearch (&idx, tf->elems, tf->count, sizeof (int), int_cmp) != NULL;
+ return mono_binary_search (&idx, tf->elems, tf->count, sizeof (int), int_cmp) != NULL;
}
static gboolean
diff --git a/mono/dis/util.c b/mono/dis/util.c
index 737f6fda774..116824da9ec 100644..100755
--- a/mono/dis/util.c
+++ b/mono/dis/util.c
@@ -10,8 +10,13 @@
#include <glib.h>
#include <string.h>
#include <stdio.h>
+#include <math.h>
#include "util.h"
+#ifdef HAVE_IEEEFP_H
+#include <ieeefp.h>
+#endif
+
/**
* map:
* @code: code to lookup in table
@@ -122,3 +127,36 @@ data_dump (const char *data, int len, const char* prefix) {
return g_string_free (str, FALSE);
}
+int
+dis_isinf (double num)
+{
+#ifdef HAVE_ISINF
+ return isinf (num);
+#elif defined(HAVE_IEEEFP_H)
+ fpclass_t klass;
+
+ klass = fpclass (num);
+ if (klass == FP_NINF)
+ return -1;
+
+ if (klass == FP_PINF)
+ return 1;
+
+ return 0;
+#elif defined(HAVE__FINITE)
+ return _finite (num) ? 0 : 1;
+#else
+#error "Don't know how to implement isinf for this platform."
+#endif
+}
+
+int
+dis_isnan (double num)
+{
+#ifdef __MINGW32_VERSION
+return _isnan (num);
+#else
+return isnan (num);
+#endif
+}
+
diff --git a/mono/dis/util.h b/mono/dis/util.h
index cbb9a4f365d..d8ff7bfb12f 100644..100755
--- a/mono/dis/util.h
+++ b/mono/dis/util.h
@@ -8,3 +8,5 @@ const char *flags (guint32 code, dis_map_t *table);
void hex_dump (const char *buffer, int base, int count);
char* data_dump (const char *data, int len, const char* prefix);
+extern int dis_isinf (double num);
+extern int dis_isnan (double num);
diff --git a/mono/io-layer/io-layer.h b/mono/io-layer/io-layer.h
index 014c9a97382..394799bc86c 100644..100755
--- a/mono/io-layer/io-layer.h
+++ b/mono/io-layer/io-layer.h
@@ -24,7 +24,13 @@
#include <winsock2.h>
#include <windows.h>
#include <winbase.h>
+/*
+ * The mingw version says:
+ * /usr/i686-pc-mingw32/sys-root/mingw/include/ws2tcpip.h:38:2: error: #error "ws2tcpip.h is not compatible with winsock.h. Include winsock2.h instead."
+ */
+#ifdef _MSC_VER
#include <ws2tcpip.h>
+#endif
#include <psapi.h>
#include <shlobj.h>
#include <mswsock.h>
diff --git a/mono/io-layer/messages.c b/mono/io-layer/messages.c
index 26a5d4292bd..1b052dbaca7 100644
--- a/mono/io-layer/messages.c
+++ b/mono/io-layer/messages.c
@@ -17,12 +17,13 @@
#include <mono/io-layer/wapi-private.h>
#include <mono/io-layer/misc-private.h>
#include <mono/io-layer/messages.h>
+#include <mono/utils/bsearch.h>
#undef DEBUG
typedef struct {
int id;
- const char const *txt;
+ const char *txt;
} ErrorDesc;
static ErrorDesc common_messages [] = {
@@ -1830,7 +1831,7 @@ find_msg (guint32 id, ErrorDesc *base, int n)
ErrorDesc d, *result;
d.id = id;
- result = bsearch (&d, base, n, sizeof (ErrorDesc), msg_compare);
+ result = mono_binary_search (&d, base, n, sizeof (ErrorDesc), msg_compare);
if (result == NULL)
return NULL;
return result->txt;
diff --git a/mono/io-layer/processes.c b/mono/io-layer/processes.c
index d29ea3c185c..c316fef320a 100644
--- a/mono/io-layer/processes.c
+++ b/mono/io-layer/processes.c
@@ -76,6 +76,7 @@
#include <mono/utils/mono-time.h>
#include <mono/utils/mono-membar.h>
#include <mono/utils/mono-mutex.h>
+#include <mono/utils/mono-signal-handler.h>
/* The process' environment strings */
#if defined(__APPLE__) && !defined (__arm__)
@@ -2828,8 +2829,7 @@ process_close (gpointer handle, gpointer data)
}
#if HAVE_SIGACTION
-static void
-mono_sigchld_signal_handler (int _dummy, siginfo_t *info, void *context)
+MONO_SIGNAL_HANDLER_FUNC (static, mono_sigchld_signal_handler, (int _dummy, siginfo_t *info, void *context))
{
int status;
int pid;
@@ -2870,6 +2870,7 @@ mono_sigchld_signal_handler (int _dummy, siginfo_t *info, void *context)
fprintf (stdout, "SIG CHILD handler: done looping.");
#endif
}
+
#endif
static void process_add_sigchld_handler (void)
diff --git a/mono/io-layer/shared.c b/mono/io-layer/shared.c
index 26e6bd81d19..1800f9b74a7 100644
--- a/mono/io-layer/shared.c
+++ b/mono/io-layer/shared.c
@@ -254,7 +254,8 @@ static gchar *
_wapi_shm_file (_wapi_shm_t type)
{
static gchar file[_POSIX_PATH_MAX];
- gchar *name = NULL, *filename, *wapi_dir;
+ gchar *name = NULL, *filename;
+ const gchar *wapi_dir;
name = _wapi_shm_base_name (type);
@@ -262,7 +263,7 @@ _wapi_shm_file (_wapi_shm_t type)
* nfs mounts breaks, then there should be an option to set
* the directory.
*/
- wapi_dir = getenv ("MONO_SHARED_DIR");
+ wapi_dir = g_getenv ("MONO_SHARED_DIR");
if (wapi_dir == NULL) {
filename = g_build_filename (g_get_home_dir (), ".wapi", name,
NULL);
diff --git a/mono/metadata/Makefile.am.in b/mono/metadata/Makefile.am.in
index fdf0a99143a..c4d7c9c562a 100644
--- a/mono/metadata/Makefile.am.in
+++ b/mono/metadata/Makefile.am.in
@@ -60,18 +60,10 @@ endif
boehm_libraries = $(shared_boehm_libraries) libmonoruntime-static.la
endif
-if MOONLIGHT
-moonlight_libraries = libmonoruntimemoon.la
-moon-do-build: libmonoruntime-static.la libmonoruntimemoon.la
-moon-do-clean:
- -test -z "libmonoruntime-static.la" || rm -f libmonoruntime-static.la
- -test -z "libmonoruntimemoon.la" || rm -f libmonoruntimemoon.la
-endif
-
if DISABLE_EXECUTABLES
noinst_LTLIBRARIES = $(shared_sgen_libraries) $(shared_boehm_libraries)
else
-noinst_LTLIBRARIES = $(boehm_libraries) $(sgen_libraries) $(moonlight_libraries)
+noinst_LTLIBRARIES = $(boehm_libraries) $(sgen_libraries)
endif
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLAGS) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\"
@@ -266,15 +258,6 @@ sgen_sources = \
libmonoruntime_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(boehm_sources)
libmonoruntime_la_CFLAGS = $(BOEHM_DEFINES)
-if MOONLIGHT
-libmonoruntimemoon_la_SOURCES = $(libmonoruntime_la_SOURCES)
-if MOONLIGHT_BOEHM
-libmonoruntimemoon_la_CFLAGS = $(MOONLIGHT_DEFINES) $(BOEHM_DEFINES)
-else
-libmonoruntimemoon_la_CFLAGS = $(MOONLIGHT_DEFINES) $(SGEN_DEFINES)
-endif
-endif
-
libmonoruntimesgen_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(sgen_sources)
libmonoruntimesgen_la_CFLAGS = $(SGEN_DEFINES)
@@ -343,3 +326,8 @@ endif
EXTRA_DIST = make-bundle.pl sample-bundle $(win32_sources) $(unix_sources) $(null_sources) runtime.h \
tpool-poll.c tpool-epoll.c tpool-kqueue.c Makefile.am.in
+if HAS_EXTENSION_MODULE
+else
+Makefile.am: Makefile.am.in
+ cp $< $@
+endif
diff --git a/mono/metadata/appdomain.c b/mono/metadata/appdomain.c
index 69571dff8b5..20ccd0c4898 100644
--- a/mono/metadata/appdomain.c
+++ b/mono/metadata/appdomain.c
@@ -1459,19 +1459,29 @@ static gboolean
private_file_needs_copying (const char *src, struct stat *sbuf_src, char *dest)
{
struct stat sbuf_dest;
+ gchar *stat_src;
gchar *real_src = mono_portability_find_file (src, TRUE);
if (!real_src)
- real_src = (gchar*)src;
-
- if (stat (real_src, sbuf_src) == -1) {
+ stat_src = (gchar*)src;
+ else
+ stat_src = real_src;
+
+ if (stat (stat_src, sbuf_src) == -1) {
time_t tnow = time (NULL);
+
+ if (real_src)
+ g_free (real_src);
+
memset (sbuf_src, 0, sizeof (*sbuf_src));
sbuf_src->st_mtime = tnow;
sbuf_src->st_atime = tnow;
return TRUE;
}
+ if (real_src)
+ g_free (real_src);
+
if (stat (dest, &sbuf_dest) == -1)
return TRUE;
@@ -2181,7 +2191,7 @@ unload_data_unref (unload_data *data)
{
gint32 count;
do {
- count = mono_atomic_load_acquire (&data->refcount);
+ mono_atomic_load_acquire (count, gint32, &data->refcount);
g_assert (count >= 1 && count <= 2);
if (count == 1) {
g_free (data);
diff --git a/mono/metadata/appdomain.h b/mono/metadata/appdomain.h
index 282d3e52d3b..3b3884330f9 100644
--- a/mono/metadata/appdomain.h
+++ b/mono/metadata/appdomain.h
@@ -26,190 +26,190 @@ typedef struct _MonoJitInfo MonoJitInfo;
typedef void (*MonoDomainFunc) (MonoDomain *domain, void* user_data);
-MonoDomain*
+MONO_API MonoDomain*
mono_init (const char *filename);
-MonoDomain *
+MONO_API MonoDomain *
mono_init_from_assembly (const char *domain_name, const char *filename);
-MonoDomain *
+MONO_API MonoDomain *
mono_init_version (const char *domain_name, const char *version);
-MonoDomain*
+MONO_API MonoDomain*
mono_get_root_domain (void);
-void
+MONO_API void
mono_runtime_init (MonoDomain *domain, MonoThreadStartCB start_cb,
MonoThreadAttachCB attach_cb);
-void
+MONO_API void
mono_runtime_cleanup (MonoDomain *domain);
-void
+MONO_API void
mono_install_runtime_cleanup (MonoDomainFunc func);
-void
+MONO_API void
mono_runtime_quit (void);
-void
+MONO_API void
mono_runtime_set_shutting_down (void);
-mono_bool
+MONO_API mono_bool
mono_runtime_is_shutting_down (void);
-const char*
+MONO_API const char*
mono_check_corlib_version (void);
-MonoDomain *
+MONO_API MonoDomain *
mono_domain_create (void);
-MonoDomain *
+MONO_API MonoDomain *
mono_domain_create_appdomain (char *friendly_name, char *configuration_file);
-MonoDomain *
+MONO_API MonoDomain *
mono_domain_get (void);
-MonoDomain *
+MONO_API MonoDomain *
mono_domain_get_by_id (int32_t domainid);
-int32_t
+MONO_API int32_t
mono_domain_get_id (MonoDomain *domain);
-mono_bool
+MONO_API mono_bool
mono_domain_set (MonoDomain *domain, mono_bool force);
-void
+MONO_API void
mono_domain_set_internal (MonoDomain *domain);
-void
+MONO_API void
mono_domain_unload (MonoDomain *domain);
-void
+MONO_API void
mono_domain_try_unload (MonoDomain *domain, MonoObject **exc);
-mono_bool
+MONO_API mono_bool
mono_domain_is_unloading (MonoDomain *domain);
-MonoDomain *
+MONO_API MonoDomain *
mono_domain_from_appdomain (MonoAppDomain *appdomain);
-void
+MONO_API void
mono_domain_foreach (MonoDomainFunc func, void* user_data);
-MonoAssembly *
+MONO_API MonoAssembly *
mono_domain_assembly_open (MonoDomain *domain, const char *name);
-mono_bool
+MONO_API mono_bool
mono_domain_finalize (MonoDomain *domain, uint32_t timeout);
-void
+MONO_API void
mono_domain_free (MonoDomain *domain, mono_bool force);
-mono_bool
+MONO_API mono_bool
mono_domain_has_type_resolve (MonoDomain *domain);
-MonoReflectionAssembly *
+MONO_API MonoReflectionAssembly *
mono_domain_try_type_resolve (MonoDomain *domain, char *name, MonoObject *tb);
-mono_bool
+MONO_API mono_bool
mono_domain_owns_vtable_slot (MonoDomain *domain, void* vtable_slot);
-void
+MONO_API void
mono_context_init (MonoDomain *domain);
-void
+MONO_API void
mono_context_set (MonoAppContext *new_context);
-MonoAppContext *
+MONO_API MonoAppContext *
mono_context_get (void);
-MonoJitInfo *
+MONO_API MonoJitInfo *
mono_jit_info_table_find (MonoDomain *domain, char *addr);
/* MonoJitInfo accessors */
-void*
+MONO_API void*
mono_jit_info_get_code_start (MonoJitInfo* ji);
-int
+MONO_API int
mono_jit_info_get_code_size (MonoJitInfo* ji);
-MonoMethod*
+MONO_API MonoMethod*
mono_jit_info_get_method (MonoJitInfo* ji);
-MonoImage*
+MONO_API MonoImage*
mono_get_corlib (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_object_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_byte_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_void_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_boolean_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_sbyte_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_int16_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_uint16_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_int32_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_uint32_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_intptr_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_uintptr_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_int64_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_uint64_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_single_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_double_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_char_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_string_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_enum_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_array_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_thread_class (void);
-MonoClass*
+MONO_API MonoClass*
mono_get_exception_class (void);
-void
+MONO_API void
mono_security_enable_core_clr (void);
typedef mono_bool (*MonoCoreClrPlatformCB) (const char *image_name);
-void
+MONO_API void
mono_security_set_core_clr_platform_callback (MonoCoreClrPlatformCB callback);
MONO_END_DECLS
diff --git a/mono/metadata/assembly.c b/mono/metadata/assembly.c
index 607dde5037b..8ad1eda644d 100644
--- a/mono/metadata/assembly.c
+++ b/mono/metadata/assembly.c
@@ -33,6 +33,7 @@
#include <mono/utils/mono-path.h>
#include <mono/metadata/reflection.h>
#include <mono/metadata/coree.h>
+#include <mono/metadata/cil-coff.h>
#include <mono/utils/mono-io-portability.h>
#include <mono/utils/atomic.h>
@@ -107,6 +108,8 @@ static const AssemblyVersionMap framework_assemblies [] = {
{"System.Data", 0},
{"System.Data.Linq", 2},
{"System.Data.OracleClient", 0},
+ {"System.Data.Services", 2},
+ {"System.Data.Services.Client", 2},
{"System.Data.SqlXml", 0},
{"System.Design", 0},
{"System.DirectoryServices", 0},
@@ -115,19 +118,25 @@ static const AssemblyVersionMap framework_assemblies [] = {
{"System.EnterpriseServices", 0},
{"System.Management", 0},
{"System.Messaging", 0},
+ {"System.Net", 2},
{"System.Runtime.Remoting", 0},
{"System.Runtime.Serialization", 3},
{"System.Runtime.Serialization.Formatters.Soap", 0},
{"System.Security", 0},
+ {"System.ServiceModel.Web", 2},
{"System.ServiceProcess", 0},
{"System.Transactions", 0},
{"System.Web", 0},
{"System.Web.Abstractions", 2},
+ {"System.Web.DynamicData", 2},
+ {"System.Web.Extensions", 2},
{"System.Web.Mobile", 0},
{"System.Web.Routing", 2},
{"System.Web.Services", 0},
{"System.Windows.Forms", 0},
{"System.Xml", 0},
+ {"System.Xml.Linq", 2},
+ {"WindowsBase", 3},
{"mscorlib", 0}
};
#endif
@@ -733,6 +742,7 @@ mono_assembly_fill_assembly_name (MonoImage *image, MonoAssemblyName *aname)
{
MonoTableInfo *t = &image->tables [MONO_TABLE_ASSEMBLY];
guint32 cols [MONO_ASSEMBLY_SIZE];
+ gint32 machine;
if (!t->rows)
return FALSE;
@@ -777,6 +787,24 @@ mono_assembly_fill_assembly_name (MonoImage *image, MonoAssemblyName *aname)
else
aname->public_key = 0;
+ machine = ((MonoCLIImageInfo*)(image->image_info))->cli_header.coff.coff_machine;
+ switch (machine) {
+ case COFF_MACHINE_I386:
+ aname->arch = MONO_PROCESSOR_ARCHITECTURE_X86;
+ break;
+ case COFF_MACHINE_IA64:
+ aname->arch = MONO_PROCESSOR_ARCHITECTURE_IA64;
+ break;
+ case COFF_MACHINE_AMD64:
+ aname->arch = MONO_PROCESSOR_ARCHITECTURE_AMD64;
+ break;
+ case COFF_MACHINE_ARM:
+ aname->arch = MONO_PROCESSOR_ARCHITECTURE_ARM;
+ break;
+ default:
+ break;
+ }
+
return TRUE;
}
@@ -836,6 +864,11 @@ mono_assembly_addref (MonoAssembly *assembly)
InterlockedIncrement (&assembly->ref_count);
}
+/*
+ * CAUTION: This table must be kept in sync with
+ * ivkm/reflect/Fusion.cs
+ */
+
#define SILVERLIGHT_KEY "7cec85d7bea7798e"
#define WINFX_KEY "31bf3856ad364e35"
#define ECMA_KEY "b77a5c561934e089"
@@ -854,7 +887,7 @@ static KeyRemapEntry key_remap_table[] = {
{ "System.ComponentModel.DataAnnotations", "ddd0da4d3e678217", WINFX_KEY },
{ "System.Core", SILVERLIGHT_KEY, ECMA_KEY },
// FIXME: MS uses MSFINAL_KEY for .NET 4.5
- { "System.Net", SILVERLIGHT_KEY, ECMA_KEY },
+ { "System.Net", SILVERLIGHT_KEY, MSFINAL_KEY },
{ "System.Numerics", WINFX_KEY, ECMA_KEY },
{ "System.Runtime.Serialization", SILVERLIGHT_KEY, ECMA_KEY },
{ "System.ServiceModel", WINFX_KEY, ECMA_KEY },
@@ -862,7 +895,7 @@ static KeyRemapEntry key_remap_table[] = {
{ "System.Windows", SILVERLIGHT_KEY, MSFINAL_KEY },
{ "System.Xml", SILVERLIGHT_KEY, ECMA_KEY },
{ "System.Xml.Linq", WINFX_KEY, ECMA_KEY },
- { "System.Xml.Serialization", WINFX_KEY, MSFINAL_KEY }
+ { "System.Xml.Serialization", WINFX_KEY, ECMA_KEY }
};
static void
diff --git a/mono/metadata/assembly.h b/mono/metadata/assembly.h
index be01cf97515..50488658fa2 100644
--- a/mono/metadata/assembly.h
+++ b/mono/metadata/assembly.h
@@ -5,67 +5,67 @@
MONO_BEGIN_DECLS
-void mono_assemblies_init (void);
-void mono_assemblies_cleanup (void);
-MonoAssembly *mono_assembly_open (const char *filename,
+MONO_API void mono_assemblies_init (void);
+MONO_API void mono_assemblies_cleanup (void);
+MONO_API MonoAssembly *mono_assembly_open (const char *filename,
MonoImageOpenStatus *status);
-MonoAssembly *mono_assembly_open_full (const char *filename,
+MONO_API MonoAssembly *mono_assembly_open_full (const char *filename,
MonoImageOpenStatus *status,
mono_bool refonly);
-MonoAssembly* mono_assembly_load (MonoAssemblyName *aname,
+MONO_API MonoAssembly* mono_assembly_load (MonoAssemblyName *aname,
const char *basedir,
MonoImageOpenStatus *status);
-MonoAssembly* mono_assembly_load_full (MonoAssemblyName *aname,
+MONO_API MonoAssembly* mono_assembly_load_full (MonoAssemblyName *aname,
const char *basedir,
MonoImageOpenStatus *status,
mono_bool refonly);
-MonoAssembly* mono_assembly_load_from (MonoImage *image, const char *fname,
+MONO_API MonoAssembly* mono_assembly_load_from (MonoImage *image, const char *fname,
MonoImageOpenStatus *status);
-MonoAssembly* mono_assembly_load_from_full (MonoImage *image, const char *fname,
+MONO_API MonoAssembly* mono_assembly_load_from_full (MonoImage *image, const char *fname,
MonoImageOpenStatus *status,
mono_bool refonly);
-MonoAssembly* mono_assembly_load_with_partial_name (const char *name, MonoImageOpenStatus *status);
-
-MonoAssembly* mono_assembly_loaded (MonoAssemblyName *aname);
-MonoAssembly* mono_assembly_loaded_full (MonoAssemblyName *aname, mono_bool refonly);
-void mono_assembly_get_assemblyref (MonoImage *image, int index, MonoAssemblyName *aname);
-void mono_assembly_load_reference (MonoImage *image, int index);
-void mono_assembly_load_references (MonoImage *image, MonoImageOpenStatus *status);
-MonoImage* mono_assembly_load_module (MonoAssembly *assembly, uint32_t idx);
-void mono_assembly_close (MonoAssembly *assembly);
-void mono_assembly_setrootdir (const char *root_dir);
-MONO_CONST_RETURN char *mono_assembly_getrootdir (void);
-void mono_assembly_foreach (MonoFunc func, void* user_data);
-void mono_assembly_set_main (MonoAssembly *assembly);
-MonoAssembly *mono_assembly_get_main (void);
-MonoImage *mono_assembly_get_image (MonoAssembly *assembly);
-mono_bool mono_assembly_fill_assembly_name (MonoImage *image, MonoAssemblyName *aname);
-mono_bool mono_assembly_names_equal (MonoAssemblyName *l, MonoAssemblyName *r);
-char* mono_stringify_assembly_name (MonoAssemblyName *aname);
+MONO_API MonoAssembly* mono_assembly_load_with_partial_name (const char *name, MonoImageOpenStatus *status);
+
+MONO_API MonoAssembly* mono_assembly_loaded (MonoAssemblyName *aname);
+MONO_API MonoAssembly* mono_assembly_loaded_full (MonoAssemblyName *aname, mono_bool refonly);
+MONO_API void mono_assembly_get_assemblyref (MonoImage *image, int index, MonoAssemblyName *aname);
+MONO_API void mono_assembly_load_reference (MonoImage *image, int index);
+MONO_API void mono_assembly_load_references (MonoImage *image, MonoImageOpenStatus *status);
+MONO_API MonoImage* mono_assembly_load_module (MonoAssembly *assembly, uint32_t idx);
+MONO_API void mono_assembly_close (MonoAssembly *assembly);
+MONO_API void mono_assembly_setrootdir (const char *root_dir);
+MONO_API MONO_CONST_RETURN char *mono_assembly_getrootdir (void);
+MONO_API void mono_assembly_foreach (MonoFunc func, void* user_data);
+MONO_API void mono_assembly_set_main (MonoAssembly *assembly);
+MONO_API MonoAssembly *mono_assembly_get_main (void);
+MONO_API MonoImage *mono_assembly_get_image (MonoAssembly *assembly);
+MONO_API mono_bool mono_assembly_fill_assembly_name (MonoImage *image, MonoAssemblyName *aname);
+MONO_API mono_bool mono_assembly_names_equal (MonoAssemblyName *l, MonoAssemblyName *r);
+MONO_API char* mono_stringify_assembly_name (MonoAssemblyName *aname);
/* Installs a function which is called each time a new assembly is loaded. */
typedef void (*MonoAssemblyLoadFunc) (MonoAssembly *assembly, void* user_data);
-void mono_install_assembly_load_hook (MonoAssemblyLoadFunc func, void* user_data);
+MONO_API void mono_install_assembly_load_hook (MonoAssemblyLoadFunc func, void* user_data);
/*
* Installs a new function which is used to search the list of loaded
* assemblies for a given assembly name.
*/
typedef MonoAssembly *(*MonoAssemblySearchFunc) (MonoAssemblyName *aname, void* user_data);
-void mono_install_assembly_search_hook (MonoAssemblySearchFunc func, void* user_data);
-void mono_install_assembly_refonly_search_hook (MonoAssemblySearchFunc func, void* user_data);
+MONO_API void mono_install_assembly_search_hook (MonoAssemblySearchFunc func, void* user_data);
+MONO_API void mono_install_assembly_refonly_search_hook (MonoAssemblySearchFunc func, void* user_data);
-MonoAssembly* mono_assembly_invoke_search_hook (MonoAssemblyName *aname);
+MONO_API MonoAssembly* mono_assembly_invoke_search_hook (MonoAssemblyName *aname);
/*
* Installs a new search function which is used as a last resort when loading
* an assembly fails. This could invoke AssemblyResolve events.
*/
-void
+MONO_API void
mono_install_assembly_postload_search_hook (MonoAssemblySearchFunc func, void* user_data);
-void
+MONO_API void
mono_install_assembly_postload_refonly_search_hook (MonoAssemblySearchFunc func, void* user_data);
@@ -76,20 +76,20 @@ typedef MonoAssembly * (*MonoAssemblyPreLoadFunc) (MonoAssemblyName *aname,
char **assemblies_path,
void* user_data);
-void mono_install_assembly_preload_hook (MonoAssemblyPreLoadFunc func,
+MONO_API void mono_install_assembly_preload_hook (MonoAssemblyPreLoadFunc func,
void* user_data);
-void mono_install_assembly_refonly_preload_hook (MonoAssemblyPreLoadFunc func,
+MONO_API void mono_install_assembly_refonly_preload_hook (MonoAssemblyPreLoadFunc func,
void* user_data);
-void mono_assembly_invoke_load_hook (MonoAssembly *ass);
+MONO_API void mono_assembly_invoke_load_hook (MonoAssembly *ass);
-MonoAssemblyName* mono_assembly_name_new (const char *name);
-const char* mono_assembly_name_get_name (MonoAssemblyName *aname);
-const char* mono_assembly_name_get_culture (MonoAssemblyName *aname);
-uint16_t mono_assembly_name_get_version (MonoAssemblyName *aname,
+MONO_API MonoAssemblyName* mono_assembly_name_new (const char *name);
+MONO_API const char* mono_assembly_name_get_name (MonoAssemblyName *aname);
+MONO_API const char* mono_assembly_name_get_culture (MonoAssemblyName *aname);
+MONO_API uint16_t mono_assembly_name_get_version (MonoAssemblyName *aname,
uint16_t *minor, uint16_t *build, uint16_t *revision);
-mono_byte* mono_assembly_name_get_pubkeytoken (MonoAssemblyName *aname);
-void mono_assembly_name_free (MonoAssemblyName *aname);
+MONO_API mono_byte* mono_assembly_name_get_pubkeytoken (MonoAssemblyName *aname);
+MONO_API void mono_assembly_name_free (MonoAssemblyName *aname);
typedef struct {
const char *name;
@@ -97,14 +97,14 @@ typedef struct {
const unsigned int size;
} MonoBundledAssembly;
-void mono_register_bundled_assemblies (const MonoBundledAssembly **assemblies);
-void mono_register_config_for_assembly (const char* assembly_name, const char* config_xml);
-void mono_register_symfile_for_assembly (const char* assembly_name, const mono_byte *raw_contents, int size);
-void mono_register_machine_config (const char *config_xml);
+MONO_API void mono_register_bundled_assemblies (const MonoBundledAssembly **assemblies);
+MONO_API void mono_register_config_for_assembly (const char* assembly_name, const char* config_xml);
+MONO_API void mono_register_symfile_for_assembly (const char* assembly_name, const mono_byte *raw_contents, int size);
+MONO_API void mono_register_machine_config (const char *config_xml);
-void mono_set_rootdir (void);
-void mono_set_dirs (const char *assembly_dir, const char *config_dir);
-void mono_set_assemblies_path (const char* path);
+MONO_API void mono_set_rootdir (void);
+MONO_API void mono_set_dirs (const char *assembly_dir, const char *config_dir);
+MONO_API void mono_set_assemblies_path (const char* path);
MONO_END_DECLS
#endif
diff --git a/mono/metadata/boehm-gc.c b/mono/metadata/boehm-gc.c
index f79bc9ba092..b858650c874 100644
--- a/mono/metadata/boehm-gc.c
+++ b/mono/metadata/boehm-gc.c
@@ -13,7 +13,6 @@
#define GC_I_HIDE_POINTERS
#include <mono/metadata/gc-internal.h>
#include <mono/metadata/mono-gc.h>
-#include <mono/metadata/gc-internal.h>
#include <mono/metadata/profiler-private.h>
#include <mono/metadata/class-internals.h>
#include <mono/metadata/method-builder.h>
@@ -22,7 +21,9 @@
#include <mono/metadata/metadata-internals.h>
#include <mono/metadata/marshal.h>
#include <mono/metadata/runtime.h>
+#include <mono/utils/atomic.h>
#include <mono/utils/mono-logger-internal.h>
+#include <mono/utils/mono-memory-model.h>
#include <mono/utils/mono-time.h>
#include <mono/utils/mono-threads.h>
#include <mono/utils/dtrace.h>
@@ -61,7 +62,7 @@ void
mono_gc_base_init (void)
{
MonoThreadInfoCallbacks cb;
- char *env;
+ const char *env;
if (gc_initialized)
return;
@@ -147,7 +148,7 @@ mono_gc_base_init (void)
GC_allow_register_threads();
#endif
- if ((env = getenv ("MONO_GC_PARAMS"))) {
+ if ((env = g_getenv ("MONO_GC_PARAMS"))) {
char **ptr, **opts = g_strsplit (env, ",", -1);
for (ptr = opts; *ptr; ++ptr) {
char *opt = *ptr;
@@ -564,9 +565,9 @@ mono_gc_alloc_fixed (size_t size, void *descr)
/*
static int count;
count ++;
- if (count == atoi (getenv ("COUNT2")))
+ if (count == atoi (g_getenv ("COUNT2")))
printf ("HIT!\n");
- if (count > atoi (getenv ("COUNT2")))
+ if (count > atoi (g_getenv ("COUNT2")))
return GC_MALLOC (size);
*/
@@ -625,6 +626,12 @@ mono_gc_wbarrier_generic_store (gpointer ptr, MonoObject* value)
}
void
+mono_gc_wbarrier_generic_store_atomic (gpointer ptr, MonoObject *value)
+{
+ InterlockedWritePointer (ptr, value);
+}
+
+void
mono_gc_wbarrier_generic_nostore (gpointer ptr)
{
}
@@ -681,7 +688,7 @@ enum {
};
static MonoMethod*
-create_allocator (int atype, int offset)
+create_allocator (int atype, int tls_key)
{
int index_var, bytes_var, my_fl_var, my_entry_var;
guint32 no_freelist_branch, not_small_enough_branch = 0;
@@ -760,7 +767,7 @@ create_allocator (int atype, int offset)
/* my_fl = ((GC_thread)tsd) -> ptrfree_freelists + index; */
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
mono_mb_emit_byte (mb, 0x0D); /* CEE_MONO_TLS */
- mono_mb_emit_i4 (mb, offset);
+ mono_mb_emit_i4 (mb, tls_key);
if (atype == ATYPE_FREEPTR || atype == ATYPE_FREEPTR_FOR_BOX || atype == ATYPE_STRING)
mono_mb_emit_icon (mb, G_STRUCT_OFFSET (struct GC_Thread_Rep, ptrfree_freelists));
else if (atype == ATYPE_NORMAL)
@@ -967,10 +974,12 @@ mono_gc_get_managed_allocator_by_type (int atype)
MonoMethod *res;
MONO_THREAD_VAR_OFFSET (GC_thread_tls, offset);
+ mono_tls_key_set_offset (TLS_KEY_BOEHM_GC_THREAD, offset);
+
mono_loader_lock ();
res = alloc_method_cache [atype];
if (!res)
- res = alloc_method_cache [atype] = create_allocator (atype, offset);
+ res = alloc_method_cache [atype] = create_allocator (atype, TLS_KEY_BOEHM_GC_THREAD);
mono_loader_unlock ();
return res;
}
diff --git a/mono/metadata/cil-coff.h b/mono/metadata/cil-coff.h
index 91ede875aad..ab7f2c97f30 100644
--- a/mono/metadata/cil-coff.h
+++ b/mono/metadata/cil-coff.h
@@ -37,6 +37,12 @@ typedef struct {
char msdos_header2 [64];
} MonoMSDOSHeader;
+/* Possible values for coff_machine */
+#define COFF_MACHINE_I386 332
+#define COFF_MACHINE_IA64 512
+#define COFF_MACHINE_AMD64 34404
+#define COFF_MACHINE_ARM 452
+
/* 20 bytes */
typedef struct {
guint16 coff_machine;
@@ -320,6 +326,6 @@ typedef struct {
MonoCLIHeader cli_cli_header;
} MonoCLIImageInfo;
-guint32 mono_cli_rva_image_map (MonoImage *image, guint32 rva);
+MONO_API guint32 mono_cli_rva_image_map (MonoImage *image, guint32 rva);
#endif /* __MONO_CIL_COFF_H__ */
diff --git a/mono/metadata/class-internals.h b/mono/metadata/class-internals.h
index 2fa919ace45..942b1f4d102 100644
--- a/mono/metadata/class-internals.h
+++ b/mono/metadata/class-internals.h
@@ -439,7 +439,7 @@ int mono_class_interface_match (const uint8_t *bitmap, int id) MONO_INTERNAL;
#endif
-int mono_class_interface_offset (MonoClass *klass, MonoClass *itf);
+MONO_API int mono_class_interface_offset (MonoClass *klass, MonoClass *itf);
int mono_class_interface_offset_with_variance (MonoClass *klass, MonoClass *itf, gboolean *non_exact_match) MONO_INTERNAL;
typedef gpointer MonoRuntimeGenericContext;
@@ -835,7 +835,7 @@ typedef struct {
extern MonoPerfCounters *mono_perfcounters MONO_INTERNAL;
-void mono_perfcounters_init (void);
+MONO_API void mono_perfcounters_init (void);
/*
* The definition of the first field in SafeHandle,
@@ -1001,7 +1001,7 @@ MonoGenericContext*
mono_method_get_context (MonoMethod *method) MONO_INTERNAL;
/* Used by monodis, thus cannot be MONO_INTERNAL */
-MonoGenericContainer*
+MONO_API MonoGenericContainer*
mono_method_get_generic_container (MonoMethod *method);
MonoGenericContext*
@@ -1022,7 +1022,7 @@ mono_class_inflate_generic_method_full_checked (MonoMethod *method, MonoClass *k
MonoMethodInflated*
mono_method_inflated_lookup (MonoMethodInflated* method, gboolean cache) MONO_INTERNAL;
-MonoMethodSignature *
+MONO_API MonoMethodSignature *
mono_metadata_get_inflated_signature (MonoMethodSignature *sig, MonoGenericContext *context);
MonoType*
@@ -1034,7 +1034,7 @@ mono_class_inflate_generic_class (MonoClass *gklass, MonoGenericContext *context
MonoType*
mono_class_inflate_generic_type_checked (MonoType *type, MonoGenericContext *context, MonoError *error) MONO_INTERNAL;
-void
+MONO_API void
mono_metadata_free_inflated_signature (MonoMethodSignature *sig);
MonoMethodSignature*
@@ -1218,11 +1218,11 @@ mono_method_get_wrapper_data (MonoMethod *method, guint32 id) MONO_INTERNAL;
gboolean
mono_metadata_has_generic_params (MonoImage *image, guint32 token) MONO_INTERNAL;
-MonoGenericContainer *
+MONO_API MonoGenericContainer *
mono_metadata_load_generic_params (MonoImage *image, guint32 token,
MonoGenericContainer *parent_container);
-void
+MONO_API void
mono_metadata_load_generic_param_constraints (MonoImage *image, guint32 token,
MonoGenericContainer *container);
@@ -1272,23 +1272,23 @@ mono_type_get_full_name (MonoClass *class) MONO_INTERNAL;
MonoArrayType *mono_dup_array_type (MonoImage *image, MonoArrayType *a) MONO_INTERNAL;
MonoMethodSignature *mono_metadata_signature_deep_dup (MonoImage *image, MonoMethodSignature *sig) MONO_INTERNAL;
-void
+MONO_API void
mono_image_init_name_cache (MonoImage *image);
gboolean mono_class_is_nullable (MonoClass *klass) MONO_INTERNAL;
MonoClass *mono_class_get_nullable_param (MonoClass *klass) MONO_INTERNAL;
/* object debugging functions, for use inside gdb */
-void mono_object_describe (MonoObject *obj);
-void mono_object_describe_fields (MonoObject *obj);
-void mono_value_describe_fields (MonoClass* klass, const char* addr);
-void mono_class_describe_statics (MonoClass* klass);
+MONO_API void mono_object_describe (MonoObject *obj);
+MONO_API void mono_object_describe_fields (MonoObject *obj);
+MONO_API void mono_value_describe_fields (MonoClass* klass, const char* addr);
+MONO_API void mono_class_describe_statics (MonoClass* klass);
/*Enum validation related functions*/
-gboolean
+MONO_API gboolean
mono_type_is_valid_enum_basetype (MonoType * type);
-gboolean
+MONO_API gboolean
mono_class_is_valid_enum (MonoClass *klass);
MonoType *
diff --git a/mono/metadata/class.c b/mono/metadata/class.c
index 514ea77e466..d9db61bfd4e 100644
--- a/mono/metadata/class.c
+++ b/mono/metadata/class.c
@@ -42,6 +42,8 @@
#include <mono/utils/mono-logger-internal.h>
#include <mono/utils/mono-memory-model.h>
#include <mono/utils/atomic.h>
+#include <mono/utils/bsearch.h>
+
MonoStats mono_stats;
gboolean mono_print_vtable = FALSE;
@@ -1426,6 +1428,52 @@ mono_class_setup_fields (MonoClass *class)
MonoGenericContainer *container = NULL;
MonoClass *gtd = class->generic_class ? mono_class_get_generic_type_definition (class) : NULL;
+ /*
+ * FIXME: We have a race condition here. It's possible that this function returns
+ * to its caller with `instance_size` set to `0` instead of the actual size. This
+ * is not a problem when the function is called recursively on the same class,
+ * because the size will be initialized by the outer invocation. What follows is a
+ * description of how it can occur in other cases, too. There it is a problem,
+ * because it can lead to the GC being asked to allocate an object of size `0`,
+ * which SGen chokes on. The race condition is triggered infrequently by
+ * `tests/sgen-suspend.cs`.
+ *
+ * This function is called for a class whenever one of its subclasses is inited.
+ * For example, it's called for every subclass of Object. What it does is this:
+ *
+ * if (class->setup_fields_called)
+ * return;
+ * ...
+ * class->instance_size = 0;
+ * ...
+ * class->setup_fields_called = 1;
+ * ... critical point
+ * class->instance_size = actual_instance_size;
+ *
+ * The last two steps are sometimes reversed, but that only changes the way in which
+ * the race condition works.
+ *
+ * Assume thread A goes through this function and makes it to the critical point.
+ * Now thread B runs the function and, since `setup_fields_called` is set, returns
+ * immediately, but `instance_size` is incorrect.
+ *
+ * The other case looks like this:
+ *
+ * if (class->setup_fields_called)
+ * return;
+ * ... critical point X
+ * class->instance_size = 0;
+ * ... critical point Y
+ * class->instance_size = actual_instance_size;
+ * ...
+ * class->setup_fields_called = 1;
+ *
+ * Assume thread A goes through the function and makes it to critical point X. Now
+ * thread B runs through the whole of the function, returning, assuming
+ * `instance_size` is set. At that point thread A gets to run and makes it to
+ * critical point Y, at which time `instance_size` is `0` again, invalidating thread
+ * B's assumption.
+ */
if (class->setup_fields_called)
return;
@@ -1503,6 +1551,7 @@ mono_class_setup_fields (MonoClass *class)
mono_memory_barrier ();
class->size_inited = 1;
class->fields_inited = 1;
+ class->setup_fields_called = 1;
return;
}
@@ -2645,7 +2694,7 @@ compare_interface_ids (const void *p_key, const void *p_element) {
/*FIXME verify all callers if they should switch to mono_class_interface_offset_with_variance*/
int
mono_class_interface_offset (MonoClass *klass, MonoClass *itf) {
- MonoClass **result = bsearch (
+ MonoClass **result = mono_binary_search (
itf,
klass->interfaces_packed,
klass->interface_offsets_count,
@@ -7397,7 +7446,11 @@ search_modules (MonoImage *image, const char *name_space, const char *name)
* @name: the type short name.
*
* Obtains a MonoClass with a given namespace and a given name which
- * is located in the given MonoImage.
+ * is located in the given MonoImage.
+ *
+ * To reference nested classes, use the "/" character as a separator.
+ * For example use "Foo/Bar" to reference the class Bar that is nested
+ * inside Foo, like this: "class Foo { class Bar {} }".
*/
MonoClass *
mono_class_from_name (MonoImage *image, const char* name_space, const char *name)
@@ -7509,11 +7562,31 @@ mono_class_from_name (MonoImage *image, const char* name_space, const char *name
return class;
}
-/*FIXME test for interfaces with variant generic arguments*/
+/**
+ * mono_class_is_subclass_of:
+ * @klass: class to probe if it is a subclass of another one
+ * @klassc: the class we suspect is the base class
+ * @check_interfaces: whether we should perform interface checks
+ *
+ * This method determines whether @klass is a subclass of @klassc.
+ *
+ * If the @check_interfaces flag is set, then if @klassc is an interface
+ * this method return true if the @klass implements the interface or
+ * if @klass is an interface, if one of its base classes is @klass.
+ *
+ * If @check_interfaces is false then, then if @klass is not an interface
+ * then it returns true if the @klass is a subclass of @klassc.
+ *
+ * if @klass is an interface and @klassc is System.Object, then this function
+ * return true.
+ *
+ */
gboolean
mono_class_is_subclass_of (MonoClass *klass, MonoClass *klassc,
gboolean check_interfaces)
{
+/*FIXME test for interfaces with variant generic arguments*/
+
if (check_interfaces && MONO_CLASS_IS_INTERFACE (klassc) && !MONO_CLASS_IS_INTERFACE (klass)) {
if (MONO_CLASS_IMPLEMENTS_INTERFACE (klass, klassc->interface_id))
return TRUE;
@@ -8828,6 +8901,32 @@ mono_class_get_nested_types (MonoClass* klass, gpointer *iter)
return NULL;
}
+
+/**
+ * mono_class_is_delegate
+ * @klass: the MonoClass to act on
+ *
+ * Returns: true if the MonoClass represents a System.Delegate.
+ */
+mono_bool
+mono_class_is_delegate (MonoClass *klass)
+{
+ return klass->delegate;
+}
+
+/**
+ * mono_class_implements_interface
+ * @klass: The MonoClass to act on
+ * @interface: The interface to check if @klass implements.
+ *
+ * Returns: true if @klass implements @interface.
+ */
+mono_bool
+mono_class_implements_interface (MonoClass* klass, MonoClass* iface)
+{
+ return mono_class_is_assignable_from (iface, klass);
+}
+
/**
* mono_field_get_name:
* @field: the MonoClassField to act on
diff --git a/mono/metadata/class.h b/mono/metadata/class.h
index 1142dca5bdf..a65bd4565e9 100644
--- a/mono/metadata/class.h
+++ b/mono/metadata/class.h
@@ -13,249 +13,255 @@ typedef struct _MonoClassField MonoClassField;
typedef struct _MonoProperty MonoProperty;
typedef struct _MonoEvent MonoEvent;
-MonoClass *
+MONO_API MonoClass *
mono_class_get (MonoImage *image, uint32_t type_token);
-MonoClass *
+MONO_API MonoClass *
mono_class_get_full (MonoImage *image, uint32_t type_token, MonoGenericContext *context);
-mono_bool
+MONO_API mono_bool
mono_class_init (MonoClass *klass);
-MonoVTable *
+MONO_API MonoVTable *
mono_class_vtable (MonoDomain *domain, MonoClass *klass);
-MonoClass *
+MONO_API MonoClass *
mono_class_from_name (MonoImage *image, const char* name_space, const char *name);
-MonoClass *
+MONO_API MonoClass *
mono_class_from_name_case (MonoImage *image, const char* name_space, const char *name);
-MonoMethod *
+MONO_API MonoMethod *
mono_class_get_method_from_name_flags (MonoClass *klass, const char *name, int param_count, int flags);
-MonoClass *
+MONO_API MonoClass *
mono_class_from_typeref (MonoImage *image, uint32_t type_token);
-MonoClass *
+MONO_API MonoClass *
mono_class_from_generic_parameter (MonoGenericParam *param, MonoImage *image, mono_bool is_mvar);
-MonoType*
+MONO_API MonoType*
mono_class_inflate_generic_type (MonoType *type, MonoGenericContext *context) /* MONO_DEPRECATED */;
-MonoMethod*
+MONO_API MonoMethod*
mono_class_inflate_generic_method (MonoMethod *method, MonoGenericContext *context);
-MonoMethod *
+MONO_API MonoMethod *
mono_get_inflated_method (MonoMethod *method);
-MonoClassField*
+MONO_API MonoClassField*
mono_field_from_token (MonoImage *image, uint32_t token, MonoClass **retklass, MonoGenericContext *context);
-MonoClass *
+MONO_API MonoClass *
mono_bounded_array_class_get (MonoClass *element_class, uint32_t rank, mono_bool bounded);
-MonoClass *
+MONO_API MonoClass *
mono_array_class_get (MonoClass *element_class, uint32_t rank);
-MonoClass *
+MONO_API MonoClass *
mono_ptr_class_get (MonoType *type);
-MonoClassField *
+MONO_API MonoClassField *
mono_class_get_field (MonoClass *klass, uint32_t field_token);
-MonoClassField *
+MONO_API MonoClassField *
mono_class_get_field_from_name (MonoClass *klass, const char *name);
-uint32_t
+MONO_API uint32_t
mono_class_get_field_token (MonoClassField *field);
-uint32_t
+MONO_API uint32_t
mono_class_get_event_token (MonoEvent *event);
-MonoProperty*
+MONO_API MonoProperty*
mono_class_get_property_from_name (MonoClass *klass, const char *name);
-uint32_t
+MONO_API uint32_t
mono_class_get_property_token (MonoProperty *prop);
-int32_t
+MONO_API int32_t
mono_array_element_size (MonoClass *ac);
-int32_t
+MONO_API int32_t
mono_class_instance_size (MonoClass *klass);
-int32_t
+MONO_API int32_t
mono_class_array_element_size (MonoClass *klass);
-int32_t
+MONO_API int32_t
mono_class_data_size (MonoClass *klass);
-int32_t
+MONO_API int32_t
mono_class_value_size (MonoClass *klass, uint32_t *align);
-int32_t
+MONO_API int32_t
mono_class_min_align (MonoClass *klass);
-MonoClass *
+MONO_API MonoClass *
mono_class_from_mono_type (MonoType *type);
-mono_bool
+MONO_API mono_bool
mono_class_is_subclass_of (MonoClass *klass, MonoClass *klassc,
mono_bool check_interfaces);
-mono_bool
+MONO_API mono_bool
mono_class_is_assignable_from (MonoClass *klass, MonoClass *oklass);
-void*
+MONO_API void*
mono_ldtoken (MonoImage *image, uint32_t token, MonoClass **retclass, MonoGenericContext *context);
-char*
+MONO_API char*
mono_type_get_name (MonoType *type);
-MonoType*
+MONO_API MonoType*
mono_type_get_underlying_type (MonoType *type);
/* MonoClass accessors */
-MonoImage*
+MONO_API MonoImage*
mono_class_get_image (MonoClass *klass);
-MonoClass*
+MONO_API MonoClass*
mono_class_get_element_class (MonoClass *klass);
-mono_bool
+MONO_API mono_bool
mono_class_is_valuetype (MonoClass *klass);
-mono_bool
+MONO_API mono_bool
mono_class_is_enum (MonoClass *klass);
-MonoType*
+MONO_API MonoType*
mono_class_enum_basetype (MonoClass *klass);
-MonoClass*
+MONO_API MonoClass*
mono_class_get_parent (MonoClass *klass);
-MonoClass*
+MONO_API MonoClass*
mono_class_get_nesting_type (MonoClass *klass);
-int
+MONO_API int
mono_class_get_rank (MonoClass *klass);
-uint32_t
+MONO_API uint32_t
mono_class_get_flags (MonoClass *klass);
-const char*
+MONO_API const char*
mono_class_get_name (MonoClass *klass);
-const char*
+MONO_API const char*
mono_class_get_namespace (MonoClass *klass);
-MonoType*
+MONO_API MonoType*
mono_class_get_type (MonoClass *klass);
-uint32_t
+MONO_API uint32_t
mono_class_get_type_token (MonoClass *klass);
-MonoType*
+MONO_API MonoType*
mono_class_get_byref_type (MonoClass *klass);
-int
+MONO_API int
mono_class_num_fields (MonoClass *klass);
-int
+MONO_API int
mono_class_num_methods (MonoClass *klass);
-int
+MONO_API int
mono_class_num_properties (MonoClass *klass);
-int
+MONO_API int
mono_class_num_events (MonoClass *klass);
-MonoClassField*
+MONO_API MonoClassField*
mono_class_get_fields (MonoClass* klass, void **iter);
-MonoMethod*
+MONO_API MonoMethod*
mono_class_get_methods (MonoClass* klass, void **iter);
-MonoProperty*
+MONO_API MonoProperty*
mono_class_get_properties (MonoClass* klass, void **iter);
-MonoEvent*
+MONO_API MonoEvent*
mono_class_get_events (MonoClass* klass, void **iter);
-MonoClass*
+MONO_API MonoClass*
mono_class_get_interfaces (MonoClass* klass, void **iter);
-MonoClass*
+MONO_API MonoClass*
mono_class_get_nested_types (MonoClass* klass, void **iter);
+MONO_API mono_bool
+mono_class_is_delegate (MonoClass* klass);
+
+MONO_API mono_bool
+mono_class_implements_interface (MonoClass* klass, MonoClass* iface);
+
/* MonoClassField accessors */
-const char*
+MONO_API const char*
mono_field_get_name (MonoClassField *field);
-MonoType*
+MONO_API MonoType*
mono_field_get_type (MonoClassField *field);
-MonoClass*
+MONO_API MonoClass*
mono_field_get_parent (MonoClassField *field);
-uint32_t
+MONO_API uint32_t
mono_field_get_flags (MonoClassField *field);
-uint32_t
+MONO_API uint32_t
mono_field_get_offset (MonoClassField *field);
-const char *
+MONO_API const char *
mono_field_get_data (MonoClassField *field);
/* MonoProperty acessors */
-const char*
+MONO_API const char*
mono_property_get_name (MonoProperty *prop);
-MonoMethod*
+MONO_API MonoMethod*
mono_property_get_set_method (MonoProperty *prop);
-MonoMethod*
+MONO_API MonoMethod*
mono_property_get_get_method (MonoProperty *prop);
-MonoClass*
+MONO_API MonoClass*
mono_property_get_parent (MonoProperty *prop);
-uint32_t
+MONO_API uint32_t
mono_property_get_flags (MonoProperty *prop);
/* MonoEvent accessors */
-const char*
+MONO_API const char*
mono_event_get_name (MonoEvent *event);
-MonoMethod*
+MONO_API MonoMethod*
mono_event_get_add_method (MonoEvent *event);
-MonoMethod*
+MONO_API MonoMethod*
mono_event_get_remove_method (MonoEvent *event);
-MonoMethod*
+MONO_API MonoMethod*
mono_event_get_remove_method (MonoEvent *event);
-MonoMethod*
+MONO_API MonoMethod*
mono_event_get_raise_method (MonoEvent *event);
-MonoClass*
+MONO_API MonoClass*
mono_event_get_parent (MonoEvent *event);
-uint32_t
+MONO_API uint32_t
mono_event_get_flags (MonoEvent *event);
-MonoMethod *
+MONO_API MonoMethod *
mono_class_get_method_from_name (MonoClass *klass, const char *name, int param_count);
-char *
+MONO_API char *
mono_class_name_from_token (MonoImage *image, uint32_t type_token);
-mono_bool
+MONO_API mono_bool
mono_method_can_access_field (MonoMethod *method, MonoClassField *field);
-mono_bool
+MONO_API mono_bool
mono_method_can_access_method (MonoMethod *method, MonoMethod *called);
MONO_END_DECLS
diff --git a/mono/metadata/cominterop.c b/mono/metadata/cominterop.c
index d9a625e56b8..42601954129 100644
--- a/mono/metadata/cominterop.c
+++ b/mono/metadata/cominterop.c
@@ -525,11 +525,11 @@ cominterop_type_from_handle (MonoType *handle)
void
mono_cominterop_init (void)
{
- char* com_provider_env = NULL;
+ const char* com_provider_env;
InitializeCriticalSection (&cominterop_mutex);
- com_provider_env = getenv ("MONO_COM");
+ com_provider_env = g_getenv ("MONO_COM");
if (com_provider_env && !strcmp(com_provider_env, "MS"))
com_provider = MONO_COM_MS;
diff --git a/mono/metadata/cominterop.h b/mono/metadata/cominterop.h
index d3da2d93f46..f65aae2fb03 100644
--- a/mono/metadata/cominterop.h
+++ b/mono/metadata/cominterop.h
@@ -47,10 +47,10 @@ mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum,
int conv_arg, MonoType **conv_arg_type,
MarshalAction action) MONO_INTERNAL;
-MonoString *
+MONO_API MonoString *
mono_string_from_bstr (gpointer bstr);
-void
+MONO_API void
mono_free_bstr (gpointer bstr);
#endif /* __MONO_COMINTEROP_H__ */
diff --git a/mono/metadata/console-unix.c b/mono/metadata/console-unix.c
index aae513f1a02..b8987c9ec3a 100644
--- a/mono/metadata/console-unix.c
+++ b/mono/metadata/console-unix.c
@@ -31,6 +31,7 @@
#include <mono/metadata/gc-internal.h>
#include <mono/metadata/metadata.h>
#include <mono/metadata/threadpool.h>
+#include <mono/utils/mono-signal-handler.h>
/* On solaris, curses.h must come before both termios.h and term.h */
#ifdef HAVE_CURSES_H
@@ -272,8 +273,8 @@ mono_console_handle_async_ops (void)
}
static gboolean in_sigint;
-static void
-sigint_handler (int signo)
+
+MONO_SIGNAL_HANDLER_FUNC (static, sigint_handler, (int signo))
{
int save_errno;
MONO_ARCH_SAVE_REGS;
@@ -291,8 +292,7 @@ sigint_handler (int signo)
static struct sigaction save_sigcont, save_sigint, save_sigwinch;
-static void
-sigcont_handler (int signo, void *the_siginfo, void *data)
+MONO_SIGNAL_HANDLER_FUNC (static, sigcont_handler, (int signo, void *the_siginfo, void *data))
{
int unused;
// Ignore error, there is not much we can do in the sigcont handler.
@@ -308,8 +308,7 @@ sigcont_handler (int signo, void *the_siginfo, void *data)
(*save_sigcont.sa_sigaction) (signo, the_siginfo, data);
}
-static void
-sigwinch_handler (int signo, void *the_siginfo, void *data)
+MONO_SIGNAL_HANDLER_FUNC (static, sigwinch_handler, (int signo, void *the_siginfo, void *data))
{
int dims = terminal_get_dimensions ();
if (dims != -1)
@@ -358,7 +357,7 @@ console_set_signal_handlers ()
sigaction (SIGCONT, &sigcont, &save_sigcont);
// Interrupt handler
- sigint.sa_handler = sigint_handler;
+ sigint.sa_handler = (void *) sigint_handler;
sigint.sa_flags = 0;
sigemptyset (&sigint.sa_mask);
sigaction (SIGINT, &sigint, &save_sigint);
@@ -452,10 +451,10 @@ ves_icall_System_ConsoleDriver_TtySetup (MonoString *keypad, MonoString *teardow
if (dims == -1){
int cols = 0, rows = 0;
- char *str = getenv ("COLUMNS");
+ const char *str = g_getenv ("COLUMNS");
if (str != NULL)
cols = atoi (str);
- str = getenv ("LINES");
+ str = g_getenv ("LINES");
if (str != NULL)
rows = atoi (str);
diff --git a/mono/metadata/console-win32.c b/mono/metadata/console-win32.c
index 6b940f3edfb..15efa5a3050 100644
--- a/mono/metadata/console-win32.c
+++ b/mono/metadata/console-win32.c
@@ -44,9 +44,11 @@ mono_console_handle_async_ops (void)
MonoBoolean
ves_icall_System_ConsoleDriver_Isatty (HANDLE handle)
{
+ DWORD mode;
+
MONO_ARCH_SAVE_REGS;
- return (GetFileType (handle) == FILE_TYPE_CHAR);
+ return GetConsoleMode (handle, &mode) != 0;
}
MonoBoolean
diff --git a/mono/metadata/culture-info-tables.h b/mono/metadata/culture-info-tables.h
index f8cc9249a17..c331662aec7 100644
--- a/mono/metadata/culture-info-tables.h
+++ b/mono/metadata/culture-info-tables.h
@@ -311,92 +311,92 @@ static const NumberFormatEntry number_format_entries [] = {
{35460, 35462, 35460, 35462, 35460, 35462, 35481, 35471, 35473, 35477, 35616, 35624, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35632, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 2, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 35636, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35534, 35471, 35639, 35477, 35644, 35449, 35656, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 0, 35477, 35588, 35660, 2601, 35458, 9, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 35502, 35471, 35670, 35477, 35439, 35449, 2601, 35458, 1, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 35686, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35690, 35700, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35534, 35471, 35639, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 0, 35477, 35588, 35644, 2601, 35458, 9, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 35502, 35471, 35654, 35477, 35439, 35449, 2601, 35458, 1, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 35670, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35674, 35684, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 0, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 35709, 35471, 35473, 35477, 35713, 35732, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35751, 35471, 35473, 35477, 35588, 35660, 2601, 35458, 9, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35754, 763, 35754, 763, 35754, 0, 35471, 35473, 35477, 35758, 35769, 35656, 35458, 2, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 35693, 35471, 35473, 35477, 35697, 35716, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35735, 35471, 35473, 35477, 35588, 35644, 2601, 35458, 9, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35738, 763, 35738, 763, 35738, 0, 35471, 35473, 35477, 35742, 35751, 2601, 35458, 2, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 0, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 35778, 35471, 35786, 35477, 35802, 35830, 2601, 35458, 5, 1, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35857, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 2, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 35760, 35471, 35768, 35477, 35784, 35812, 2601, 35458, 5, 1, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35839, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 2, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 35481, 35471, 0, 35477, 35510, 35522, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35860, 35471, 0, 35477, 35439, 35449, 2601, 35458, 5, 1, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 35534, 35471, 35864, 35477, 35644, 35449, 35656, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 35871, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35875, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 35878, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 3, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35883, 35471, 0, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 35886, 35471, 35890, 35477, 35439, 35449, 2601, 35458, 5, 1, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35842, 35471, 0, 35477, 35439, 35449, 2601, 35458, 5, 1, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 35534, 35471, 35846, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 35853, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35857, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 35860, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 3, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35865, 35471, 0, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 35868, 35471, 35872, 35477, 35439, 35449, 2601, 35458, 5, 1, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 0, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35906, 35920, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35888, 35902, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 35481, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 35933, 35471, 35936, 35477, 35950, 35964, 35656, 35458, 9, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 35975, 35471, 35864, 35477, 35978, 35991, 35656, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 35915, 35471, 35918, 35477, 35932, 35944, 2601, 35458, 9, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 35955, 35471, 35846, 35477, 35958, 35969, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35460, 35460, 35460, 35460, 35460, 0, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36001, 35419, 0, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36005, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36009, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 35979, 35419, 0, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35983, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35987, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 0, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 36015, 36025, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35993, 36003, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 0, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 10511, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 10511, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 10511, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 10511, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 2, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 0, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35534, 35471, 35864, 35477, 35644, 35449, 35656, 35458, 12, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36034, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {35460, 763, 35460, 763, 35460, 763, 35534, 35471, 35846, 35477, 35439, 35449, 2601, 35458, 12, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36012, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
{763, 35460, 763, 35460, 763, 35460, 35481, 35471, 0, 35477, 35439, 35449, 2601, 35458, 1, 0, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 35481, 35471, 35864, 35477, 35644, 35449, 35656, 35458, 12, 2, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 35481, 35471, 35846, 35477, 35439, 35449, 2601, 35458, 12, 2, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35481, 35471, 0, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36038, 35471, 0, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36016, 35471, 0, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 0, 35471, 0, 35477, 35439, 35449, 2601, 35458, 1, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 36041, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36048, 35471, 0, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 36019, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36026, 35471, 0, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 0, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36052, 35471, 36059, 35477, 35439, 35449, 2601, 35458, 12, 2, 2, 2, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36030, 35471, 36037, 35477, 35439, 35449, 2601, 35458, 12, 2, 2, 2, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
{35460, 35460, 35460, 35460, 35460, 35460, 0, 35471, 0, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36034, 35471, 36085, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {763, 35460, 763, 35460, 763, 35460, 36034, 35471, 0, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {763, 35460, 763, 35460, 763, 35460, 36034, 35471, 36117, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36034, 35471, 0, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36034, 35471, 36143, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {763, 35460, 763, 35460, 763, 35460, 36034, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 12, 2, 2, 2, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36034, 35471, 0, 35477, 35439, 35449, 2601, 35458, 12, 1, 1, 1, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36034, 35471, 36174, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36012, 35471, 36063, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {763, 35460, 763, 35460, 763, 35460, 36012, 35471, 0, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {763, 35460, 763, 35460, 763, 35460, 36012, 35471, 36095, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36012, 35471, 0, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36012, 35471, 36121, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {763, 35460, 763, 35460, 763, 35460, 36012, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 12, 2, 2, 2, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36012, 35471, 0, 35477, 35439, 35449, 2601, 35458, 12, 1, 1, 1, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36012, 35471, 36152, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
{35460, 35462, 35460, 35462, 35460, 35462, 0, 35471, 0, 35477, 35439, 35449, 2601, 35458, 5, 1, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36184, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 2, 0, 1, 1, 1, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36189, 35471, 0, 35477, 35439, 35449, 2601, 35458, 1, 0, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36192, 35471, 0, 35477, 35439, 35449, 2601, 35458, 5, 1, 1, 1, 2, 2, 2, 2, {3, -1}, {3, 0}, {3, 0}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36196, 35471, 0, 35477, 35439, 35449, 2601, 35458, 4, 1, 0, 0, 0, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
+ {763, 35460, 763, 35460, 763, 35460, 36162, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 2, 0, 1, 1, 1, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36167, 35471, 0, 35477, 35439, 35449, 2601, 35458, 1, 0, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 36170, 35471, 0, 35477, 35439, 35449, 2601, 35458, 5, 1, 1, 1, 2, 2, 2, 2, {3, -1}, {3, 0}, {3, 0}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36174, 35471, 0, 35477, 35439, 35449, 2601, 35458, 4, 1, 0, 0, 0, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
{35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36034, 35471, 0, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36200, 35471, 0, 35477, 35439, 35449, 2601, 35458, 14, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, 2}, {3, 2}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36208, 35471, 0, 35477, 35439, 35449, 2601, 35458, 1, 0, 1, 1, 1, 2, 1, 1, {3, 0}, {3, 0}, {3, 0}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36012, 35471, 0, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36178, 35471, 0, 35477, 35439, 35449, 2601, 35458, 14, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, 2}, {3, 2}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36186, 35471, 0, 35477, 35439, 35449, 2601, 35458, 1, 0, 1, 1, 1, 2, 1, 1, {3, 0}, {3, 0}, {3, 0}},
{35460, 35462, 35460, 35462, 35460, 35462, 0, 35471, 0, 35477, 35616, 35624, 2601, 35458, 8, 3, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36215, 35471, 0, 35477, 35439, 35449, 2601, 35458, 1, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, 2}, {3, 2}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36228, 35419, 0, 35477, 35439, 35449, 2601, 35458, 3, 0, 4, 2, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36231, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36193, 35471, 0, 35477, 35439, 35449, 2601, 35458, 1, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, 2}, {3, 2}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 36206, 35419, 0, 35477, 35439, 35449, 2601, 35458, 3, 0, 4, 2, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36209, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 0, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36235, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36213, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 10511, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35534, 35471, 35864, 35477, 35644, 35449, 35656, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36235, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36184, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, 0}, {3, 0}},
+ {35460, 763, 35460, 763, 35460, 763, 35534, 35471, 35846, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36213, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36162, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, 0}, {3, 0}},
{35460, 35462, 35460, 35462, 35460, 35462, 35481, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35460, 35460, 35460, 35460, 35460, 35481, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35754, 763, 35754, 763, 35754, 0, 35471, 35473, 35477, 35644, 35449, 35656, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35738, 763, 35738, 763, 35738, 0, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35460, 35460, 35460, 35460, 35460, 0, 35471, 0, 35477, 35439, 35449, 2601, 35458, 5, 1, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36239, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36189, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 36217, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36167, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35403, 35406, 35403, 35406, 35403, 35406, 35409, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 35465, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35485, 35494, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36242, 35471, 36246, 35477, 35439, 35449, 2601, 35458, 1, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36220, 35471, 36224, 35477, 35439, 35449, 2601, 35458, 1, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 35506, 35471, 35473, 35477, 35510, 35522, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 35534, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35537, 35548, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
@@ -406,1001 +406,1001 @@ static const NumberFormatEntry number_format_entries [] = {
{35460, 35462, 35460, 35462, 35460, 35462, 35481, 35471, 35473, 35477, 35616, 35624, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35632, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 2, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 35636, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35534, 35471, 35639, 35477, 35644, 35449, 35656, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 0, 35477, 35588, 35660, 2601, 35458, 9, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 35502, 35471, 35670, 35477, 35439, 35449, 2601, 35458, 1, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 35686, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35690, 35700, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35534, 35471, 35639, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 0, 35477, 35588, 35644, 2601, 35458, 9, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 35502, 35471, 35654, 35477, 35439, 35449, 2601, 35458, 1, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 35670, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35674, 35684, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 35534, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 35709, 35471, 35473, 35477, 35713, 35732, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35751, 35471, 35473, 35477, 35588, 35660, 2601, 35458, 9, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35754, 763, 35754, 763, 35754, 0, 35471, 35473, 35477, 35758, 35769, 35656, 35458, 2, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 35693, 35471, 35473, 35477, 35697, 35716, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35735, 35471, 35473, 35477, 35588, 35644, 2601, 35458, 9, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35738, 763, 35738, 763, 35738, 0, 35471, 35473, 35477, 35742, 35751, 2601, 35458, 2, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 0, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 35778, 35471, 35786, 35477, 35802, 35830, 2601, 35458, 5, 1, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35857, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 2, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 35760, 35471, 35768, 35477, 35784, 35812, 2601, 35458, 5, 1, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35839, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 2, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 35481, 35471, 0, 35477, 35510, 35522, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35860, 35471, 0, 35477, 35439, 35449, 2601, 35458, 5, 1, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 35534, 35471, 35864, 35477, 35644, 35449, 35656, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 35871, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35875, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 35878, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 3, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35883, 35471, 0, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 35886, 35471, 35890, 35477, 35439, 35449, 2601, 35458, 5, 1, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35842, 35471, 0, 35477, 35439, 35449, 2601, 35458, 5, 1, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 35534, 35471, 35846, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 35853, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35857, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 35860, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 3, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35865, 35471, 0, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 35868, 35471, 35872, 35477, 35439, 35449, 2601, 35458, 5, 1, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 0, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35906, 35920, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35888, 35902, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 35481, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 35933, 35471, 35936, 35477, 35950, 35964, 35656, 35458, 9, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 35975, 35471, 35864, 35477, 35978, 35991, 35656, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36041, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36001, 35419, 0, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36005, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36009, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36256, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 36015, 36025, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 35915, 35471, 35918, 35477, 35932, 35944, 2601, 35458, 9, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 35955, 35471, 35846, 35477, 35958, 35969, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36019, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 35979, 35419, 0, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35983, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35987, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 36234, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35993, 36003, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 0, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 10511, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 10511, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 10511, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 10511, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 2, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 0, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35534, 35471, 35864, 35477, 35644, 35449, 35656, 35458, 12, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36034, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {35460, 763, 35460, 763, 35460, 763, 35534, 35471, 35846, 35477, 35439, 35449, 2601, 35458, 12, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36012, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
{763, 35460, 763, 35460, 763, 35460, 35481, 35471, 0, 35477, 35439, 35449, 2601, 35458, 1, 0, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 0, 35471, 35864, 35477, 35644, 35449, 35656, 35458, 12, 2, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36038, 35471, 0, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 36041, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36048, 35471, 0, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 36261, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36034, 35471, 36059, 35477, 35439, 35449, 2601, 35458, 12, 2, 2, 2, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36034, 35471, 36085, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {763, 35460, 763, 35460, 763, 35460, 36034, 35471, 0, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {763, 35460, 763, 35460, 763, 35460, 36034, 35471, 36117, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36034, 35471, 0, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36034, 35471, 36143, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {763, 35460, 763, 35460, 763, 35460, 36034, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 12, 2, 2, 2, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36034, 35471, 0, 35477, 35439, 35449, 2601, 35458, 12, 1, 1, 1, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36034, 35471, 36174, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {763, 35460, 763, 35460, 763, 35460, 36184, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 2, 0, 1, 1, 1, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36189, 35471, 0, 35477, 35439, 35449, 2601, 35458, 1, 0, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36192, 35471, 0, 35477, 35439, 35449, 2601, 35458, 5, 1, 1, 1, 2, 2, 2, 2, {3, -1}, {3, 0}, {3, 0}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36196, 35471, 0, 35477, 35439, 35449, 2601, 35458, 4, 1, 0, 0, 0, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 0, 35471, 35846, 35477, 35439, 35449, 2601, 35458, 12, 2, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36016, 35471, 0, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 36019, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36026, 35471, 0, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 36239, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36012, 35471, 36037, 35477, 35439, 35449, 2601, 35458, 12, 2, 2, 2, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36012, 35471, 36063, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {763, 35460, 763, 35460, 763, 35460, 36012, 35471, 0, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {763, 35460, 763, 35460, 763, 35460, 36012, 35471, 36095, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36012, 35471, 0, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36012, 35471, 36121, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {763, 35460, 763, 35460, 763, 35460, 36012, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 12, 2, 2, 2, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36012, 35471, 0, 35477, 35439, 35449, 2601, 35458, 12, 1, 1, 1, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36012, 35471, 36152, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {763, 35460, 763, 35460, 763, 35460, 36162, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 2, 0, 1, 1, 1, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36167, 35471, 0, 35477, 35439, 35449, 2601, 35458, 1, 0, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 36170, 35471, 0, 35477, 35439, 35449, 2601, 35458, 5, 1, 1, 1, 2, 2, 2, 2, {3, -1}, {3, 0}, {3, 0}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36174, 35471, 0, 35477, 35439, 35449, 2601, 35458, 4, 1, 0, 0, 0, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
{35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36034, 35471, 0, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36200, 35471, 0, 35477, 35439, 35449, 2601, 35458, 14, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, 2}, {3, 2}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36208, 35471, 0, 35477, 35439, 35449, 2601, 35458, 1, 0, 1, 1, 1, 2, 1, 1, {3, 0}, {3, 0}, {3, 0}},
- {763, 35460, 763, 35460, 763, 35460, 36215, 35471, 0, 35477, 35439, 35449, 2601, 35458, 1, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, 2}, {3, 2}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36228, 35419, 0, 35477, 35439, 35449, 2601, 35458, 3, 0, 4, 2, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36231, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36235, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36235, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36012, 35471, 0, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36178, 35471, 0, 35477, 35439, 35449, 2601, 35458, 14, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, 2}, {3, 2}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36186, 35471, 0, 35477, 35439, 35449, 2601, 35458, 1, 0, 1, 1, 1, 2, 1, 1, {3, 0}, {3, 0}, {3, 0}},
+ {763, 35460, 763, 35460, 763, 35460, 36193, 35471, 0, 35477, 35439, 35449, 2601, 35458, 1, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, 2}, {3, 2}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 36206, 35419, 0, 35477, 35439, 35449, 2601, 35458, 3, 0, 4, 2, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36209, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36213, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36213, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 10511, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 2, 2, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35534, 35471, 35864, 35477, 35644, 35449, 35656, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36235, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36184, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, 0}, {3, 0}},
+ {35460, 763, 35460, 763, 35460, 763, 35534, 35471, 35846, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36213, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36162, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, 0}, {3, 0}},
{35460, 35462, 35460, 35462, 35460, 35462, 35481, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35460, 35460, 35460, 35460, 35460, 35481, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35460, 35460, 35460, 35460, 35460, 0, 35471, 0, 35477, 35439, 35449, 2601, 35458, 5, 1, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36239, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36189, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36267, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 36217, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36167, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 36245, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35502, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 36277, 763, 36277, 763, 36277, 0, 35471, 35473, 35477, 35537, 35548, 2601, 35458, 2, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36189, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 36255, 763, 36255, 763, 36255, 0, 35471, 35473, 35477, 35537, 35548, 2601, 35458, 2, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36167, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35586, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35616, 35624, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 36277, 763, 36277, 763, 36277, 0, 35471, 0, 35477, 35588, 35660, 2601, 35458, 2, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35690, 35700, 2601, 35458, 12, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 35534, 35471, 35473, 35477, 35644, 35449, 35656, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 35481, 35471, 35473, 35477, 35588, 35660, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 35481, 35471, 35864, 35477, 35644, 35449, 35656, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36279, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 36255, 763, 36255, 763, 36255, 0, 35471, 0, 35477, 35588, 35644, 2601, 35458, 2, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35674, 35684, 2601, 35458, 12, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 35534, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 35481, 35471, 35473, 35477, 35588, 35644, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 35481, 35471, 35846, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 36257, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35481, 35471, 0, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 35586, 35471, 0, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 36287, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36294, 35471, 36059, 35477, 35439, 35449, 2601, 35458, 12, 2, 2, 2, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {35460, 35462, 35460, 35462, 35460, 35462, 36184, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 0, 1, 1, 1, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36298, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 35586, 35471, 36246, 35477, 35439, 35449, 2601, 35458, 0, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 36265, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36272, 35471, 36037, 35477, 35439, 35449, 2601, 35458, 12, 2, 2, 2, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 36162, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 0, 1, 1, 1, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 36276, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 35586, 35471, 36224, 35477, 35439, 35449, 2601, 35458, 0, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35537, 35548, 2601, 35458, 9, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35586, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 35586, 35471, 35473, 35477, 35616, 35624, 2601, 35458, 15, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 35481, 35471, 35864, 35477, 35644, 35449, 35656, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36308, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 0, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 35481, 35471, 35846, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 36286, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 0, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 0, 35471, 0, 35477, 35439, 35449, 2601, 35458, 0, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35537, 35548, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35586, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 7774, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 36277, 763, 36277, 763, 36277, 0, 35471, 35473, 35477, 35616, 35624, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36318, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 0, 35471, 36246, 35477, 35439, 35449, 2601, 35458, 0, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 36277, 763, 36277, 763, 36277, 0, 35471, 35473, 35477, 35537, 35548, 2601, 35458, 2, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 36255, 763, 36255, 763, 36255, 0, 35471, 35473, 35477, 35616, 35624, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 36296, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 0, 35471, 36224, 35477, 35439, 35449, 2601, 35458, 0, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 36255, 763, 36255, 763, 36255, 0, 35471, 35473, 35477, 35537, 35548, 2601, 35458, 2, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35586, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36328, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 36306, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35616, 35624, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36332, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 36310, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35481, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36342, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 14, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36320, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 14, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 35481, 35471, 35473, 35477, 35616, 35624, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36346, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36349, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 36324, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 36327, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 10511, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 2, 2, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35586, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36359, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36365, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 36337, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 36343, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35586, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 1, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36375, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36381, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 36353, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 36359, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 35586, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 14, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36391, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36396, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 36369, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 36374, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35586, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36406, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36410, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36418, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36384, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 36388, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 36396, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35586, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 35586, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36428, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 36406, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35586, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 35586, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 14, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 35481, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36438, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36231, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 36416, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36209, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 35586, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 9, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36448, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 36426, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 35586, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 14, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36458, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36468, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 14, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35403, 35406, 35403, 35406, 35403, 35406, 36472, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36034, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
- {35460, 763, 35460, 763, 35460, 763, 36482, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 14, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36485, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 36436, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 36446, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 14, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35403, 35406, 35403, 35406, 35403, 35406, 36450, 35419, 35422, 35436, 35439, 35449, 2601, 35458, 3, 2, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36012, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, 2}, {3, 2}, {3, 2}},
+ {35460, 763, 35460, 763, 35460, 763, 36460, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 14, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36463, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35586, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 0, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 2471, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36489, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 14, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36467, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 14, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35586, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 14, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{763, 35460, 763, 35460, 763, 35460, 35586, 35471, 35473, 35477, 35588, 35598, 2601, 35458, 0, 0, 0, 0, 1, 2, 2, 2, {3, -1}, {3, 0}, {3, 0}},
- {35460, 763, 35460, 763, 35460, 763, 36492, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36500, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36279, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36505, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 35534, 35471, 35473, 35477, 35644, 35449, 35656, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 36470, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 36478, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 36257, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36483, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 35534, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 763, 35460, 763, 35460, 763, 0, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36256, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 36287, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 763, 35460, 763, 35460, 763, 36234, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 36265, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 0, 35471, 0, 35477, 35439, 35449, 2601, 35458, 5, 1, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36508, 35471, 36246, 35477, 35439, 35449, 2601, 35458, 0, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36508, 35471, 36246, 35477, 35439, 35449, 2601, 35458, 0, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36486, 35471, 36224, 35477, 35439, 35449, 2601, 35458, 0, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {763, 35460, 763, 35460, 763, 35460, 36486, 35471, 36224, 35477, 35439, 35449, 2601, 35458, 0, 0, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
{35460, 35462, 35460, 35462, 35460, 35462, 35534, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 12, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 763, 35460, 763, 35460, 763, 36500, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35460, 35460, 35460, 35460, 35460, 36041, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
- {35460, 35462, 35460, 35462, 35460, 35462, 36261, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {35460, 35462, 35460, 35462, 35460, 35462, 36184, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 0, 1, 1, 1, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
+ {35460, 763, 35460, 763, 35460, 763, 36478, 35471, 35473, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35460, 35460, 35460, 35460, 35460, 36019, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 36239, 35471, 0, 35477, 35439, 35449, 2601, 35458, 8, 3, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
+ {35460, 35462, 35460, 35462, 35460, 35462, 36162, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 0, 1, 1, 1, 2, 2, 2, {3, 0}, {3, 0}, {3, 0}},
{35460, 35462, 35460, 35462, 35460, 35462, 0, 35471, 0, 35477, 35616, 35624, 2601, 35458, 8, 3, 0, 0, 3, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}},
- {763, 35460, 763, 35460, 763, 35460, 36235, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}}
+ {763, 35460, 763, 35460, 763, 35460, 36213, 35471, 0, 35477, 35439, 35449, 2601, 35458, 2, 2, 0, 0, 1, 2, 2, 2, {3, -1}, {3, -1}, {3, -1}}
};
static const CultureInfoEntry culture_entries [] = {
- {0x0001, 0x007F, 768, -1, 36512, 36515, 36522, 36537, 36541, 36512, 0, {0, 0, 36545, 0}, 0, 0, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x0002, 0x007F, 257, -1, 36573, 36576, 36586, 36605, 36609, 36573, 0, {36613, 0, 0, 0}, 1, 1, { 1251, 21025, 10007, 866, 0, ';' }},
- {0x0003, 0x007F, 257, -1, 36655, 36658, 36666, 36674, 36678, 36655, 0, {36682, 0, 0, 0}, 2, 2, { 1252, 500, 10000, 850, 0, ';' }},
- {0x0004, 0x0004, 257, -1, 36702, 36709, 36737, 36744, 36748, 36752, 0, {36755, 0, 0, 0}, 3, 3, { 936, 500, 10008, 936, 0, ',' }},
- {0x0004, 0x7804, 257, -1, 36762, 36770, 36737, 36744, 36748, 36752, 0, {36755, 0, 0, 0}, 4, 4, { 936, 500, 10008, 936, 0, ',' }},
- {0x0005, 0x007F, 257, -1, 36791, 36794, 36800, 36810, 36814, 36791, 0, {36818, 0, 0, 0}, 5, 5, { 1250, 500, 10029, 852, 0, ';' }},
- {0x0006, 0x007F, 257, -1, 36844, 36847, 36854, 36860, 36864, 36844, 0, {36868, 0, 0, 0}, 6, 6, { 1252, 20277, 10000, 850, 0, ';' }},
- {0x0007, 0x007F, 257, -1, 36889, 36892, 36899, 36907, 36911, 36889, 0, {36915, 0, 0, 0}, 7, 7, { 1252, 20273, 10000, 850, 0, ';' }},
- {0x0008, 0x007F, 257, -1, 36940, 36943, 36949, 36966, 36970, 36940, 0, {36974, 0, 0, 0}, 8, 8, { 1253, 20273, 10006, 737, 0, ';' }},
- {0x0009, 0x007F, 257, -1, 37016, 37019, 37019, 37027, 37031, 37016, 0, {37035, 0, 0, 0}, 9, 9, { 1252, 37, 10000, 437, 0, ',' }},
- {0x000A, 0x007F, 257, -1, 37054, 37057, 37065, 37074, 37078, 37054, 0, {37082, 0, 0, 0}, 10, 10, { 1252, 20284, 10000, 850, 0, ';' }},
- {0x000B, 0x007F, 257, -1, 37104, 37107, 37115, 37121, 37125, 37104, 0, {37129, 0, 0, 0}, 11, 11, { 1252, 20278, 10000, 850, 0, ';' }},
- {0x000C, 0x007F, 257, -1, 37154, 37157, 37164, 37174, 37178, 37154, 0, {37182, 0, 0, 0}, 12, 12, { 1252, 20297, 10000, 850, 0, ';' }},
- {0x000D, 0x007F, 257, -1, 37204, 37207, 37214, 37225, 37229, 37204, 0, {37233, 0, 0, 0}, 13, 13, { 1255, 500, 10005, 862, 1, ',' }},
- {0x000E, 0x007F, 257, -1, 37266, 37269, 37279, 37286, 37290, 37266, 0, {37294, 0, 0, 0}, 14, 14, { 1250, 500, 10029, 852, 0, ';' }},
- {0x000F, 0x007F, 257, -1, 37310, 37313, 37323, 37333, 37337, 37310, 0, {37341, 0, 0, 0}, 15, 15, { 1252, 20871, 10079, 850, 0, ';' }},
- {0x0010, 0x007F, 257, -1, 37361, 37364, 37372, 37381, 37385, 37361, 0, {37082, 0, 0, 0}, 16, 16, { 1252, 20280, 10000, 850, 0, ';' }},
- {0x0011, 0x007F, 257, -1, 37389, 37392, 37401, 37411, 37415, 37389, 0, {37419, 0, 0, 0}, 17, 17, { 932, 20290, 10001, 932, 0, ',' }},
- {0x0012, 0x007F, 257, -1, 37446, 37449, 37456, 37466, 37470, 37446, 0, {37474, 0, 0, 0}, 18, 18, { 949, 20833, 10003, 949, 0, ',' }},
- {0x0013, 0x007F, 257, -1, 37484, 37487, 37493, 37504, 37508, 37484, 0, {37512, 0, 0, 0}, 19, 19, { 1252, 500, 10000, 850, 0, ';' }},
- {0x0014, 0x007F, 257, -1, 37534, 37537, 37547, 37553, 37557, 37561, 0, {36868, 0, 0, 0}, 20, 20, { 1252, 20277, 10000, 850, 0, ';' }},
- {0x0015, 0x007F, 257, -1, 37564, 37567, 37574, 37581, 37585, 37564, 0, {37589, 0, 0, 0}, 21, 21, { 1250, 20880, 10029, 852, 0, ';' }},
- {0x0016, 0x007F, 257, -1, 37613, 37616, 37627, 37638, 37642, 37613, 0, {37646, 0, 0, 0}, 22, 22, { 1252, 500, 10000, 850, 0, ';' }},
- {0x0017, 0x007F, 257, -1, 37669, 37672, 37680, 37690, 37694, 37669, 0, {37698, 0, 0, 0}, 23, 23, { 1252, 20273, 10000, 850, 0, ';' }},
- {0x0018, 0x007F, 257, -1, 37718, 37721, 37730, 37739, 37743, 37718, 0, {37747, 0, 0, 0}, 24, 24, { 1250, 20880, 10029, 852, 0, ';' }},
- {0x0019, 0x007F, 257, -1, 37766, 37769, 37777, 37792, 37796, 37766, 0, {37800, 0, 0, 0}, 25, 25, { 1251, 20880, 10007, 866, 0, ';' }},
- {0x001A, 0x007F, 257, -1, 37846, 37849, 37858, 37867, 37871, 37846, 0, {37875, 0, 0, 0}, 26, 26, { 1250, 500, 10082, 852, 0, ';' }},
- {0x001B, 0x007F, 257, -1, 37898, 37901, 37908, 37920, 37924, 37898, 0, {37928, 0, 0, 0}, 27, 27, { 1250, 20880, 10029, 852, 0, ';' }},
- {0x001C, 0x007F, 257, -1, 37952, 37955, 37964, 37970, 37974, 37952, 0, {0, 0, 0, 0}, 28, 28, { 1250, 20880, 10029, 852, 0, ';' }},
- {0x001D, 0x007F, 257, -1, 37978, 37981, 37989, 37997, 38001, 37978, 0, {36868, 0, 0, 0}, 29, 29, { 1252, 20278, 10000, 850, 0, ';' }},
- {0x001E, 0x007F, 512, -1, 38005, 38008, 38013, 38023, 38027, 38005, 0, {0, 38031, 0, 0}, 30, 30, { 874, 20838, 10021, 874, 0, ',' }},
- {0x001F, 0x007F, 257, -1, 38062, 38065, 38073, 38082, 38086, 38062, 0, {38090, 0, 0, 0}, 31, 31, { 1254, 20905, 10081, 857, 0, ';' }},
- {0x0020, 0x007F, 257, -1, 38104, 38107, 38112, 38121, 38125, 38104, 0, {38129, 0, 0, 0}, 32, 32, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x0021, 0x007F, 257, -1, 38159, 38162, 38173, 38190, 38194, 38159, 0, {38198, 0, 0, 0}, 33, 33, { 1252, 500, 10000, 850, 0, ';' }},
- {0x0022, 0x007F, 257, -1, 38217, 38220, 38230, 38251, 38255, 38217, 0, {38259, 0, 0, 0}, 34, 34, { 1251, 500, 10017, 866, 0, ';' }},
- {0x0023, 0x007F, 257, -1, 38305, 38308, 38319, 38340, 38344, 38305, 0, {38348, 0, 0, 0}, 35, 35, { 1251, 500, 10007, 866, 0, ';' }},
- {0x0024, 0x007F, 257, -1, 38390, 38393, 38403, 38417, 38421, 38390, 0, {38425, 0, 0, 0}, 36, 36, { 1250, 20880, 10029, 852, 0, ';' }},
- {0x0025, 0x007F, 257, -1, 38447, 38450, 38459, 38465, 38469, 38447, 0, {38473, 0, 0, 0}, 37, 37, { 1257, 500, 10029, 775, 0, ';' }},
- {0x0026, 0x007F, 257, -1, 38493, 38496, 38504, 38514, 38518, 38493, 0, {38522, 0, 0, 0}, 38, 38, { 1257, 500, 10029, 775, 0, ';' }},
- {0x0027, 0x007F, 257, -1, 38541, 38544, 38555, 38565, 38569, 38541, 0, {38573, 0, 0, 0}, 39, 39, { 1257, 500, 10029, 775, 0, ';' }},
- {0x0028, 0x007F, 257, -1, 38596, 38599, 0, 38605, 38609, 38596, 0, {0, 0, 0, 0}, 40, 40, { 1251, 20880, 10007, 866, 0, ';' }},
- {0x0029, 0x007F, 257, -1, 38613, 38616, 38624, 38635, 38639, 38613, 0, {38643, 0, 0, 0}, 41, 41, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x002A, 0x007F, 257, -1, 38667, 38670, 38681, 38696, 4121, 38667, 0, {38700, 0, 0, 0}, 42, 42, { 1258, 500, 10000, 1258, 0, ',' }},
- {0x002B, 0x007F, 257, -1, 38715, 38718, 38727, 38742, 38746, 38715, 0, {0, 0, 0, 0}, 43, 43, { 0, 500, 2, 1, 0, ',' }},
- {0x002C, 0x007F, 257, -1, 14519, 38750, 38762, 38776, 38780, 14519, 0, {38784, 0, 0, 0}, 44, 44, { 1254, 20905, 10081, 857, 0, ';' }},
- {0x002D, 0x007F, 257, -1, 38802, 38805, 38812, 38820, 38824, 38802, 0, {38828, 0, 0, 0}, 45, 45, { 1252, 500, 10000, 850, 0, ';' }},
- {0x002F, 0x007F, 257, -1, 38848, 38851, 38862, 38883, 38887, 38848, 0, {38891, 0, 0, 0}, 46, 46, { 1251, 500, 10007, 866, 0, ';' }},
- {0x0032, 0x007F, 257, -1, 38935, 38938, 38945, 38954, 38958, 38935, 0, {0, 0, 0, 0}, 47, 47, { 1252, 500, 10000, 850, 0, ',' }},
- {0x0034, 0x007F, 257, -1, 38962, 38965, 38971, 38980, 38984, 38962, 0, {0, 0, 0, 0}, 48, 48, { 1252, 500, 10000, 850, 0, ',' }},
- {0x0035, 0x007F, 257, -1, 38988, 38991, 38996, 39004, 39008, 38988, 0, {39012, 0, 0, 0}, 49, 49, { 1252, 500, 10000, 850, 0, ',' }},
- {0x0036, 0x007F, 257, -1, 39033, 39036, 39036, 39046, 39050, 39033, 0, {39054, 0, 0, 0}, 50, 50, { 1252, 500, 10000, 850, 0, ',' }},
- {0x0037, 0x007F, 257, -1, 39074, 39077, 39086, 39108, 39112, 39074, 0, {39116, 0, 0, 0}, 51, 51, { 0, 500, 2, 1, 0, ';' }},
- {0x0038, 0x007F, 257, -1, 39181, 39184, 39192, 39202, 39206, 39181, 0, {0, 0, 0, 0}, 52, 52, { 1252, 20277, 10079, 850, 0, ';' }},
- {0x0039, 0x007F, 257, -1, 39210, 39213, 39219, 39238, 39242, 39210, 0, {39246, 0, 0, 0}, 53, 53, { 0, 500, 2, 1, 0, ',' }},
- {0x003A, 0x007F, 257, -1, 39287, 39290, 39298, 39304, 39308, 39287, 0, {39312, 0, 0, 0}, 54, 54, { 0, 500, 2, 1, 0, ',' }},
- {0x003B, 0x007F, 257, -1, 39333, 39336, 39350, 39367, 39371, 39333, 0, {0, 0, 0, 0}, 55, 55, { 1252, 20277, 10000, 850, 0, ';' }},
- {0x003C, 0x007F, 257, -1, 39375, 39378, 39384, 39392, 39396, 39375, 0, {39400, 0, 0, 0}, 56, 56, { 1252, 500, 10000, 850, 0, ',' }},
- {0x003E, 0x007F, 257, -1, 39421, 39424, 39430, 39444, 39448, 39421, 0, {39452, 0, 0, 0}, 57, 57, { 1252, 500, 10000, 850, 0, ';' }},
- {0x003F, 0x007F, 257, -1, 39469, 39472, 39479, 39499, 39503, 39469, 0, {39507, 0, 0, 0}, 58, 58, { 0, 500, 2, 1, 0, ';' }},
- {0x0040, 0x007F, 257, -1, 39549, 39552, 39560, 39573, 39577, 39549, 0, {0, 0, 0, 0}, 59, 59, { 1251, 20880, 10007, 866, 0, ';' }},
- {0x0041, 0x007F, 257, -1, 39581, 39584, 39592, 39602, 39606, 39581, 0, {39610, 0, 0, 0}, 60, 60, { 1252, 500, 10000, 437, 0, ',' }},
- {0x0043, 0x007F, 257, -1, 39631, 39634, 39640, 39651, 39655, 39631, 0, {0, 0, 0, 0}, 61, 61, { 1254, 500, 10029, 857, 0, ';' }},
- {0x0045, 0x007F, 257, -1, 39659, 39662, 39670, 39686, 39690, 39659, 0, {39694, 0, 0, 0}, 62, 62, { 0, 500, 2, 1, 0, ',' }},
- {0x0046, 0x007F, 257, -1, 39759, 39762, 39770, 39789, 39793, 39759, 0, {0, 0, 0, 0}, 63, 63, { 0, 500, 2, 1, 0, ',' }},
- {0x0047, 0x007F, 257, -1, 39797, 39800, 39809, 39831, 39835, 39797, 0, {39839, 0, 0, 0}, 64, 64, { 0, 500, 2, 1, 0, ',' }},
- {0x0048, 0x007F, 257, -1, 14525, 39895, 39901, 39917, 39921, 14525, 0, {0, 0, 0, 0}, 65, 65, { 0, 500, 2, 1, 0, ',' }},
- {0x0049, 0x007F, 257, -1, 39925, 39928, 39934, 39950, 39954, 39925, 0, {39958, 0, 0, 0}, 66, 66, { 0, 500, 2, 1, 0, ',' }},
- {0x004A, 0x007F, 257, -1, 40023, 40026, 40033, 40052, 40056, 40023, 0, {40060, 0, 0, 0}, 67, 67, { 0, 500, 2, 1, 0, ',' }},
- {0x004B, 0x007F, 257, -1, 35857, 40125, 40133, 40149, 40153, 35857, 0, {40157, 0, 0, 0}, 68, 68, { 0, 500, 2, 1, 0, ',' }},
- {0x004C, 0x007F, 257, -1, 40228, 40231, 40241, 40260, 40264, 40228, 0, {40268, 0, 0, 0}, 69, 69, { 0, 500, 2, 1, 0, ',' }},
- {0x004D, 0x007F, 257, -1, 14516, 40318, 40327, 40349, 40353, 14516, 0, {40357, 0, 0, 0}, 70, 70, { 0, 500, 2, 1, 0, ',' }},
- {0x004E, 0x007F, 257, -1, 40410, 40413, 40421, 40437, 2565, 40410, 0, {40441, 0, 0, 0}, 71, 71, { 0, 500, 2, 1, 0, ',' }},
- {0x0050, 0x007F, 257, -1, 40503, 40506, 40516, 40529, 40533, 40503, 0, {0, 0, 0, 0}, 72, 72, { 1251, 20880, 10007, 866, 0, ';' }},
- {0x0051, 0x007F, 257, -1, 40537, 40540, 40548, 40573, 40577, 40537, 0, {0, 0, 0, 0}, 73, 73, { 0, 500, 2, 1, 0, ',' }},
- {0x0052, 0x007F, 257, -1, 40581, 40584, 40590, 40598, 40602, 40581, 0, {0, 0, 0, 0}, 74, 74, { 1252, 20285, 10000, 850, 0, ',' }},
- {0x0053, 0x007F, 257, -1, 40606, 40609, 40615, 40643, 40647, 40606, 0, {0, 0, 0, 0}, 75, 75, { 0, 500, 2, 1, 0, ',' }},
- {0x0054, 0x007F, 257, -1, 40651, 40654, 40658, 40668, 40672, 40651, 0, {0, 0, 0, 0}, 76, 76, { 0, 500, 2, 1, 0, ',' }},
- {0x0056, 0x007F, 257, -1, 40676, 40679, 40688, 40695, 40699, 40676, 0, {37082, 0, 0, 0}, 77, 77, { 1252, 500, 10000, 850, 0, ';' }},
- {0x0057, 0x007F, 257, -1, 40703, 40707, 40715, 40734, 40703, 40703, 0, {0, 0, 0, 0}, 78, 78, { 0, 500, 2, 1, 0, ',' }},
- {0x005B, 0x007F, 257, -1, 40738, 40741, 40749, 40765, 40769, 40738, 0, {40773, 0, 0, 0}, 79, 79, { 0, 500, 2, 1, 0, ',' }},
- {0x005E, 0x007F, 257, -1, 7865, 40795, 40803, 40816, 40820, 7865, 0, {40824, 0, 0, 0}, 80, 80, { 0, 500, 2, 1, 0, ';' }},
- {0x005F, 0x007F, 257, -1, 40869, 40873, 40899, 40909, 40869, 40869, 0, {0, 0, 0, 0}, 81, 81, { 1252, 20297, 10000, 850, 0, ';' }},
- {0x0061, 0x007F, 257, -1, 2059, 40913, 40920, 40939, 40943, 2059, 0, {40947, 0, 0, 0}, 82, 82, { 0, 500, 2, 1, 0, ',' }},
- {0x0063, 0x007F, 1024, -1, 40997, 41000, 41007, 41016, 41020, 40997, 0, {0, 0, 0, 0}, 83, 83, { 0, 500, 2, 1, 1, ';' }},
- {0x0064, 0x007F, 257, -1, 41024, 41028, 41028, 41037, 41024, 41024, 0, {41041, 0, 0, 0}, 84, 84, { 1252, 500, 10000, 437, 0, ',' }},
- {0x0068, 0x007F, 257, -1, 41064, 41067, 41067, 41073, 41077, 41064, 0, {0, 0, 0, 0}, 85, 85, { 1252, 37, 10000, 437, 0, ',' }},
- {0x006A, 0x007F, 257, -1, 41081, 41084, 41091, 41106, 41110, 41081, 0, {0, 0, 0, 0}, 86, 86, { 1252, 37, 10000, 437, 0, ',' }},
- {0x006C, 0x007F, 257, -1, 41114, 41118, 41133, 41150, 41114, 41114, 0, {0, 0, 0, 0}, 87, 87, { 1252, 500, 10000, 850, 0, ',' }},
- {0x006F, 0x007F, 257, -1, 41154, 41157, 41169, 41181, 41185, 41154, 0, {0, 0, 0, 0}, 88, 88, { 1252, 20277, 10000, 850, 0, ';' }},
- {0x0070, 0x007F, 257, -1, 14510, 41189, 41189, 41194, 41198, 14510, 0, {0, 0, 0, 0}, 89, 89, { 1252, 37, 10000, 437, 0, ',' }},
- {0x0078, 0x007F, 257, -1, 41202, 41205, 41216, 41226, 41230, 41202, 0, {41234, 0, 0, 0}, 90, 90, { 0, 500, 2, 1, 0, ',' }},
- {0x007E, 0x007F, 257, -1, 41247, 41250, 41257, 41267, 41271, 41247, 0, {41275, 0, 0, 0}, 91, 91, { 1252, 20297, 10000, 850, 0, ';' }},
- {0x0082, 0x007F, 257, -1, 41295, 41298, 41306, 41314, 41318, 41295, 0, {0, 0, 0, 0}, 92, 92, { 1252, 20297, 10000, 850, 0, ';' }},
- {0x0084, 0x007F, 257, -1, 41322, 41326, 41339, 41358, 41322, 41322, 0, {41362, 0, 0, 0}, 93, 93, { 1252, 20297, 10000, 850, 0, ';' }},
- {0x0085, 0x007F, 257, -1, 41387, 41391, 41397, 41415, 41387, 41387, 0, {0, 0, 0, 0}, 94, 94, { 1251, 20880, 10007, 866, 0, ';' }},
- {0x0087, 0x007F, 257, -1, 41419, 41422, 41422, 41434, 41438, 41419, 0, {0, 0, 0, 0}, 95, 95, { 1252, 37, 10000, 437, 0, ';' }},
- {0x0091, 0x007F, 257, -1, 41442, 41445, 41461, 41471, 41475, 41442, 0, {41479, 0, 0, 0}, 96, 96, { 1252, 20285, 10000, 850, 0, ',' }},
- {0x0401, 0x0001, 768, 98, 41504, 41510, 41532, 36537, 36541, 36512, 13258, {0, 0, 36545, 0}, 97, 97, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x0402, 0x0002, 257, 11, 41596, 41602, 41623, 36605, 36609, 36573, 41661, {36613, 0, 0, 0}, 98, 98, { 1251, 21025, 10007, 866, 0, ';' }},
- {0x0403, 0x0003, 257, 32, 41664, 41670, 41686, 36674, 36678, 36655, 41704, {36682, 0, 0, 0}, 99, 99, { 1252, 500, 10000, 850, 0, ';' }},
- {0x0404, 0x7C04, 257, 110, 41707, 41713, 41735, 41751, 36748, 36752, 41755, {41758, 0, 0, 0}, 100, 100, { 950, 500, 10002, 950, 0, ',' }},
- {0x0405, 0x0005, 257, 24, 41765, 41771, 41794, 36810, 36814, 36791, 41824, {36818, 0, 0, 0}, 101, 101, { 1250, 500, 10029, 852, 0, ';' }},
- {0x0406, 0x0006, 257, 26, 41827, 41833, 41850, 36860, 36864, 36844, 41866, {36868, 0, 0, 0}, 102, 102, { 1252, 20277, 10000, 850, 0, ';' }},
- {0x0407, 0x0007, 257, 25, 41869, 41875, 41892, 36907, 36911, 36889, 41914, {36915, 0, 0, 0}, 103, 103, { 1252, 20273, 10000, 850, 0, ';' }},
- {0x0408, 0x0008, 257, 40, 41917, 41923, 41938, 36966, 36970, 36940, 41970, {36974, 0, 0, 0}, 104, 104, { 1253, 20273, 10006, 737, 0, ';' }},
- {0x0409, 0x0009, 257, 112, 41973, 41979, 41979, 37027, 37031, 37016, 42003, {37035, 0, 0, 0}, 105, 105, { 1252, 37, 10000, 437, 0, ',' }},
- {0x040B, 0x000B, 257, 34, 42006, 42012, 42030, 37121, 37125, 37104, 42044, {37129, 0, 0, 0}, 106, 106, { 1252, 20278, 10000, 850, 0, ';' }},
- {0x040C, 0x000C, 257, 36, 42047, 42053, 42069, 37174, 37178, 37154, 42088, {37182, 0, 0, 0}, 107, 107, { 1252, 20297, 10000, 850, 0, ';' }},
- {0x040D, 0x000D, 257, 48, 42091, 42097, 42113, 37225, 37229, 37204, 42137, {37233, 0, 0, 0}, 108, 108, { 1255, 500, 10005, 862, 1, ',' }},
- {0x040E, 0x000E, 257, 45, 42140, 42146, 42166, 37286, 37290, 37266, 42189, {37294, 0, 0, 0}, 109, 109, { 1250, 500, 10029, 852, 0, ';' }},
- {0x040F, 0x000F, 257, 52, 42192, 42198, 42218, 37333, 37337, 37310, 42238, {37341, 0, 0, 0}, 110, 110, { 1252, 20871, 10079, 850, 0, ';' }},
- {0x0410, 0x0010, 257, 53, 42241, 42247, 42263, 37381, 37385, 37361, 42281, {37082, 0, 0, 0}, 111, 111, { 1252, 20280, 10000, 850, 0, ';' }},
- {0x0411, 0x0011, 257, 56, 42284, 42290, 42307, 37411, 37415, 37389, 42326, {37419, 0, 0, 0}, 112, 112, { 932, 20290, 10001, 932, 0, ',' }},
- {0x0412, 0x0012, 257, 60, 42329, 42335, 42356, 37466, 37470, 37446, 42381, {37474, 0, 0, 0}, 113, 113, { 949, 20833, 10003, 949, 0, ',' }},
- {0x0413, 0x0013, 257, 80, 42384, 42390, 42410, 37504, 37508, 37484, 42433, {37512, 0, 0, 0}, 114, 114, { 1252, 500, 10000, 850, 0, ';' }},
- {0x0414, 0x7C14, 257, 81, 42436, 42442, 42469, 37553, 37557, 37561, 42491, {36868, 0, 0, 0}, 115, 115, { 1252, 20277, 10000, 850, 0, ';' }},
- {0x0415, 0x0015, 257, 89, 42494, 42500, 42516, 37581, 37585, 37564, 42532, {37589, 0, 0, 0}, 116, 116, { 1250, 20880, 10029, 852, 0, ';' }},
- {0x0416, 0x0016, 257, 15, 42535, 42541, 42561, 37638, 37642, 37613, 42581, {37646, 0, 0, 0}, 117, 117, { 1252, 500, 10000, 850, 0, ';' }},
- {0x0417, 0x0017, 257, 19, 42584, 42590, 42612, 37690, 37694, 37669, 13261, {37698, 0, 0, 0}, 118, 118, { 1252, 20273, 10000, 850, 0, ';' }},
- {0x0418, 0x0018, 257, 94, 42631, 42637, 42656, 37739, 37743, 37718, 42676, {37747, 0, 0, 0}, 119, 119, { 1250, 20880, 10029, 852, 0, ';' }},
- {0x0419, 0x0019, 257, 96, 42679, 42685, 42702, 37792, 37796, 37766, 42732, {37800, 0, 0, 0}, 120, 120, { 1251, 20880, 10007, 866, 0, ';' }},
- {0x041A, 0x001A, 257, 44, 42735, 42741, 42760, 37867, 37871, 37846, 42780, {37875, 0, 0, 0}, 121, 121, { 1250, 500, 10082, 852, 0, ';' }},
- {0x041B, 0x001B, 257, 102, 42783, 42789, 42807, 37920, 37924, 37898, 42842, {37928, 0, 0, 0}, 122, 122, { 1250, 20880, 10029, 852, 0, ';' }},
- {0x041C, 0x001C, 257, 2, 42845, 42851, 42870, 37970, 37974, 37952, 42889, {0, 0, 0, 0}, 123, 123, { 1250, 20880, 10029, 852, 0, ';' }},
- {0x041D, 0x001D, 257, 99, 42892, 42898, 42915, 37997, 38001, 37978, 42933, {36868, 0, 0, 0}, 124, 124, { 1252, 20278, 10000, 850, 0, ';' }},
- {0x041E, 0x001E, 512, 105, 42936, 42942, 42958, 38023, 38027, 38005, 42980, {0, 38031, 0, 0}, 125, 125, { 874, 20838, 10021, 874, 0, ',' }},
- {0x041F, 0x001F, 257, 108, 42983, 42989, 43006, 38082, 38086, 38062, 43026, {38090, 0, 0, 0}, 126, 126, { 1254, 20905, 10081, 857, 0, ';' }},
- {0x0420, 0x0020, 257, 88, 43029, 43035, 43051, 38121, 38125, 38104, 43077, {38129, 0, 0, 0}, 127, 127, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x0421, 0x0021, 257, 46, 43080, 43086, 43109, 38190, 38194, 38159, 43138, {38198, 0, 0, 0}, 128, 128, { 1252, 500, 10000, 850, 0, ';' }},
- {0x0422, 0x0022, 257, 111, 43141, 43147, 43167, 38251, 38255, 38217, 43205, {38259, 0, 0, 0}, 129, 129, { 1251, 500, 10017, 866, 0, ';' }},
- {0x0423, 0x0023, 257, 16, 43208, 43214, 43235, 38340, 38344, 38305, 43275, {38348, 0, 0, 0}, 130, 130, { 1251, 500, 10007, 866, 0, ';' }},
- {0x0424, 0x0024, 257, 101, 43278, 43284, 43305, 38417, 38421, 38390, 43331, {38425, 0, 0, 0}, 131, 131, { 1250, 20880, 10029, 852, 0, ';' }},
- {0x0425, 0x0025, 257, 30, 43334, 43340, 43359, 38465, 38469, 38447, 43373, {38473, 0, 0, 0}, 132, 132, { 1257, 500, 10029, 775, 0, ';' }},
- {0x0426, 0x0026, 257, 68, 43376, 43382, 43399, 38514, 38518, 38493, 43419, {38522, 0, 0, 0}, 133, 133, { 1257, 500, 10029, 775, 0, ';' }},
- {0x0427, 0x0027, 257, 66, 43422, 43428, 43451, 38565, 38569, 38541, 43471, {38573, 0, 0, 0}, 134, 134, { 1257, 500, 10029, 775, 0, ';' }},
- {0x0428, 0x7C28, 257, 106, 43474, 43485, 0, 38605, 38609, 38596, 43514, {0, 0, 0, 0}, 135, 135, { 1251, 20880, 10007, 866, 0, ';' }},
- {0x0429, 0x0029, 257, 51, 43517, 43523, 43538, 38635, 38639, 38613, 43562, {38643, 0, 0, 0}, 136, 136, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x042A, 0x002A, 257, 116, 43565, 43571, 43592, 38696, 4121, 38667, 43620, {38700, 0, 0, 0}, 137, 137, { 1258, 500, 10000, 1258, 0, ',' }},
- {0x042B, 0x002B, 257, 3, 43623, 43629, 43648, 38742, 38746, 38715, 3781, {0, 0, 0, 0}, 138, 138, { 0, 500, 2, 1, 0, ',' }},
- {0x042C, 0x782C, 257, 7, 43713, 43724, 43756, 38776, 38780, 14519, 43784, {38784, 0, 0, 0}, 139, 139, { 1254, 20905, 10081, 857, 0, ';' }},
- {0x042D, 0x002D, 257, 32, 43787, 43793, 43808, 38820, 38824, 38802, 41704, {38828, 0, 0, 0}, 140, 140, { 1252, 500, 10000, 850, 0, ';' }},
- {0x042F, 0x002F, 257, 73, 43827, 43833, 43856, 38883, 38887, 38848, 43900, {38891, 0, 0, 0}, 141, 141, { 1251, 500, 10007, 866, 0, ';' }},
- {0x0432, 0x0032, 257, 118, 43903, 43909, 38945, 38954, 38958, 38935, 43931, {0, 0, 0, 0}, 142, 142, { 1252, 500, 10000, 850, 0, ',' }},
- {0x0434, 0x0034, 257, 118, 43934, 43940, 38971, 38980, 38984, 38962, 43931, {0, 0, 0, 0}, 143, 143, { 1252, 500, 10000, 850, 0, ',' }},
- {0x0435, 0x0035, 257, 118, 43961, 43967, 43987, 39004, 39008, 38988, 43931, {39012, 0, 0, 0}, 144, 144, { 1252, 500, 10000, 850, 0, ',' }},
- {0x0436, 0x0036, 257, 118, 44015, 44021, 44046, 39046, 39050, 39033, 43931, {39054, 0, 0, 0}, 145, 145, { 1252, 500, 10000, 850, 0, ',' }},
- {0x0437, 0x0037, 257, 38, 44070, 44076, 44095, 39108, 39112, 39074, 44150, {39116, 0, 0, 0}, 146, 146, { 0, 500, 2, 1, 0, ';' }},
- {0x0438, 0x0038, 257, 35, 44153, 44159, 44183, 39202, 39206, 39181, 44204, {0, 0, 0, 0}, 147, 147, { 1252, 20277, 10079, 850, 0, ';' }},
- {0x0439, 0x0039, 257, 49, 44207, 44213, 44227, 39238, 39242, 39210, 44261, {39246, 0, 0, 0}, 148, 148, { 0, 500, 2, 1, 0, ',' }},
- {0x043A, 0x003A, 257, 75, 44264, 44270, 44286, 39304, 39308, 39287, 44300, {39312, 0, 0, 0}, 149, 149, { 0, 500, 2, 1, 0, ',' }},
- {0x043B, 0x003B, 257, 81, 44303, 44309, 44332, 39367, 39371, 39333, 42491, {0, 0, 0, 0}, 150, 150, { 1252, 20277, 10000, 850, 0, ';' }},
- {0x043E, 0x003E, 257, 77, 44357, 44363, 44380, 39444, 39448, 39421, 44405, {39452, 0, 0, 0}, 151, 151, { 1252, 500, 10000, 850, 0, ';' }},
- {0x0440, 0x0040, 257, 58, 44408, 44414, 44435, 39573, 39577, 39549, 44471, {0, 0, 0, 0}, 152, 152, { 1251, 20880, 10007, 866, 0, ';' }},
- {0x0441, 0x0041, 257, 57, 44474, 44480, 44496, 39602, 39606, 39581, 44514, {39610, 0, 0, 0}, 153, 153, { 1252, 500, 10000, 437, 0, ',' }},
- {0x0443, 0x7C43, 257, 114, 44517, 44528, 44554, 39651, 39655, 39631, 44588, {0, 0, 0, 0}, 154, 154, { 1254, 500, 10029, 857, 0, ';' }},
- {0x0445, 0x0045, 257, 49, 44591, 44597, 44613, 39686, 39690, 39659, 44261, {39694, 0, 0, 0}, 155, 155, { 0, 500, 2, 1, 0, ',' }},
- {0x0447, 0x0047, 257, 49, 44644, 44650, 44667, 39831, 39835, 39797, 44261, {39839, 0, 0, 0}, 156, 156, { 0, 500, 2, 1, 0, ',' }},
- {0x0448, 0x0048, 257, 49, 44704, 44710, 44724, 39917, 39921, 14525, 44261, {0, 0, 0, 0}, 157, 157, { 0, 500, 2, 1, 0, ',' }},
- {0x0449, 0x0049, 257, 49, 44755, 44761, 44775, 39950, 39954, 39925, 44261, {39958, 0, 0, 0}, 158, 158, { 0, 500, 2, 1, 0, ',' }},
- {0x044A, 0x004A, 257, 49, 44815, 44821, 44836, 40052, 40056, 40023, 44261, {40060, 0, 0, 0}, 159, 159, { 0, 500, 2, 1, 0, ',' }},
- {0x044B, 0x004B, 257, 49, 44883, 44889, 44905, 40149, 40153, 35857, 44261, {40157, 0, 0, 0}, 160, 160, { 0, 500, 2, 1, 0, ',' }},
- {0x044C, 0x004C, 257, 49, 44936, 44942, 44960, 40260, 40264, 40228, 44261, {40268, 0, 0, 0}, 161, 161, { 0, 500, 2, 1, 0, ',' }},
- {0x044D, 0x004D, 257, 49, 45000, 45006, 45023, 40349, 40353, 14516, 44261, {40357, 0, 0, 0}, 162, 162, { 0, 500, 2, 1, 0, ',' }},
- {0x044E, 0x004E, 257, 49, 45060, 45066, 45082, 40437, 2565, 40410, 44261, {40441, 0, 0, 0}, 163, 163, { 0, 500, 2, 1, 0, ',' }},
- {0x0451, 0x0051, 257, 21, 45113, 45119, 45135, 40573, 40577, 40537, 13340, {0, 0, 0, 0}, 164, 164, { 0, 500, 2, 1, 0, ',' }},
- {0x0452, 0x0052, 257, 37, 45181, 45187, 45210, 40598, 40602, 40581, 45233, {0, 0, 0, 0}, 165, 165, { 1252, 20285, 10000, 850, 0, ',' }},
- {0x0453, 0x0053, 257, 59, 45236, 45242, 45259, 40643, 40647, 40606, 45311, {0, 0, 0, 0}, 166, 166, { 0, 500, 2, 1, 0, ',' }},
- {0x0454, 0x0054, 257, 62, 45314, 45320, 45331, 40668, 40672, 40651, 45353, {0, 0, 0, 0}, 167, 167, { 0, 500, 2, 1, 0, ',' }},
- {0x0456, 0x0056, 257, 32, 45356, 45362, 45379, 40695, 40699, 40676, 41704, {37082, 0, 0, 0}, 168, 168, { 1252, 500, 10000, 850, 0, ';' }},
- {0x0457, 0x0057, 257, 49, 45396, 45403, 45419, 40734, 40703, 40703, 44261, {0, 0, 0, 0}, 169, 169, { 0, 500, 2, 1, 0, ',' }},
- {0x045B, 0x005B, 257, 65, 45453, 45459, 45479, 40765, 40769, 40738, 45529, {40773, 0, 0, 0}, 170, 170, { 0, 500, 2, 1, 0, ',' }},
- {0x045E, 0x005E, 257, 33, 45532, 45538, 45557, 40816, 40820, 7865, 45588, {40824, 0, 0, 0}, 171, 171, { 0, 500, 2, 1, 0, ';' }},
- {0x0461, 0x0061, 257, 82, 45591, 45597, 45612, 40939, 40943, 2059, 45649, {40947, 0, 0, 0}, 172, 172, { 0, 500, 2, 1, 0, ',' }},
- {0x0463, 0x0063, 1024, 1, 45652, 45658, 45679, 41016, 41020, 40997, 45709, {0, 0, 0, 0}, 173, 173, { 0, 500, 2, 1, 1, ';' }},
- {0x0464, 0x0064, 257, 87, 45712, 45719, 45742, 41037, 41024, 41024, 45763, {41041, 0, 0, 0}, 174, 174, { 1252, 500, 10000, 437, 0, ',' }},
- {0x0468, 0x7C68, 257, 78, 45766, 45777, 45800, 41073, 41077, 41064, 45817, {0, 0, 0, 0}, 175, 175, { 1252, 37, 10000, 437, 0, ',' }},
- {0x046A, 0x006A, 257, 78, 45820, 45826, 45843, 41106, 41110, 41081, 45817, {0, 0, 0, 0}, 176, 176, { 1252, 37, 10000, 437, 0, ',' }},
- {0x046C, 0x006C, 257, 118, 45889, 45896, 41133, 41150, 41114, 41114, 43931, {0, 0, 0, 0}, 177, 177, { 1252, 500, 10000, 850, 0, ',' }},
- {0x046F, 0x006F, 257, 39, 45926, 45932, 45956, 41181, 41185, 41154, 45987, {0, 0, 0, 0}, 178, 178, { 1252, 20277, 10000, 850, 0, ';' }},
- {0x0470, 0x0070, 257, 78, 45990, 45996, 45996, 41194, 41198, 14510, 45817, {0, 0, 0, 0}, 179, 179, { 1252, 37, 10000, 437, 0, ',' }},
- {0x0478, 0x0078, 257, 21, 46011, 46017, 46036, 41226, 41230, 41202, 13340, {41234, 0, 0, 0}, 180, 180, { 0, 500, 2, 1, 0, ',' }},
- {0x047E, 0x007E, 257, 36, 46055, 46061, 46077, 41267, 41271, 41247, 42088, {41275, 0, 0, 0}, 181, 181, { 1252, 20297, 10000, 850, 0, ';' }},
- {0x0482, 0x0082, 257, 36, 46096, 46102, 46119, 41314, 41318, 41295, 42088, {0, 0, 0, 0}, 182, 182, { 1252, 20297, 10000, 850, 0, ';' }},
- {0x0485, 0x0085, 257, 96, 46137, 46144, 41397, 41415, 41387, 41387, 42732, {0, 0, 0, 0}, 183, 183, { 1251, 20880, 10007, 866, 0, ';' }},
- {0x0487, 0x0087, 257, 97, 46159, 46165, 46165, 41434, 41438, 41419, 46186, {0, 0, 0, 0}, 184, 184, { 1252, 37, 10000, 437, 0, ';' }},
- {0x0491, 0x0091, 257, 37, 46189, 46195, 46228, 41471, 41475, 41442, 45233, {41479, 0, 0, 0}, 185, 185, { 1252, 20285, 10000, 850, 0, ',' }},
- {0x0801, 0x0001, 257, 50, 46264, 46270, 46284, 46314, 36541, 36512, 46318, {36545, 0, 0, 0}, 186, 186, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x0804, 0x0004, 257, 21, 46321, 36770, 46327, 36744, 36748, 36752, 13340, {36755, 0, 0, 0}, 187, 187, { 936, 500, 10008, 936, 0, ',' }},
- {0x0807, 0x0007, 257, 19, 46343, 46349, 46370, 46388, 36911, 36889, 13261, {36915, 0, 0, 0}, 188, 188, { 1252, 20273, 10000, 850, 0, ';' }},
- {0x0809, 0x0009, 257, 37, 46392, 46398, 46398, 46423, 37031, 37016, 45233, {37035, 0, 0, 0}, 189, 189, { 1252, 20285, 10000, 850, 0, ',' }},
- {0x080A, 0x000A, 257, 76, 46427, 46433, 46450, 46469, 37078, 37054, 46473, {37082, 0, 0, 0}, 190, 190, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x080C, 0x000C, 257, 10, 46476, 46482, 46499, 46520, 37178, 37154, 46524, {37182, 0, 0, 0}, 191, 191, { 1252, 20297, 10000, 850, 0, ';' }},
- {0x0810, 0x0010, 257, 19, 46527, 46533, 46555, 46575, 37385, 37361, 13261, {37082, 0, 0, 0}, 192, 192, { 1252, 500, 10000, 850, 0, ';' }},
- {0x0813, 0x0013, 257, 10, 46579, 46585, 46601, 46622, 37508, 37484, 46524, {37512, 0, 0, 0}, 193, 193, { 1252, 500, 10000, 850, 0, ';' }},
- {0x0814, 0x7814, 257, 81, 46626, 46632, 46659, 46675, 46679, 46683, 42491, {36868, 0, 0, 0}, 194, 194, { 1252, 20277, 10000, 850, 0, ';' }},
- {0x0816, 0x0016, 257, 91, 46686, 46692, 46714, 46736, 37642, 37613, 46740, {37646, 0, 0, 0}, 195, 195, { 1252, 500, 10000, 850, 0, ';' }},
- {0x081D, 0x001D, 257, 34, 46743, 46749, 46767, 46785, 38001, 37978, 42044, {36868, 0, 0, 0}, 196, 196, { 1252, 20278, 10000, 850, 0, ';' }},
- {0x082C, 0x742C, 257, 7, 46789, 46800, 43756, 46835, 38780, 14519, 43784, {38784, 0, 0, 0}, 197, 197, { 1251, 20880, 10007, 866, 0, ';' }},
- {0x083C, 0x003C, 257, 47, 46839, 46845, 46861, 39392, 39396, 39375, 46877, {39400, 0, 0, 0}, 198, 198, { 1252, 500, 10000, 850, 0, ',' }},
- {0x083E, 0x003E, 257, 13, 46880, 46886, 46901, 46924, 39448, 39421, 46928, {39452, 0, 0, 0}, 199, 199, { 1252, 500, 10000, 850, 0, ';' }},
- {0x0843, 0x7843, 257, 114, 46931, 46942, 44554, 39651, 39655, 39631, 44588, {0, 0, 0, 0}, 200, 200, { 1251, 20880, 10007, 866, 0, ';' }},
- {0x0845, 0x0045, 257, 9, 46971, 46977, 46998, 47041, 39690, 39659, 47045, {39694, 0, 0, 0}, 201, 201, { 0, 500, 2, 1, 0, ',' }},
- {0x0850, 0x7C50, 257, 21, 47048, 47059, 40516, 47088, 40533, 40503, 13340, {0, 0, 0, 0}, 202, 202, { 0, 500, 2, 1, 0, ',' }},
- {0x0C01, 0x0001, 257, 31, 47092, 47098, 47113, 47137, 36541, 36512, 47141, {36545, 0, 0, 0}, 203, 203, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x0C04, 0x7C04, 257, 42, 47144, 47150, 47193, 47230, 36748, 36752, 47234, {41758, 0, 0, 0}, 204, 204, { 950, 500, 10002, 950, 0, ',' }},
- {0x0C07, 0x0007, 257, 5, 47237, 47243, 47260, 47282, 36911, 36889, 47286, {36915, 0, 0, 0}, 205, 205, { 1252, 20273, 10000, 850, 0, ';' }},
- {0x0C09, 0x0009, 257, 6, 47289, 47295, 47295, 47315, 37031, 37016, 47319, {37035, 0, 0, 0}, 206, 206, { 1252, 500, 10000, 850, 0, ',' }},
- {0x0C0A, 0x000A, 257, 32, 47322, 47328, 47344, 47363, 37078, 37054, 41704, {37082, 0, 0, 0}, 207, 207, { 1252, 20284, 10000, 850, 0, ';' }},
- {0x0C0C, 0x000C, 257, 18, 47367, 47373, 47389, 47408, 37178, 37154, 47412, {37182, 0, 0, 0}, 208, 208, { 1252, 20297, 10000, 850, 0, ';' }},
- {0x0C3B, 0x003B, 257, 34, 47415, 47421, 47445, 47471, 47475, 39333, 42044, {0, 0, 0, 0}, 209, 209, { 1252, 20278, 10000, 850, 0, ';' }},
- {0x1001, 0x0001, 257, 69, 47479, 47485, 47500, 47528, 36541, 36512, 47532, {36545, 0, 0, 0}, 210, 210, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x1004, 0x0004, 257, 100, 47535, 47541, 47573, 47592, 36748, 36752, 47596, {36755, 0, 0, 0}, 211, 211, { 936, 500, 10008, 936, 0, ',' }},
- {0x1007, 0x0007, 257, 67, 47599, 47605, 47625, 47645, 36911, 36889, 47649, {36915, 0, 0, 0}, 212, 212, { 1252, 20273, 10000, 850, 0, ';' }},
- {0x1009, 0x0009, 257, 18, 47652, 47658, 47658, 47675, 37031, 37016, 47412, {37035, 0, 0, 0}, 213, 213, { 1252, 37, 10000, 850, 0, ',' }},
- {0x100A, 0x000A, 257, 41, 47679, 47685, 47705, 47726, 37078, 37054, 47730, {37082, 0, 0, 0}, 214, 214, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x100C, 0x000C, 257, 19, 47733, 47739, 47760, 47779, 37178, 37154, 13261, {37182, 0, 0, 0}, 215, 215, { 1252, 20297, 10000, 850, 0, ';' }},
- {0x1401, 0x0001, 257, 28, 47783, 47789, 47806, 47838, 36541, 36512, 47842, {36545, 0, 0, 0}, 216, 216, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x1404, 0x7C04, 257, 74, 47845, 47851, 47890, 47927, 36748, 36752, 47931, {41758, 0, 0, 0}, 217, 217, { 950, 500, 10002, 950, 0, ',' }},
- {0x1407, 0x0007, 257, 64, 47934, 47940, 47963, 47987, 36911, 36889, 47991, {36915, 0, 0, 0}, 218, 218, { 1252, 20273, 10000, 850, 0, ';' }},
- {0x1409, 0x0009, 257, 83, 47994, 48000, 48000, 48022, 37031, 37016, 48026, {37035, 0, 0, 0}, 219, 219, { 1252, 500, 10000, 850, 0, ',' }},
- {0x140A, 0x000A, 257, 23, 48029, 48035, 48056, 48078, 37078, 37054, 48082, {37082, 0, 0, 0}, 220, 220, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x140C, 0x000C, 257, 67, 48085, 48091, 48111, 48134, 37178, 37154, 47649, {37182, 0, 0, 0}, 221, 221, { 1252, 20297, 10000, 850, 0, ';' }},
- {0x1801, 0x0001, 257, 70, 48138, 48144, 48161, 48191, 36541, 36512, 48195, {36545, 0, 0, 0}, 222, 222, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x1809, 0x0009, 257, 47, 48198, 48204, 48204, 48222, 37031, 37016, 46877, {37035, 0, 0, 0}, 223, 223, { 1252, 500, 10000, 850, 0, ',' }},
- {0x180A, 0x000A, 257, 85, 48226, 48232, 48249, 48268, 37078, 37054, 48272, {37082, 0, 0, 0}, 224, 224, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x180C, 0x000C, 257, 71, 48275, 48281, 48297, 48316, 37178, 37154, 48320, {37182, 0, 0, 0}, 225, 225, { 1252, 20297, 10000, 850, 0, ';' }},
- {0x181A, 0x701A, 257, 8, 48323, 48334, 48374, 48426, 48430, 48434, 48437, {48440, 0, 0, 0}, 226, 226, { 1250, 870, 10082, 852, 0, ';' }},
- {0x1C01, 0x0001, 257, 107, 48463, 48469, 48486, 48512, 36541, 36512, 48516, {36545, 0, 0, 0}, 227, 227, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x1C09, 0x0009, 257, 118, 48519, 48525, 48525, 48548, 37031, 37016, 43931, {37035, 0, 0, 0}, 228, 228, { 1252, 500, 10000, 437, 0, ',' }},
- {0x1C0A, 0x000A, 257, 27, 48552, 48558, 48587, 48620, 37078, 37054, 48624, {37082, 0, 0, 0}, 229, 229, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x1C1A, 0x6C1A, 257, 8, 48627, 48638, 48374, 48681, 48685, 48434, 48437, {38891, 0, 0, 0}, 230, 230, { 1251, 21025, 10007, 855, 0, ';' }},
- {0x2001, 0x0001, 257, 84, 48689, 48695, 48709, 48737, 36541, 36512, 48741, {36545, 0, 0, 0}, 231, 231, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x2009, 0x0009, 257, 54, 48744, 48750, 48750, 48768, 37031, 37016, 48772, {37035, 0, 0, 0}, 232, 232, { 1252, 500, 10000, 850, 0, ',' }},
- {0x200A, 0x000A, 257, 115, 48775, 48781, 48801, 48822, 37078, 37054, 48826, {37082, 0, 0, 0}, 233, 233, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x2401, 0x0001, 257, 117, 48829, 48835, 48850, 48878, 36541, 36512, 48882, {36545, 0, 0, 0}, 234, 234, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x240A, 0x000A, 257, 22, 48885, 48891, 48910, 48930, 37078, 37054, 48934, {37082, 0, 0, 0}, 235, 235, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x241A, 0x701A, 257, 95, 48937, 48948, 48972, 49000, 9243, 48434, 49004, {48440, 0, 0, 0}, 236, 236, { 1250, 500, 10029, 852, 0, ';' }},
- {0x2801, 0x0001, 257, 104, 49007, 49013, 49028, 49056, 36541, 36512, 49060, {36545, 0, 0, 0}, 237, 237, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x2809, 0x0009, 257, 17, 49063, 49069, 49069, 49086, 37031, 37016, 49090, {37035, 0, 0, 0}, 238, 238, { 1252, 500, 10000, 850, 0, ';' }},
- {0x280A, 0x000A, 257, 86, 49093, 49099, 49114, 49131, 37078, 37054, 49135, {37082, 0, 0, 0}, 239, 239, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x281A, 0x6C1A, 257, 95, 49138, 49149, 48972, 49176, 9243, 48434, 49004, {38891, 0, 0, 0}, 240, 240, { 1251, 21025, 10007, 855, 0, ';' }},
- {0x2C01, 0x0001, 257, 55, 49180, 49186, 49202, 49232, 36541, 36512, 49236, {36545, 0, 0, 0}, 241, 241, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x2C09, 0x0009, 257, 109, 49239, 49245, 49245, 49275, 37031, 37016, 49279, {37035, 0, 0, 0}, 242, 242, { 1252, 500, 10000, 850, 0, ';' }},
- {0x2C0A, 0x000A, 257, 4, 49282, 49288, 49308, 49329, 37078, 37054, 49333, {37082, 0, 0, 0}, 243, 243, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x2C1A, 0x701A, 257, 72, 49336, 49347, 49375, 49408, 9243, 48434, 49412, {48440, 0, 0, 0}, 244, 244, { 1250, 500, 10029, 852, 0, ';' }},
- {0x3001, 0x0001, 257, 63, 49415, 49421, 49438, 49466, 36541, 36512, 49470, {36545, 0, 0, 0}, 245, 245, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x3009, 0x0009, 257, 119, 49473, 49479, 49479, 49498, 37031, 37016, 49502, {37035, 0, 0, 0}, 246, 246, { 1252, 500, 10000, 437, 0, ',' }},
- {0x300A, 0x000A, 257, 29, 49505, 49511, 49529, 49548, 37078, 37054, 49552, {37082, 0, 0, 0}, 247, 247, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x301A, 0x6C1A, 257, 72, 49555, 49566, 49375, 49597, 9243, 48434, 49412, {38891, 0, 0, 0}, 248, 248, { 1251, 21025, 10007, 855, 0, ';' }},
- {0x3401, 0x0001, 257, 61, 49601, 49607, 49623, 49653, 36541, 36512, 49657, {36545, 0, 0, 0}, 249, 249, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x3409, 0x0009, 257, 87, 49660, 49666, 49666, 49688, 37031, 37016, 45763, {37035, 0, 0, 0}, 250, 250, { 1252, 500, 10000, 437, 0, ',' }},
- {0x340A, 0x000A, 257, 20, 49692, 49698, 49714, 49731, 37078, 37054, 49735, {37082, 0, 0, 0}, 251, 251, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x3801, 0x0001, 257, 0, 49738, 49744, 49774, 49838, 36541, 36512, 49842, {36545, 0, 0, 0}, 252, 252, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x380A, 0x000A, 257, 113, 49845, 49851, 49869, 49888, 37078, 37054, 49892, {37082, 0, 0, 0}, 253, 253, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x3C01, 0x0001, 257, 12, 49895, 49901, 49918, 49950, 36541, 36512, 49954, {36545, 0, 0, 0}, 254, 254, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x3C0A, 0x000A, 257, 92, 49957, 49963, 49982, 50002, 37078, 37054, 50006, {37082, 0, 0, 0}, 255, 255, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x4001, 0x0001, 257, 93, 50009, 50015, 50030, 50054, 36541, 36512, 50058, {36545, 0, 0, 0}, 256, 256, { 1256, 20420, 10004, 720, 1, ';' }},
- {0x4009, 0x0009, 257, 49, 50061, 50067, 50067, 50083, 37031, 37016, 44261, {37035, 0, 0, 0}, 257, 257, { 1252, 37, 10000, 437, 0, ',' }},
- {0x400A, 0x000A, 257, 14, 50087, 50093, 50111, 50130, 37078, 37054, 50134, {37082, 0, 0, 0}, 258, 258, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x440A, 0x000A, 257, 103, 50137, 50143, 50165, 50188, 37078, 37054, 50192, {37082, 0, 0, 0}, 259, 259, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x4809, 0x0009, 257, 100, 50195, 50201, 50201, 50221, 37031, 37016, 47596, {37035, 0, 0, 0}, 260, 260, { 1252, 37, 10000, 437, 0, ',' }},
- {0x480A, 0x000A, 257, 43, 50225, 50231, 50250, 50270, 37078, 37054, 50274, {37082, 0, 0, 0}, 261, 261, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x4C0A, 0x000A, 257, 79, 50277, 50283, 50303, 50324, 37078, 37054, 50328, {37082, 0, 0, 0}, 262, 262, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x500A, 0x000A, 257, 90, 50331, 50337, 50359, 50382, 37078, 37054, 50386, {37082, 0, 0, 0}, 263, 263, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x540A, 0x000A, 257, 112, 50389, 50395, 50419, 50445, 37078, 37054, 42003, {37082, 0, 0, 0}, 264, 264, { 1252, 20284, 10000, 850, 0, ',' }},
- {0x6C1A, 0x7C1A, 257, -1, 50449, 50457, 50476, 49176, 9243, 48434, 0, {38891, 0, 0, 0}, 265, 265, { 1251, 21025, 10007, 855, 0, ';' }},
- {0x701A, 0x7C1A, 257, -1, 50489, 50497, 50476, 49000, 9243, 48434, 0, {48440, 0, 0, 0}, 266, 266, { 1250, 500, 10029, 852, 0, ';' }},
- {0x742C, 0x002C, 257, -1, 50513, 50521, 38762, 46835, 38780, 14519, 0, {38784, 0, 0, 0}, 267, 267, { 1251, 20880, 10007, 866, 0, ';' }},
- {0x7804, 0x007F, 257, -1, 36752, 36770, 36737, 36744, 36748, 36752, 0, {36755, 0, 0, 0}, 268, 268, { 936, 500, 10008, 936, 0, ',' }},
- {0x7814, 0x0014, 257, -1, 46683, 50544, 50562, 46675, 46679, 46683, 0, {36868, 0, 0, 0}, 269, 269, { 1252, 20277, 10000, 850, 0, ';' }},
- {0x781A, 0x007F, 257, -1, 50570, 50573, 50581, 50590, 50594, 50570, 0, {48440, 0, 0, 0}, 270, 270, { 1250, 870, 10082, 852, 0, ';' }},
- {0x782C, 0x002C, 257, -1, 50598, 50606, 38762, 38776, 38780, 14519, 0, {38784, 0, 0, 0}, 271, 271, { 1254, 20905, 10081, 857, 0, ';' }},
- {0x7843, 0x0043, 257, -1, 50626, 50634, 39640, 39651, 39655, 39631, 0, {0, 0, 0, 0}, 272, 272, { 1251, 20880, 10007, 866, 0, ';' }},
- {0x7850, 0x0050, 257, -1, 50651, 50659, 40516, 50680, 40533, 40503, 0, {0, 0, 0, 0}, 273, 273, { 1251, 20880, 10007, 866, 0, ';' }},
- {0x7C04, 0x7804, 257, -1, 50684, 41713, 36737, 41751, 36748, 36752, 0, {41758, 0, 0, 0}, 274, 274, { 950, 500, 10002, 950, 0, ',' }},
- {0x7C04, 0x7C04, 257, -1, 50692, 50699, 36737, 41751, 36748, 36752, 0, {41758, 0, 0, 0}, 275, 275, { 950, 500, 10002, 950, 0, ',' }},
- {0x7C14, 0x0014, 257, -1, 37561, 50728, 50746, 37553, 37557, 37561, 0, {36868, 0, 0, 0}, 276, 276, { 1252, 20277, 10000, 850, 0, ';' }},
- {0x7C1A, 0x007F, 257, -1, 48434, 50760, 50476, 50768, 9243, 48434, 0, {38891, 0, 0, 0}, 277, 277, { 1250, 500, 10029, 852, 0, ';' }},
- {0x7C28, 0x0028, 257, -1, 50772, 50780, 0, 38605, 38609, 38596, 0, {0, 0, 0, 0}, 278, 278, { 1251, 20880, 10007, 866, 0, ';' }},
- {0x7C43, 0x0043, 257, -1, 50797, 50805, 39640, 39651, 39655, 39631, 0, {0, 0, 0, 0}, 279, 279, { 1254, 500, 10029, 857, 0, ';' }},
- {0x7C50, 0x0050, 257, -1, 50819, 50827, 40516, 47088, 40533, 40503, 0, {0, 0, 0, 0}, 280, 280, { 0, 500, 2, 1, 0, ',' }},
- {0x7C5F, 0x005F, 257, -1, 50849, 50858, 40899, 40909, 40869, 40869, 0, {0, 0, 0, 0}, 281, 281, { 1252, 20297, 10000, 850, 0, ';' }},
- {0x7C68, 0x0068, 257, -1, 50892, 50900, 41067, 41073, 41077, 41064, 0, {0, 0, 0, 0}, 282, 282, { 1252, 37, 10000, 437, 0, ',' }}
+ {0x0001, 0x007F, 768, -1, 36490, 36493, 36500, 36515, 36519, 36490, 0, {0, 0, 36523, 0}, 0, 0, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x0002, 0x007F, 257, -1, 36551, 36554, 36564, 36583, 36587, 36551, 0, {36591, 0, 0, 0}, 1, 1, { 1251, 21025, 10007, 866, 0, ';' }},
+ {0x0003, 0x007F, 257, -1, 36633, 36636, 36644, 36652, 36656, 36633, 0, {36660, 0, 0, 0}, 2, 2, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x0004, 0x0004, 257, -1, 36680, 36687, 36715, 36722, 36726, 36730, 0, {36733, 0, 0, 0}, 3, 3, { 936, 500, 10008, 936, 0, ',' }},
+ {0x0004, 0x7804, 257, -1, 36740, 36748, 36715, 36722, 36726, 36730, 0, {36733, 0, 0, 0}, 4, 4, { 936, 500, 10008, 936, 0, ',' }},
+ {0x0005, 0x007F, 257, -1, 36769, 36772, 36778, 36788, 36792, 36769, 0, {36796, 0, 0, 0}, 5, 5, { 1250, 500, 10029, 852, 0, ';' }},
+ {0x0006, 0x007F, 257, -1, 36822, 36825, 36832, 36838, 36842, 36822, 0, {36846, 0, 0, 0}, 6, 6, { 1252, 20277, 10000, 850, 0, ';' }},
+ {0x0007, 0x007F, 257, -1, 36867, 36870, 36877, 36885, 36889, 36867, 0, {36893, 0, 0, 0}, 7, 7, { 1252, 20273, 10000, 850, 0, ';' }},
+ {0x0008, 0x007F, 257, -1, 36918, 36921, 36927, 36944, 36948, 36918, 0, {36952, 0, 0, 0}, 8, 8, { 1253, 20273, 10006, 737, 0, ';' }},
+ {0x0009, 0x007F, 257, -1, 36994, 36997, 36997, 37005, 37009, 36994, 0, {37013, 0, 0, 0}, 9, 9, { 1252, 37, 10000, 437, 0, ',' }},
+ {0x000A, 0x007F, 257, -1, 37032, 37035, 37043, 37052, 37056, 37032, 0, {37060, 0, 0, 0}, 10, 10, { 1252, 20284, 10000, 850, 0, ';' }},
+ {0x000B, 0x007F, 257, -1, 37082, 37085, 37093, 37099, 37103, 37082, 0, {37107, 0, 0, 0}, 11, 11, { 1252, 20278, 10000, 850, 0, ';' }},
+ {0x000C, 0x007F, 257, -1, 37132, 37135, 37142, 37152, 37156, 37132, 0, {37160, 0, 0, 0}, 12, 12, { 1252, 20297, 10000, 850, 0, ';' }},
+ {0x000D, 0x007F, 257, -1, 37182, 37185, 37192, 37203, 37207, 37182, 0, {37211, 0, 0, 0}, 13, 13, { 1255, 500, 10005, 862, 1, ',' }},
+ {0x000E, 0x007F, 257, -1, 37244, 37247, 37257, 37264, 37268, 37244, 0, {37272, 0, 0, 0}, 14, 14, { 1250, 500, 10029, 852, 0, ';' }},
+ {0x000F, 0x007F, 257, -1, 37288, 37291, 37301, 37311, 37315, 37288, 0, {37319, 0, 0, 0}, 15, 15, { 1252, 20871, 10079, 850, 0, ';' }},
+ {0x0010, 0x007F, 257, -1, 37339, 37342, 37350, 37359, 37363, 37339, 0, {37060, 0, 0, 0}, 16, 16, { 1252, 20280, 10000, 850, 0, ';' }},
+ {0x0011, 0x007F, 257, -1, 37367, 37370, 37379, 37389, 37393, 37367, 0, {37397, 0, 0, 0}, 17, 17, { 932, 20290, 10001, 932, 0, ',' }},
+ {0x0012, 0x007F, 257, -1, 37424, 37427, 37434, 37444, 37448, 37424, 0, {37452, 0, 0, 0}, 18, 18, { 949, 20833, 10003, 949, 0, ',' }},
+ {0x0013, 0x007F, 257, -1, 37462, 37465, 37471, 37482, 37486, 37462, 0, {37490, 0, 0, 0}, 19, 19, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x0014, 0x007F, 257, -1, 37512, 37515, 37525, 37531, 37535, 37539, 0, {36846, 0, 0, 0}, 20, 20, { 1252, 20277, 10000, 850, 0, ';' }},
+ {0x0015, 0x007F, 257, -1, 37542, 37545, 37552, 37559, 37563, 37542, 0, {37567, 0, 0, 0}, 21, 21, { 1250, 20880, 10029, 852, 0, ';' }},
+ {0x0016, 0x007F, 257, -1, 37591, 37594, 37605, 37616, 37620, 37591, 0, {37624, 0, 0, 0}, 22, 22, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x0017, 0x007F, 257, -1, 37647, 37650, 37658, 37668, 37672, 37647, 0, {37676, 0, 0, 0}, 23, 23, { 1252, 20273, 10000, 850, 0, ';' }},
+ {0x0018, 0x007F, 257, -1, 37696, 37699, 37708, 37717, 37721, 37696, 0, {37725, 0, 0, 0}, 24, 24, { 1250, 20880, 10029, 852, 0, ';' }},
+ {0x0019, 0x007F, 257, -1, 37744, 37747, 37755, 37770, 37774, 37744, 0, {37778, 0, 0, 0}, 25, 25, { 1251, 20880, 10007, 866, 0, ';' }},
+ {0x001A, 0x007F, 257, -1, 37824, 37827, 37836, 37845, 37849, 37824, 0, {37853, 0, 0, 0}, 26, 26, { 1250, 500, 10082, 852, 0, ';' }},
+ {0x001B, 0x007F, 257, -1, 37876, 37879, 37886, 37898, 37902, 37876, 0, {37906, 0, 0, 0}, 27, 27, { 1250, 20880, 10029, 852, 0, ';' }},
+ {0x001C, 0x007F, 257, -1, 37930, 37933, 37942, 37948, 37952, 37930, 0, {0, 0, 0, 0}, 28, 28, { 1250, 20880, 10029, 852, 0, ';' }},
+ {0x001D, 0x007F, 257, -1, 37956, 37959, 37967, 37975, 37979, 37956, 0, {36846, 0, 0, 0}, 29, 29, { 1252, 20278, 10000, 850, 0, ';' }},
+ {0x001E, 0x007F, 512, -1, 37983, 37986, 37991, 38001, 38005, 37983, 0, {0, 38009, 0, 0}, 30, 30, { 874, 20838, 10021, 874, 0, ',' }},
+ {0x001F, 0x007F, 257, -1, 38040, 38043, 38051, 38060, 38064, 38040, 0, {38068, 0, 0, 0}, 31, 31, { 1254, 20905, 10081, 857, 0, ';' }},
+ {0x0020, 0x007F, 257, -1, 38082, 38085, 38090, 38099, 38103, 38082, 0, {38107, 0, 0, 0}, 32, 32, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x0021, 0x007F, 257, -1, 38137, 38140, 38151, 38168, 38172, 38137, 0, {38176, 0, 0, 0}, 33, 33, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x0022, 0x007F, 257, -1, 38195, 38198, 38208, 38229, 38233, 38195, 0, {38237, 0, 0, 0}, 34, 34, { 1251, 500, 10017, 866, 0, ';' }},
+ {0x0023, 0x007F, 257, -1, 38283, 38286, 38297, 38318, 38322, 38283, 0, {38326, 0, 0, 0}, 35, 35, { 1251, 500, 10007, 866, 0, ';' }},
+ {0x0024, 0x007F, 257, -1, 38368, 38371, 38381, 38395, 38399, 38368, 0, {38403, 0, 0, 0}, 36, 36, { 1250, 20880, 10029, 852, 0, ';' }},
+ {0x0025, 0x007F, 257, -1, 38425, 38428, 38437, 38443, 38447, 38425, 0, {38451, 0, 0, 0}, 37, 37, { 1257, 500, 10029, 775, 0, ';' }},
+ {0x0026, 0x007F, 257, -1, 38471, 38474, 38482, 38492, 38496, 38471, 0, {38500, 0, 0, 0}, 38, 38, { 1257, 500, 10029, 775, 0, ';' }},
+ {0x0027, 0x007F, 257, -1, 38519, 38522, 38533, 38543, 38547, 38519, 0, {38551, 0, 0, 0}, 39, 39, { 1257, 500, 10029, 775, 0, ';' }},
+ {0x0028, 0x007F, 257, -1, 38574, 38577, 0, 38583, 38587, 38574, 0, {0, 0, 0, 0}, 40, 40, { 1251, 20880, 10007, 866, 0, ';' }},
+ {0x0029, 0x007F, 257, -1, 38591, 38594, 38602, 38613, 38617, 38591, 0, {38621, 0, 0, 0}, 41, 41, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x002A, 0x007F, 257, -1, 38645, 38648, 38659, 38674, 4121, 38645, 0, {38678, 0, 0, 0}, 42, 42, { 1258, 500, 10000, 1258, 0, ',' }},
+ {0x002B, 0x007F, 257, -1, 38693, 38696, 38705, 38720, 38724, 38693, 0, {0, 0, 0, 0}, 43, 43, { 0, 500, 2, 1, 0, ',' }},
+ {0x002C, 0x007F, 257, -1, 14519, 38728, 38740, 38754, 38758, 14519, 0, {38762, 0, 0, 0}, 44, 44, { 1254, 20905, 10081, 857, 0, ';' }},
+ {0x002D, 0x007F, 257, -1, 38780, 38783, 38790, 38798, 38802, 38780, 0, {38806, 0, 0, 0}, 45, 45, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x002F, 0x007F, 257, -1, 38826, 38829, 38840, 38861, 38865, 38826, 0, {38869, 0, 0, 0}, 46, 46, { 1251, 500, 10007, 866, 0, ';' }},
+ {0x0032, 0x007F, 257, -1, 38913, 38916, 38923, 38932, 38936, 38913, 0, {0, 0, 0, 0}, 47, 47, { 1252, 500, 10000, 850, 0, ',' }},
+ {0x0034, 0x007F, 257, -1, 38940, 38943, 38949, 38958, 38962, 38940, 0, {0, 0, 0, 0}, 48, 48, { 1252, 500, 10000, 850, 0, ',' }},
+ {0x0035, 0x007F, 257, -1, 38966, 38969, 38974, 38982, 38986, 38966, 0, {38990, 0, 0, 0}, 49, 49, { 1252, 500, 10000, 850, 0, ',' }},
+ {0x0036, 0x007F, 257, -1, 39011, 39014, 39014, 39024, 39028, 39011, 0, {39032, 0, 0, 0}, 50, 50, { 1252, 500, 10000, 850, 0, ',' }},
+ {0x0037, 0x007F, 257, -1, 39052, 39055, 39064, 39086, 39090, 39052, 0, {39094, 0, 0, 0}, 51, 51, { 0, 500, 2, 1, 0, ';' }},
+ {0x0038, 0x007F, 257, -1, 39159, 39162, 39170, 39180, 39184, 39159, 0, {0, 0, 0, 0}, 52, 52, { 1252, 20277, 10079, 850, 0, ';' }},
+ {0x0039, 0x007F, 257, -1, 39188, 39191, 39197, 39216, 39220, 39188, 0, {39224, 0, 0, 0}, 53, 53, { 0, 500, 2, 1, 0, ',' }},
+ {0x003A, 0x007F, 257, -1, 39265, 39268, 39276, 39282, 39286, 39265, 0, {39290, 0, 0, 0}, 54, 54, { 0, 500, 2, 1, 0, ',' }},
+ {0x003B, 0x007F, 257, -1, 39311, 39314, 39328, 39345, 39349, 39311, 0, {0, 0, 0, 0}, 55, 55, { 1252, 20277, 10000, 850, 0, ';' }},
+ {0x003C, 0x007F, 257, -1, 39353, 39356, 39362, 39370, 39374, 39353, 0, {39378, 0, 0, 0}, 56, 56, { 1252, 500, 10000, 850, 0, ',' }},
+ {0x003E, 0x007F, 257, -1, 39399, 39402, 39408, 39422, 39426, 39399, 0, {39430, 0, 0, 0}, 57, 57, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x003F, 0x007F, 257, -1, 39447, 39450, 39457, 39477, 39481, 39447, 0, {39485, 0, 0, 0}, 58, 58, { 0, 500, 2, 1, 0, ';' }},
+ {0x0040, 0x007F, 257, -1, 39527, 39530, 39538, 39551, 39555, 39527, 0, {0, 0, 0, 0}, 59, 59, { 1251, 20880, 10007, 866, 0, ';' }},
+ {0x0041, 0x007F, 257, -1, 39559, 39562, 39570, 39580, 39584, 39559, 0, {39588, 0, 0, 0}, 60, 60, { 1252, 500, 10000, 437, 0, ',' }},
+ {0x0043, 0x007F, 257, -1, 39609, 39612, 39618, 39629, 39633, 39609, 0, {0, 0, 0, 0}, 61, 61, { 1254, 500, 10029, 857, 0, ';' }},
+ {0x0045, 0x007F, 257, -1, 39637, 39640, 39648, 39664, 39668, 39637, 0, {39672, 0, 0, 0}, 62, 62, { 0, 500, 2, 1, 0, ',' }},
+ {0x0046, 0x007F, 257, -1, 39737, 39740, 39748, 39767, 39771, 39737, 0, {0, 0, 0, 0}, 63, 63, { 0, 500, 2, 1, 0, ',' }},
+ {0x0047, 0x007F, 257, -1, 39775, 39778, 39787, 39809, 39813, 39775, 0, {39817, 0, 0, 0}, 64, 64, { 0, 500, 2, 1, 0, ',' }},
+ {0x0048, 0x007F, 257, -1, 14525, 39873, 39879, 39895, 39899, 14525, 0, {0, 0, 0, 0}, 65, 65, { 0, 500, 2, 1, 0, ',' }},
+ {0x0049, 0x007F, 257, -1, 39903, 39906, 39912, 39928, 39932, 39903, 0, {39936, 0, 0, 0}, 66, 66, { 0, 500, 2, 1, 0, ',' }},
+ {0x004A, 0x007F, 257, -1, 40001, 40004, 40011, 40030, 40034, 40001, 0, {40038, 0, 0, 0}, 67, 67, { 0, 500, 2, 1, 0, ',' }},
+ {0x004B, 0x007F, 257, -1, 35839, 40103, 40111, 40127, 40131, 35839, 0, {40135, 0, 0, 0}, 68, 68, { 0, 500, 2, 1, 0, ',' }},
+ {0x004C, 0x007F, 257, -1, 40206, 40209, 40219, 40238, 40242, 40206, 0, {40246, 0, 0, 0}, 69, 69, { 0, 500, 2, 1, 0, ',' }},
+ {0x004D, 0x007F, 257, -1, 14516, 40296, 40305, 40327, 40331, 14516, 0, {40335, 0, 0, 0}, 70, 70, { 0, 500, 2, 1, 0, ',' }},
+ {0x004E, 0x007F, 257, -1, 40388, 40391, 40399, 40415, 2565, 40388, 0, {40419, 0, 0, 0}, 71, 71, { 0, 500, 2, 1, 0, ',' }},
+ {0x0050, 0x007F, 257, -1, 40481, 40484, 40494, 40507, 40511, 40481, 0, {0, 0, 0, 0}, 72, 72, { 1251, 20880, 10007, 866, 0, ';' }},
+ {0x0051, 0x007F, 257, -1, 40515, 40518, 40526, 40551, 40555, 40515, 0, {0, 0, 0, 0}, 73, 73, { 0, 500, 2, 1, 0, ',' }},
+ {0x0052, 0x007F, 257, -1, 40559, 40562, 40568, 40576, 40580, 40559, 0, {0, 0, 0, 0}, 74, 74, { 1252, 20285, 10000, 850, 0, ',' }},
+ {0x0053, 0x007F, 257, -1, 40584, 40587, 40593, 40621, 40625, 40584, 0, {0, 0, 0, 0}, 75, 75, { 0, 500, 2, 1, 0, ',' }},
+ {0x0054, 0x007F, 257, -1, 40629, 40632, 40636, 40646, 40650, 40629, 0, {0, 0, 0, 0}, 76, 76, { 0, 500, 2, 1, 0, ',' }},
+ {0x0056, 0x007F, 257, -1, 40654, 40657, 40666, 40673, 40677, 40654, 0, {37060, 0, 0, 0}, 77, 77, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x0057, 0x007F, 257, -1, 40681, 40685, 40693, 40712, 40681, 40681, 0, {0, 0, 0, 0}, 78, 78, { 0, 500, 2, 1, 0, ',' }},
+ {0x005B, 0x007F, 257, -1, 40716, 40719, 40727, 40743, 40747, 40716, 0, {40751, 0, 0, 0}, 79, 79, { 0, 500, 2, 1, 0, ',' }},
+ {0x005E, 0x007F, 257, -1, 7865, 40773, 40781, 40794, 40798, 7865, 0, {40802, 0, 0, 0}, 80, 80, { 0, 500, 2, 1, 0, ';' }},
+ {0x005F, 0x007F, 257, -1, 40847, 40851, 40877, 40887, 40847, 40847, 0, {0, 0, 0, 0}, 81, 81, { 1252, 20297, 10000, 850, 0, ';' }},
+ {0x0061, 0x007F, 257, -1, 2059, 40891, 40898, 40917, 40921, 2059, 0, {40925, 0, 0, 0}, 82, 82, { 0, 500, 2, 1, 0, ',' }},
+ {0x0063, 0x007F, 1024, -1, 40975, 40978, 40985, 40994, 40998, 40975, 0, {0, 0, 0, 0}, 83, 83, { 0, 500, 2, 1, 1, ';' }},
+ {0x0064, 0x007F, 257, -1, 41002, 41006, 41006, 41015, 41002, 41002, 0, {41019, 0, 0, 0}, 84, 84, { 1252, 500, 10000, 437, 0, ',' }},
+ {0x0068, 0x007F, 257, -1, 41042, 41045, 41045, 41051, 41055, 41042, 0, {0, 0, 0, 0}, 85, 85, { 1252, 37, 10000, 437, 0, ',' }},
+ {0x006A, 0x007F, 257, -1, 41059, 41062, 41069, 41084, 41088, 41059, 0, {0, 0, 0, 0}, 86, 86, { 1252, 37, 10000, 437, 0, ',' }},
+ {0x006C, 0x007F, 257, -1, 41092, 41096, 41111, 41128, 41092, 41092, 0, {0, 0, 0, 0}, 87, 87, { 1252, 500, 10000, 850, 0, ',' }},
+ {0x006F, 0x007F, 257, -1, 41132, 41135, 41147, 41159, 41163, 41132, 0, {0, 0, 0, 0}, 88, 88, { 1252, 20277, 10000, 850, 0, ';' }},
+ {0x0070, 0x007F, 257, -1, 14510, 41167, 41167, 41172, 41176, 14510, 0, {0, 0, 0, 0}, 89, 89, { 1252, 37, 10000, 437, 0, ',' }},
+ {0x0078, 0x007F, 257, -1, 41180, 41183, 41194, 41204, 41208, 41180, 0, {41212, 0, 0, 0}, 90, 90, { 0, 500, 2, 1, 0, ',' }},
+ {0x007E, 0x007F, 257, -1, 41225, 41228, 41235, 41245, 41249, 41225, 0, {41253, 0, 0, 0}, 91, 91, { 1252, 20297, 10000, 850, 0, ';' }},
+ {0x0082, 0x007F, 257, -1, 41273, 41276, 41284, 41292, 41296, 41273, 0, {0, 0, 0, 0}, 92, 92, { 1252, 20297, 10000, 850, 0, ';' }},
+ {0x0084, 0x007F, 257, -1, 41300, 41304, 41317, 41336, 41300, 41300, 0, {41340, 0, 0, 0}, 93, 93, { 1252, 20297, 10000, 850, 0, ';' }},
+ {0x0085, 0x007F, 257, -1, 41365, 41369, 41375, 41393, 41365, 41365, 0, {0, 0, 0, 0}, 94, 94, { 1251, 20880, 10007, 866, 0, ';' }},
+ {0x0087, 0x007F, 257, -1, 41397, 41400, 41400, 41412, 41416, 41397, 0, {0, 0, 0, 0}, 95, 95, { 1252, 37, 10000, 437, 0, ';' }},
+ {0x0091, 0x007F, 257, -1, 41420, 41423, 41439, 41449, 41453, 41420, 0, {41457, 0, 0, 0}, 96, 96, { 1252, 20285, 10000, 850, 0, ',' }},
+ {0x0401, 0x0001, 768, 98, 41482, 41488, 41510, 36515, 36519, 36490, 13258, {0, 0, 36523, 0}, 97, 97, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x0402, 0x0002, 257, 11, 41574, 41580, 41601, 36583, 36587, 36551, 41639, {36591, 0, 0, 0}, 98, 98, { 1251, 21025, 10007, 866, 0, ';' }},
+ {0x0403, 0x0003, 257, 32, 41642, 41648, 41664, 36652, 36656, 36633, 41682, {36660, 0, 0, 0}, 99, 99, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x0404, 0x7C04, 257, 110, 41685, 41691, 41713, 41729, 36726, 36730, 41733, {41736, 0, 0, 0}, 100, 100, { 950, 500, 10002, 950, 0, ',' }},
+ {0x0405, 0x0005, 257, 24, 41743, 41749, 41772, 36788, 36792, 36769, 41802, {36796, 0, 0, 0}, 101, 101, { 1250, 500, 10029, 852, 0, ';' }},
+ {0x0406, 0x0006, 257, 26, 41805, 41811, 41828, 36838, 36842, 36822, 41844, {36846, 0, 0, 0}, 102, 102, { 1252, 20277, 10000, 850, 0, ';' }},
+ {0x0407, 0x0007, 257, 25, 41847, 41853, 41870, 36885, 36889, 36867, 41892, {36893, 0, 0, 0}, 103, 103, { 1252, 20273, 10000, 850, 0, ';' }},
+ {0x0408, 0x0008, 257, 40, 41895, 41901, 41916, 36944, 36948, 36918, 41948, {36952, 0, 0, 0}, 104, 104, { 1253, 20273, 10006, 737, 0, ';' }},
+ {0x0409, 0x0009, 257, 112, 41951, 41957, 41957, 37005, 37009, 36994, 41981, {37013, 0, 0, 0}, 105, 105, { 1252, 37, 10000, 437, 0, ',' }},
+ {0x040B, 0x000B, 257, 34, 41984, 41990, 42008, 37099, 37103, 37082, 42022, {37107, 0, 0, 0}, 106, 106, { 1252, 20278, 10000, 850, 0, ';' }},
+ {0x040C, 0x000C, 257, 36, 42025, 42031, 42047, 37152, 37156, 37132, 42066, {37160, 0, 0, 0}, 107, 107, { 1252, 20297, 10000, 850, 0, ';' }},
+ {0x040D, 0x000D, 257, 48, 42069, 42075, 42091, 37203, 37207, 37182, 42115, {37211, 0, 0, 0}, 108, 108, { 1255, 500, 10005, 862, 1, ',' }},
+ {0x040E, 0x000E, 257, 45, 42118, 42124, 42144, 37264, 37268, 37244, 42167, {37272, 0, 0, 0}, 109, 109, { 1250, 500, 10029, 852, 0, ';' }},
+ {0x040F, 0x000F, 257, 52, 42170, 42176, 42196, 37311, 37315, 37288, 42216, {37319, 0, 0, 0}, 110, 110, { 1252, 20871, 10079, 850, 0, ';' }},
+ {0x0410, 0x0010, 257, 53, 42219, 42225, 42241, 37359, 37363, 37339, 42259, {37060, 0, 0, 0}, 111, 111, { 1252, 20280, 10000, 850, 0, ';' }},
+ {0x0411, 0x0011, 257, 56, 42262, 42268, 42285, 37389, 37393, 37367, 42304, {37397, 0, 0, 0}, 112, 112, { 932, 20290, 10001, 932, 0, ',' }},
+ {0x0412, 0x0012, 257, 60, 42307, 42313, 42334, 37444, 37448, 37424, 42359, {37452, 0, 0, 0}, 113, 113, { 949, 20833, 10003, 949, 0, ',' }},
+ {0x0413, 0x0013, 257, 80, 42362, 42368, 42388, 37482, 37486, 37462, 42411, {37490, 0, 0, 0}, 114, 114, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x0414, 0x7C14, 257, 81, 42414, 42420, 42447, 37531, 37535, 37539, 42469, {36846, 0, 0, 0}, 115, 115, { 1252, 20277, 10000, 850, 0, ';' }},
+ {0x0415, 0x0015, 257, 89, 42472, 42478, 42494, 37559, 37563, 37542, 42510, {37567, 0, 0, 0}, 116, 116, { 1250, 20880, 10029, 852, 0, ';' }},
+ {0x0416, 0x0016, 257, 15, 42513, 42519, 42539, 37616, 37620, 37591, 42559, {37624, 0, 0, 0}, 117, 117, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x0417, 0x0017, 257, 19, 42562, 42568, 42590, 37668, 37672, 37647, 13261, {37676, 0, 0, 0}, 118, 118, { 1252, 20273, 10000, 850, 0, ';' }},
+ {0x0418, 0x0018, 257, 94, 42609, 42615, 42634, 37717, 37721, 37696, 42654, {37725, 0, 0, 0}, 119, 119, { 1250, 20880, 10029, 852, 0, ';' }},
+ {0x0419, 0x0019, 257, 96, 42657, 42663, 42680, 37770, 37774, 37744, 42710, {37778, 0, 0, 0}, 120, 120, { 1251, 20880, 10007, 866, 0, ';' }},
+ {0x041A, 0x001A, 257, 44, 42713, 42719, 42738, 37845, 37849, 37824, 42758, {37853, 0, 0, 0}, 121, 121, { 1250, 500, 10082, 852, 0, ';' }},
+ {0x041B, 0x001B, 257, 102, 42761, 42767, 42785, 37898, 37902, 37876, 42820, {37906, 0, 0, 0}, 122, 122, { 1250, 20880, 10029, 852, 0, ';' }},
+ {0x041C, 0x001C, 257, 2, 42823, 42829, 42848, 37948, 37952, 37930, 42867, {0, 0, 0, 0}, 123, 123, { 1250, 20880, 10029, 852, 0, ';' }},
+ {0x041D, 0x001D, 257, 99, 42870, 42876, 42893, 37975, 37979, 37956, 42911, {36846, 0, 0, 0}, 124, 124, { 1252, 20278, 10000, 850, 0, ';' }},
+ {0x041E, 0x001E, 512, 105, 42914, 42920, 42936, 38001, 38005, 37983, 42958, {0, 38009, 0, 0}, 125, 125, { 874, 20838, 10021, 874, 0, ',' }},
+ {0x041F, 0x001F, 257, 108, 42961, 42967, 42984, 38060, 38064, 38040, 43004, {38068, 0, 0, 0}, 126, 126, { 1254, 20905, 10081, 857, 0, ';' }},
+ {0x0420, 0x0020, 257, 88, 43007, 43013, 43029, 38099, 38103, 38082, 43055, {38107, 0, 0, 0}, 127, 127, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x0421, 0x0021, 257, 46, 43058, 43064, 43087, 38168, 38172, 38137, 43116, {38176, 0, 0, 0}, 128, 128, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x0422, 0x0022, 257, 111, 43119, 43125, 43145, 38229, 38233, 38195, 43183, {38237, 0, 0, 0}, 129, 129, { 1251, 500, 10017, 866, 0, ';' }},
+ {0x0423, 0x0023, 257, 16, 43186, 43192, 43213, 38318, 38322, 38283, 43253, {38326, 0, 0, 0}, 130, 130, { 1251, 500, 10007, 866, 0, ';' }},
+ {0x0424, 0x0024, 257, 101, 43256, 43262, 43283, 38395, 38399, 38368, 43309, {38403, 0, 0, 0}, 131, 131, { 1250, 20880, 10029, 852, 0, ';' }},
+ {0x0425, 0x0025, 257, 30, 43312, 43318, 43337, 38443, 38447, 38425, 43351, {38451, 0, 0, 0}, 132, 132, { 1257, 500, 10029, 775, 0, ';' }},
+ {0x0426, 0x0026, 257, 68, 43354, 43360, 43377, 38492, 38496, 38471, 43397, {38500, 0, 0, 0}, 133, 133, { 1257, 500, 10029, 775, 0, ';' }},
+ {0x0427, 0x0027, 257, 66, 43400, 43406, 43429, 38543, 38547, 38519, 43449, {38551, 0, 0, 0}, 134, 134, { 1257, 500, 10029, 775, 0, ';' }},
+ {0x0428, 0x7C28, 257, 106, 43452, 43463, 0, 38583, 38587, 38574, 43492, {0, 0, 0, 0}, 135, 135, { 1251, 20880, 10007, 866, 0, ';' }},
+ {0x0429, 0x0029, 257, 51, 43495, 43501, 43516, 38613, 38617, 38591, 43540, {38621, 0, 0, 0}, 136, 136, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x042A, 0x002A, 257, 116, 43543, 43549, 43570, 38674, 4121, 38645, 43598, {38678, 0, 0, 0}, 137, 137, { 1258, 500, 10000, 1258, 0, ',' }},
+ {0x042B, 0x002B, 257, 3, 43601, 43607, 43626, 38720, 38724, 38693, 3781, {0, 0, 0, 0}, 138, 138, { 0, 500, 2, 1, 0, ',' }},
+ {0x042C, 0x782C, 257, 7, 43691, 43702, 43734, 38754, 38758, 14519, 43762, {38762, 0, 0, 0}, 139, 139, { 1254, 20905, 10081, 857, 0, ';' }},
+ {0x042D, 0x002D, 257, 32, 43765, 43771, 43786, 38798, 38802, 38780, 41682, {38806, 0, 0, 0}, 140, 140, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x042F, 0x002F, 257, 73, 43805, 43811, 43834, 38861, 38865, 38826, 43878, {38869, 0, 0, 0}, 141, 141, { 1251, 500, 10007, 866, 0, ';' }},
+ {0x0432, 0x0032, 257, 118, 43881, 43887, 38923, 38932, 38936, 38913, 43909, {0, 0, 0, 0}, 142, 142, { 1252, 500, 10000, 850, 0, ',' }},
+ {0x0434, 0x0034, 257, 118, 43912, 43918, 38949, 38958, 38962, 38940, 43909, {0, 0, 0, 0}, 143, 143, { 1252, 500, 10000, 850, 0, ',' }},
+ {0x0435, 0x0035, 257, 118, 43939, 43945, 43965, 38982, 38986, 38966, 43909, {38990, 0, 0, 0}, 144, 144, { 1252, 500, 10000, 850, 0, ',' }},
+ {0x0436, 0x0036, 257, 118, 43993, 43999, 44024, 39024, 39028, 39011, 43909, {39032, 0, 0, 0}, 145, 145, { 1252, 500, 10000, 850, 0, ',' }},
+ {0x0437, 0x0037, 257, 38, 44048, 44054, 44073, 39086, 39090, 39052, 44128, {39094, 0, 0, 0}, 146, 146, { 0, 500, 2, 1, 0, ';' }},
+ {0x0438, 0x0038, 257, 35, 44131, 44137, 44161, 39180, 39184, 39159, 44182, {0, 0, 0, 0}, 147, 147, { 1252, 20277, 10079, 850, 0, ';' }},
+ {0x0439, 0x0039, 257, 49, 44185, 44191, 44205, 39216, 39220, 39188, 44239, {39224, 0, 0, 0}, 148, 148, { 0, 500, 2, 1, 0, ',' }},
+ {0x043A, 0x003A, 257, 75, 44242, 44248, 44264, 39282, 39286, 39265, 44278, {39290, 0, 0, 0}, 149, 149, { 0, 500, 2, 1, 0, ',' }},
+ {0x043B, 0x003B, 257, 81, 44281, 44287, 44310, 39345, 39349, 39311, 42469, {0, 0, 0, 0}, 150, 150, { 1252, 20277, 10000, 850, 0, ';' }},
+ {0x043E, 0x003E, 257, 77, 44335, 44341, 44358, 39422, 39426, 39399, 44383, {39430, 0, 0, 0}, 151, 151, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x0440, 0x0040, 257, 58, 44386, 44392, 44413, 39551, 39555, 39527, 44449, {0, 0, 0, 0}, 152, 152, { 1251, 20880, 10007, 866, 0, ';' }},
+ {0x0441, 0x0041, 257, 57, 44452, 44458, 44474, 39580, 39584, 39559, 44492, {39588, 0, 0, 0}, 153, 153, { 1252, 500, 10000, 437, 0, ',' }},
+ {0x0443, 0x7C43, 257, 114, 44495, 44506, 44532, 39629, 39633, 39609, 44566, {0, 0, 0, 0}, 154, 154, { 1254, 500, 10029, 857, 0, ';' }},
+ {0x0445, 0x0045, 257, 49, 44569, 44575, 44591, 39664, 39668, 39637, 44239, {39672, 0, 0, 0}, 155, 155, { 0, 500, 2, 1, 0, ',' }},
+ {0x0447, 0x0047, 257, 49, 44622, 44628, 44645, 39809, 39813, 39775, 44239, {39817, 0, 0, 0}, 156, 156, { 0, 500, 2, 1, 0, ',' }},
+ {0x0448, 0x0048, 257, 49, 44682, 44688, 44702, 39895, 39899, 14525, 44239, {0, 0, 0, 0}, 157, 157, { 0, 500, 2, 1, 0, ',' }},
+ {0x0449, 0x0049, 257, 49, 44733, 44739, 44753, 39928, 39932, 39903, 44239, {39936, 0, 0, 0}, 158, 158, { 0, 500, 2, 1, 0, ',' }},
+ {0x044A, 0x004A, 257, 49, 44793, 44799, 44814, 40030, 40034, 40001, 44239, {40038, 0, 0, 0}, 159, 159, { 0, 500, 2, 1, 0, ',' }},
+ {0x044B, 0x004B, 257, 49, 44861, 44867, 44883, 40127, 40131, 35839, 44239, {40135, 0, 0, 0}, 160, 160, { 0, 500, 2, 1, 0, ',' }},
+ {0x044C, 0x004C, 257, 49, 44914, 44920, 44938, 40238, 40242, 40206, 44239, {40246, 0, 0, 0}, 161, 161, { 0, 500, 2, 1, 0, ',' }},
+ {0x044D, 0x004D, 257, 49, 44978, 44984, 45001, 40327, 40331, 14516, 44239, {40335, 0, 0, 0}, 162, 162, { 0, 500, 2, 1, 0, ',' }},
+ {0x044E, 0x004E, 257, 49, 45038, 45044, 45060, 40415, 2565, 40388, 44239, {40419, 0, 0, 0}, 163, 163, { 0, 500, 2, 1, 0, ',' }},
+ {0x0451, 0x0051, 257, 21, 45091, 45097, 45113, 40551, 40555, 40515, 13340, {0, 0, 0, 0}, 164, 164, { 0, 500, 2, 1, 0, ',' }},
+ {0x0452, 0x0052, 257, 37, 45159, 45165, 45188, 40576, 40580, 40559, 45211, {0, 0, 0, 0}, 165, 165, { 1252, 20285, 10000, 850, 0, ',' }},
+ {0x0453, 0x0053, 257, 59, 45214, 45220, 45237, 40621, 40625, 40584, 45289, {0, 0, 0, 0}, 166, 166, { 0, 500, 2, 1, 0, ',' }},
+ {0x0454, 0x0054, 257, 62, 45292, 45298, 45309, 40646, 40650, 40629, 45331, {0, 0, 0, 0}, 167, 167, { 0, 500, 2, 1, 0, ',' }},
+ {0x0456, 0x0056, 257, 32, 45334, 45340, 45357, 40673, 40677, 40654, 41682, {37060, 0, 0, 0}, 168, 168, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x0457, 0x0057, 257, 49, 45374, 45381, 45397, 40712, 40681, 40681, 44239, {0, 0, 0, 0}, 169, 169, { 0, 500, 2, 1, 0, ',' }},
+ {0x045B, 0x005B, 257, 65, 45431, 45437, 45457, 40743, 40747, 40716, 45507, {40751, 0, 0, 0}, 170, 170, { 0, 500, 2, 1, 0, ',' }},
+ {0x045E, 0x005E, 257, 33, 45510, 45516, 45535, 40794, 40798, 7865, 45566, {40802, 0, 0, 0}, 171, 171, { 0, 500, 2, 1, 0, ';' }},
+ {0x0461, 0x0061, 257, 82, 45569, 45575, 45590, 40917, 40921, 2059, 45627, {40925, 0, 0, 0}, 172, 172, { 0, 500, 2, 1, 0, ',' }},
+ {0x0463, 0x0063, 1024, 1, 45630, 45636, 45657, 40994, 40998, 40975, 45687, {0, 0, 0, 0}, 173, 173, { 0, 500, 2, 1, 1, ';' }},
+ {0x0464, 0x0064, 257, 87, 45690, 45697, 45720, 41015, 41002, 41002, 45741, {41019, 0, 0, 0}, 174, 174, { 1252, 500, 10000, 437, 0, ',' }},
+ {0x0468, 0x7C68, 257, 78, 45744, 45755, 45778, 41051, 41055, 41042, 45795, {0, 0, 0, 0}, 175, 175, { 1252, 37, 10000, 437, 0, ',' }},
+ {0x046A, 0x006A, 257, 78, 45798, 45804, 45821, 41084, 41088, 41059, 45795, {0, 0, 0, 0}, 176, 176, { 1252, 37, 10000, 437, 0, ',' }},
+ {0x046C, 0x006C, 257, 118, 45867, 45874, 41111, 41128, 41092, 41092, 43909, {0, 0, 0, 0}, 177, 177, { 1252, 500, 10000, 850, 0, ',' }},
+ {0x046F, 0x006F, 257, 39, 45904, 45910, 45934, 41159, 41163, 41132, 45965, {0, 0, 0, 0}, 178, 178, { 1252, 20277, 10000, 850, 0, ';' }},
+ {0x0470, 0x0070, 257, 78, 45968, 45974, 45974, 41172, 41176, 14510, 45795, {0, 0, 0, 0}, 179, 179, { 1252, 37, 10000, 437, 0, ',' }},
+ {0x0478, 0x0078, 257, 21, 45989, 45995, 46014, 41204, 41208, 41180, 13340, {41212, 0, 0, 0}, 180, 180, { 0, 500, 2, 1, 0, ',' }},
+ {0x047E, 0x007E, 257, 36, 46033, 46039, 46055, 41245, 41249, 41225, 42066, {41253, 0, 0, 0}, 181, 181, { 1252, 20297, 10000, 850, 0, ';' }},
+ {0x0482, 0x0082, 257, 36, 46074, 46080, 46097, 41292, 41296, 41273, 42066, {0, 0, 0, 0}, 182, 182, { 1252, 20297, 10000, 850, 0, ';' }},
+ {0x0485, 0x0085, 257, 96, 46115, 46122, 41375, 41393, 41365, 41365, 42710, {0, 0, 0, 0}, 183, 183, { 1251, 20880, 10007, 866, 0, ';' }},
+ {0x0487, 0x0087, 257, 97, 46137, 46143, 46143, 41412, 41416, 41397, 46164, {0, 0, 0, 0}, 184, 184, { 1252, 37, 10000, 437, 0, ';' }},
+ {0x0491, 0x0091, 257, 37, 46167, 46173, 46206, 41449, 41453, 41420, 45211, {41457, 0, 0, 0}, 185, 185, { 1252, 20285, 10000, 850, 0, ',' }},
+ {0x0801, 0x0001, 257, 50, 46242, 46248, 46262, 46292, 36519, 36490, 46296, {36523, 0, 0, 0}, 186, 186, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x0804, 0x0004, 257, 21, 46299, 36748, 46305, 36722, 36726, 36730, 13340, {36733, 0, 0, 0}, 187, 187, { 936, 500, 10008, 936, 0, ',' }},
+ {0x0807, 0x0007, 257, 19, 46321, 46327, 46348, 46366, 36889, 36867, 13261, {36893, 0, 0, 0}, 188, 188, { 1252, 20273, 10000, 850, 0, ';' }},
+ {0x0809, 0x0009, 257, 37, 46370, 46376, 46376, 46401, 37009, 36994, 45211, {37013, 0, 0, 0}, 189, 189, { 1252, 20285, 10000, 850, 0, ',' }},
+ {0x080A, 0x000A, 257, 76, 46405, 46411, 46428, 46447, 37056, 37032, 46451, {37060, 0, 0, 0}, 190, 190, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x080C, 0x000C, 257, 10, 46454, 46460, 46477, 46498, 37156, 37132, 46502, {37160, 0, 0, 0}, 191, 191, { 1252, 20297, 10000, 850, 0, ';' }},
+ {0x0810, 0x0010, 257, 19, 46505, 46511, 46533, 46553, 37363, 37339, 13261, {37060, 0, 0, 0}, 192, 192, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x0813, 0x0013, 257, 10, 46557, 46563, 46579, 46600, 37486, 37462, 46502, {37490, 0, 0, 0}, 193, 193, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x0814, 0x7814, 257, 81, 46604, 46610, 46637, 46653, 46657, 46661, 42469, {36846, 0, 0, 0}, 194, 194, { 1252, 20277, 10000, 850, 0, ';' }},
+ {0x0816, 0x0016, 257, 91, 46664, 46670, 46692, 46714, 37620, 37591, 46718, {37624, 0, 0, 0}, 195, 195, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x081D, 0x001D, 257, 34, 46721, 46727, 46745, 46763, 37979, 37956, 42022, {36846, 0, 0, 0}, 196, 196, { 1252, 20278, 10000, 850, 0, ';' }},
+ {0x082C, 0x742C, 257, 7, 46767, 46778, 43734, 46813, 38758, 14519, 43762, {38762, 0, 0, 0}, 197, 197, { 1251, 20880, 10007, 866, 0, ';' }},
+ {0x083C, 0x003C, 257, 47, 46817, 46823, 46839, 39370, 39374, 39353, 46855, {39378, 0, 0, 0}, 198, 198, { 1252, 500, 10000, 850, 0, ',' }},
+ {0x083E, 0x003E, 257, 13, 46858, 46864, 46879, 46902, 39426, 39399, 46906, {39430, 0, 0, 0}, 199, 199, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x0843, 0x7843, 257, 114, 46909, 46920, 44532, 39629, 39633, 39609, 44566, {0, 0, 0, 0}, 200, 200, { 1251, 20880, 10007, 866, 0, ';' }},
+ {0x0845, 0x0045, 257, 9, 46949, 46955, 46976, 47019, 39668, 39637, 47023, {39672, 0, 0, 0}, 201, 201, { 0, 500, 2, 1, 0, ',' }},
+ {0x0850, 0x7C50, 257, 21, 47026, 47037, 40494, 47066, 40511, 40481, 13340, {0, 0, 0, 0}, 202, 202, { 0, 500, 2, 1, 0, ',' }},
+ {0x0C01, 0x0001, 257, 31, 47070, 47076, 47091, 47115, 36519, 36490, 47119, {36523, 0, 0, 0}, 203, 203, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x0C04, 0x7C04, 257, 42, 47122, 47128, 47171, 47208, 36726, 36730, 47212, {41736, 0, 0, 0}, 204, 204, { 950, 500, 10002, 950, 0, ',' }},
+ {0x0C07, 0x0007, 257, 5, 47215, 47221, 47238, 47260, 36889, 36867, 47264, {36893, 0, 0, 0}, 205, 205, { 1252, 20273, 10000, 850, 0, ';' }},
+ {0x0C09, 0x0009, 257, 6, 47267, 47273, 47273, 47293, 37009, 36994, 47297, {37013, 0, 0, 0}, 206, 206, { 1252, 500, 10000, 850, 0, ',' }},
+ {0x0C0A, 0x000A, 257, 32, 47300, 47306, 47322, 47341, 37056, 37032, 41682, {37060, 0, 0, 0}, 207, 207, { 1252, 20284, 10000, 850, 0, ';' }},
+ {0x0C0C, 0x000C, 257, 18, 47345, 47351, 47367, 47386, 37156, 37132, 47390, {37160, 0, 0, 0}, 208, 208, { 1252, 20297, 10000, 850, 0, ';' }},
+ {0x0C3B, 0x003B, 257, 34, 47393, 47399, 47423, 47449, 47453, 39311, 42022, {0, 0, 0, 0}, 209, 209, { 1252, 20278, 10000, 850, 0, ';' }},
+ {0x1001, 0x0001, 257, 69, 47457, 47463, 47478, 47506, 36519, 36490, 47510, {36523, 0, 0, 0}, 210, 210, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x1004, 0x0004, 257, 100, 47513, 47519, 47551, 47570, 36726, 36730, 47574, {36733, 0, 0, 0}, 211, 211, { 936, 500, 10008, 936, 0, ',' }},
+ {0x1007, 0x0007, 257, 67, 47577, 47583, 47603, 47623, 36889, 36867, 47627, {36893, 0, 0, 0}, 212, 212, { 1252, 20273, 10000, 850, 0, ';' }},
+ {0x1009, 0x0009, 257, 18, 47630, 47636, 47636, 47653, 37009, 36994, 47390, {37013, 0, 0, 0}, 213, 213, { 1252, 37, 10000, 850, 0, ',' }},
+ {0x100A, 0x000A, 257, 41, 47657, 47663, 47683, 47704, 37056, 37032, 47708, {37060, 0, 0, 0}, 214, 214, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x100C, 0x000C, 257, 19, 47711, 47717, 47738, 47757, 37156, 37132, 13261, {37160, 0, 0, 0}, 215, 215, { 1252, 20297, 10000, 850, 0, ';' }},
+ {0x1401, 0x0001, 257, 28, 47761, 47767, 47784, 47816, 36519, 36490, 47820, {36523, 0, 0, 0}, 216, 216, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x1404, 0x7C04, 257, 74, 47823, 47829, 47868, 47905, 36726, 36730, 47909, {41736, 0, 0, 0}, 217, 217, { 950, 500, 10002, 950, 0, ',' }},
+ {0x1407, 0x0007, 257, 64, 47912, 47918, 47941, 47965, 36889, 36867, 47969, {36893, 0, 0, 0}, 218, 218, { 1252, 20273, 10000, 850, 0, ';' }},
+ {0x1409, 0x0009, 257, 83, 47972, 47978, 47978, 48000, 37009, 36994, 48004, {37013, 0, 0, 0}, 219, 219, { 1252, 500, 10000, 850, 0, ',' }},
+ {0x140A, 0x000A, 257, 23, 48007, 48013, 48034, 48056, 37056, 37032, 48060, {37060, 0, 0, 0}, 220, 220, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x140C, 0x000C, 257, 67, 48063, 48069, 48089, 48112, 37156, 37132, 47627, {37160, 0, 0, 0}, 221, 221, { 1252, 20297, 10000, 850, 0, ';' }},
+ {0x1801, 0x0001, 257, 70, 48116, 48122, 48139, 48169, 36519, 36490, 48173, {36523, 0, 0, 0}, 222, 222, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x1809, 0x0009, 257, 47, 48176, 48182, 48182, 48200, 37009, 36994, 46855, {37013, 0, 0, 0}, 223, 223, { 1252, 500, 10000, 850, 0, ',' }},
+ {0x180A, 0x000A, 257, 85, 48204, 48210, 48227, 48246, 37056, 37032, 48250, {37060, 0, 0, 0}, 224, 224, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x180C, 0x000C, 257, 71, 48253, 48259, 48275, 48294, 37156, 37132, 48298, {37160, 0, 0, 0}, 225, 225, { 1252, 20297, 10000, 850, 0, ';' }},
+ {0x181A, 0x701A, 257, 8, 48301, 48312, 48352, 48404, 48408, 48412, 48415, {48418, 0, 0, 0}, 226, 226, { 1250, 870, 10082, 852, 0, ';' }},
+ {0x1C01, 0x0001, 257, 107, 48441, 48447, 48464, 48490, 36519, 36490, 48494, {36523, 0, 0, 0}, 227, 227, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x1C09, 0x0009, 257, 118, 48497, 48503, 48503, 48526, 37009, 36994, 43909, {37013, 0, 0, 0}, 228, 228, { 1252, 500, 10000, 437, 0, ',' }},
+ {0x1C0A, 0x000A, 257, 27, 48530, 48536, 48565, 48598, 37056, 37032, 48602, {37060, 0, 0, 0}, 229, 229, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x1C1A, 0x6C1A, 257, 8, 48605, 48616, 48352, 48659, 48663, 48412, 48415, {38869, 0, 0, 0}, 230, 230, { 1251, 21025, 10007, 855, 0, ';' }},
+ {0x2001, 0x0001, 257, 84, 48667, 48673, 48687, 48715, 36519, 36490, 48719, {36523, 0, 0, 0}, 231, 231, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x2009, 0x0009, 257, 54, 48722, 48728, 48728, 48746, 37009, 36994, 48750, {37013, 0, 0, 0}, 232, 232, { 1252, 500, 10000, 850, 0, ',' }},
+ {0x200A, 0x000A, 257, 115, 48753, 48759, 48779, 48800, 37056, 37032, 48804, {37060, 0, 0, 0}, 233, 233, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x2401, 0x0001, 257, 117, 48807, 48813, 48828, 48856, 36519, 36490, 48860, {36523, 0, 0, 0}, 234, 234, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x240A, 0x000A, 257, 22, 48863, 48869, 48888, 48908, 37056, 37032, 48912, {37060, 0, 0, 0}, 235, 235, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x241A, 0x701A, 257, 95, 48915, 48926, 48950, 48978, 9243, 48412, 48982, {48418, 0, 0, 0}, 236, 236, { 1250, 500, 10029, 852, 0, ';' }},
+ {0x2801, 0x0001, 257, 104, 48985, 48991, 49006, 49034, 36519, 36490, 49038, {36523, 0, 0, 0}, 237, 237, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x2809, 0x0009, 257, 17, 49041, 49047, 49047, 49064, 37009, 36994, 49068, {37013, 0, 0, 0}, 238, 238, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x280A, 0x000A, 257, 86, 49071, 49077, 49092, 49109, 37056, 37032, 49113, {37060, 0, 0, 0}, 239, 239, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x281A, 0x6C1A, 257, 95, 49116, 49127, 48950, 49154, 9243, 48412, 48982, {38869, 0, 0, 0}, 240, 240, { 1251, 21025, 10007, 855, 0, ';' }},
+ {0x2C01, 0x0001, 257, 55, 49158, 49164, 49180, 49210, 36519, 36490, 49214, {36523, 0, 0, 0}, 241, 241, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x2C09, 0x0009, 257, 109, 49217, 49223, 49223, 49253, 37009, 36994, 49257, {37013, 0, 0, 0}, 242, 242, { 1252, 500, 10000, 850, 0, ';' }},
+ {0x2C0A, 0x000A, 257, 4, 49260, 49266, 49286, 49307, 37056, 37032, 49311, {37060, 0, 0, 0}, 243, 243, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x2C1A, 0x701A, 257, 72, 49314, 49325, 49353, 49386, 9243, 48412, 49390, {48418, 0, 0, 0}, 244, 244, { 1250, 500, 10029, 852, 0, ';' }},
+ {0x3001, 0x0001, 257, 63, 49393, 49399, 49416, 49444, 36519, 36490, 49448, {36523, 0, 0, 0}, 245, 245, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x3009, 0x0009, 257, 119, 49451, 49457, 49457, 49476, 37009, 36994, 49480, {37013, 0, 0, 0}, 246, 246, { 1252, 500, 10000, 437, 0, ',' }},
+ {0x300A, 0x000A, 257, 29, 49483, 49489, 49507, 49526, 37056, 37032, 49530, {37060, 0, 0, 0}, 247, 247, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x301A, 0x6C1A, 257, 72, 49533, 49544, 49353, 49575, 9243, 48412, 49390, {38869, 0, 0, 0}, 248, 248, { 1251, 21025, 10007, 855, 0, ';' }},
+ {0x3401, 0x0001, 257, 61, 49579, 49585, 49601, 49631, 36519, 36490, 49635, {36523, 0, 0, 0}, 249, 249, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x3409, 0x0009, 257, 87, 49638, 49644, 49644, 49666, 37009, 36994, 45741, {37013, 0, 0, 0}, 250, 250, { 1252, 500, 10000, 437, 0, ',' }},
+ {0x340A, 0x000A, 257, 20, 49670, 49676, 49692, 49709, 37056, 37032, 49713, {37060, 0, 0, 0}, 251, 251, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x3801, 0x0001, 257, 0, 49716, 49722, 49752, 49816, 36519, 36490, 49820, {36523, 0, 0, 0}, 252, 252, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x380A, 0x000A, 257, 113, 49823, 49829, 49847, 49866, 37056, 37032, 49870, {37060, 0, 0, 0}, 253, 253, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x3C01, 0x0001, 257, 12, 49873, 49879, 49896, 49928, 36519, 36490, 49932, {36523, 0, 0, 0}, 254, 254, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x3C0A, 0x000A, 257, 92, 49935, 49941, 49960, 49980, 37056, 37032, 49984, {37060, 0, 0, 0}, 255, 255, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x4001, 0x0001, 257, 93, 49987, 49993, 50008, 50032, 36519, 36490, 50036, {36523, 0, 0, 0}, 256, 256, { 1256, 20420, 10004, 720, 1, ';' }},
+ {0x4009, 0x0009, 257, 49, 50039, 50045, 50045, 50061, 37009, 36994, 44239, {37013, 0, 0, 0}, 257, 257, { 1252, 37, 10000, 437, 0, ',' }},
+ {0x400A, 0x000A, 257, 14, 50065, 50071, 50089, 50108, 37056, 37032, 50112, {37060, 0, 0, 0}, 258, 258, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x440A, 0x000A, 257, 103, 50115, 50121, 50143, 50166, 37056, 37032, 50170, {37060, 0, 0, 0}, 259, 259, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x4809, 0x0009, 257, 100, 50173, 50179, 50179, 50199, 37009, 36994, 47574, {37013, 0, 0, 0}, 260, 260, { 1252, 37, 10000, 437, 0, ',' }},
+ {0x480A, 0x000A, 257, 43, 50203, 50209, 50228, 50248, 37056, 37032, 50252, {37060, 0, 0, 0}, 261, 261, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x4C0A, 0x000A, 257, 79, 50255, 50261, 50281, 50302, 37056, 37032, 50306, {37060, 0, 0, 0}, 262, 262, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x500A, 0x000A, 257, 90, 50309, 50315, 50337, 50360, 37056, 37032, 50364, {37060, 0, 0, 0}, 263, 263, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x540A, 0x000A, 257, 112, 50367, 50373, 50397, 50423, 37056, 37032, 41981, {37060, 0, 0, 0}, 264, 264, { 1252, 20284, 10000, 850, 0, ',' }},
+ {0x6C1A, 0x7C1A, 257, -1, 50427, 50435, 50454, 49154, 9243, 48412, 0, {38869, 0, 0, 0}, 265, 265, { 1251, 21025, 10007, 855, 0, ';' }},
+ {0x701A, 0x7C1A, 257, -1, 50467, 50475, 50454, 48978, 9243, 48412, 0, {48418, 0, 0, 0}, 266, 266, { 1250, 500, 10029, 852, 0, ';' }},
+ {0x742C, 0x002C, 257, -1, 50491, 50499, 38740, 46813, 38758, 14519, 0, {38762, 0, 0, 0}, 267, 267, { 1251, 20880, 10007, 866, 0, ';' }},
+ {0x7804, 0x007F, 257, -1, 36730, 36748, 36715, 36722, 36726, 36730, 0, {36733, 0, 0, 0}, 268, 268, { 936, 500, 10008, 936, 0, ',' }},
+ {0x7814, 0x0014, 257, -1, 46661, 50522, 50540, 46653, 46657, 46661, 0, {36846, 0, 0, 0}, 269, 269, { 1252, 20277, 10000, 850, 0, ';' }},
+ {0x781A, 0x007F, 257, -1, 50548, 50551, 50559, 50568, 50572, 50548, 0, {48418, 0, 0, 0}, 270, 270, { 1250, 870, 10082, 852, 0, ';' }},
+ {0x782C, 0x002C, 257, -1, 50576, 50584, 38740, 38754, 38758, 14519, 0, {38762, 0, 0, 0}, 271, 271, { 1254, 20905, 10081, 857, 0, ';' }},
+ {0x7843, 0x0043, 257, -1, 50604, 50612, 39618, 39629, 39633, 39609, 0, {0, 0, 0, 0}, 272, 272, { 1251, 20880, 10007, 866, 0, ';' }},
+ {0x7850, 0x0050, 257, -1, 50629, 50637, 40494, 50658, 40511, 40481, 0, {0, 0, 0, 0}, 273, 273, { 1251, 20880, 10007, 866, 0, ';' }},
+ {0x7C04, 0x7804, 257, -1, 50662, 41691, 36715, 41729, 36726, 36730, 0, {41736, 0, 0, 0}, 274, 274, { 950, 500, 10002, 950, 0, ',' }},
+ {0x7C04, 0x7C04, 257, -1, 50670, 50677, 36715, 41729, 36726, 36730, 0, {41736, 0, 0, 0}, 275, 275, { 950, 500, 10002, 950, 0, ',' }},
+ {0x7C14, 0x0014, 257, -1, 37539, 50706, 50724, 37531, 37535, 37539, 0, {36846, 0, 0, 0}, 276, 276, { 1252, 20277, 10000, 850, 0, ';' }},
+ {0x7C1A, 0x007F, 257, -1, 48412, 50738, 50454, 50746, 9243, 48412, 0, {38869, 0, 0, 0}, 277, 277, { 1250, 500, 10029, 852, 0, ';' }},
+ {0x7C28, 0x0028, 257, -1, 50750, 50758, 0, 38583, 38587, 38574, 0, {0, 0, 0, 0}, 278, 278, { 1251, 20880, 10007, 866, 0, ';' }},
+ {0x7C43, 0x0043, 257, -1, 50775, 50783, 39618, 39629, 39633, 39609, 0, {0, 0, 0, 0}, 279, 279, { 1254, 500, 10029, 857, 0, ';' }},
+ {0x7C50, 0x0050, 257, -1, 50797, 50805, 40494, 47066, 40511, 40481, 0, {0, 0, 0, 0}, 280, 280, { 0, 500, 2, 1, 0, ',' }},
+ {0x7C5F, 0x005F, 257, -1, 50827, 50836, 40877, 40887, 40847, 40847, 0, {0, 0, 0, 0}, 281, 281, { 1252, 20297, 10000, 850, 0, ';' }},
+ {0x7C68, 0x0068, 257, -1, 50870, 50878, 41045, 41051, 41055, 41042, 0, {0, 0, 0, 0}, 282, 282, { 1252, 37, 10000, 437, 0, ',' }}
};
static const CultureInfoNameEntry culture_name_entries [] = {
- {39033, 50}, /* af */
- {50914, 145}, /* af-za */
+ {39011, 50}, /* af */
+ {50892, 145}, /* af-za */
{7865, 80}, /* am */
- {50920, 171}, /* am-et */
- {36512, 0}, /* ar */
- {50926, 252}, /* ar-ae */
- {50932, 254}, /* ar-bh */
- {50938, 216}, /* ar-dz */
- {50944, 203}, /* ar-eg */
- {50950, 186}, /* ar-iq */
- {50956, 241}, /* ar-jo */
- {50962, 249}, /* ar-kw */
- {50968, 245}, /* ar-lb */
- {50974, 210}, /* ar-ly */
- {50980, 222}, /* ar-ma */
- {50986, 231}, /* ar-om */
- {50992, 256}, /* ar-qa */
- {50998, 97}, /* ar-sa */
- {51004, 237}, /* ar-sy */
- {51010, 227}, /* ar-tn */
- {51016, 234}, /* ar-ye */
+ {50898, 171}, /* am-et */
+ {36490, 0}, /* ar */
+ {50904, 252}, /* ar-ae */
+ {50910, 254}, /* ar-bh */
+ {50916, 216}, /* ar-dz */
+ {50922, 203}, /* ar-eg */
+ {50928, 186}, /* ar-iq */
+ {50934, 241}, /* ar-jo */
+ {50940, 249}, /* ar-kw */
+ {50946, 245}, /* ar-lb */
+ {50952, 210}, /* ar-ly */
+ {50958, 222}, /* ar-ma */
+ {50964, 231}, /* ar-om */
+ {50970, 256}, /* ar-qa */
+ {50976, 97}, /* ar-sa */
+ {50982, 237}, /* ar-sy */
+ {50988, 227}, /* ar-tn */
+ {50994, 234}, /* ar-ye */
{14516, 70}, /* as */
- {51022, 162}, /* as-in */
+ {51000, 162}, /* as-in */
{14519, 44}, /* az */
- {51028, 267}, /* az-cyrl */
- {51036, 197}, /* az-cyrl-az */
- {51047, 271}, /* az-latn */
- {51055, 139}, /* az-latn-az */
- {38305, 35}, /* be */
- {51066, 130}, /* be-by */
- {36573, 1}, /* bg */
- {51072, 98}, /* bg-bg */
- {39659, 62}, /* bn */
- {51078, 201}, /* bn-bd */
- {51084, 155}, /* bn-in */
- {40537, 73}, /* bo */
- {51090, 164}, /* bo-cn */
- {41247, 91}, /* br */
- {51096, 181}, /* br-fr */
- {50570, 270}, /* bs */
- {36655, 2}, /* ca */
- {51102, 99}, /* ca-es */
- {36791, 5}, /* cs */
- {51108, 101}, /* cs-cz */
- {40581, 74}, /* cy */
- {51114, 165}, /* cy-gb */
- {36844, 6}, /* da */
- {51120, 102}, /* da-dk */
- {36889, 7}, /* de */
- {51126, 205}, /* de-at */
- {51132, 188}, /* de-ch */
- {51138, 103}, /* de-de */
- {51144, 218}, /* de-li */
- {51150, 212}, /* de-lu */
- {36940, 8}, /* el */
- {51156, 104}, /* el-gr */
- {37016, 9}, /* en */
- {51162, 206}, /* en-au */
- {51168, 238}, /* en-bz */
- {51174, 213}, /* en-ca */
- {51180, 189}, /* en-gb */
- {51186, 223}, /* en-ie */
- {51192, 257}, /* en-in */
- {51198, 232}, /* en-jm */
- {51204, 219}, /* en-nz */
- {51210, 250}, /* en-ph */
- {51216, 260}, /* en-sg */
- {51222, 242}, /* en-tt */
- {51228, 105}, /* en-us */
- {51234, 228}, /* en-za */
- {51240, 246}, /* en-zw */
- {37054, 10}, /* es */
- {51246, 243}, /* es-ar */
- {51252, 258}, /* es-bo */
- {51258, 251}, /* es-cl */
- {51264, 235}, /* es-co */
- {51270, 220}, /* es-cr */
- {51276, 229}, /* es-do */
- {51282, 247}, /* es-ec */
- {51288, 207}, /* es-es */
- {51294, 214}, /* es-gt */
- {51300, 261}, /* es-hn */
- {51306, 190}, /* es-mx */
- {51312, 262}, /* es-ni */
- {51318, 224}, /* es-pa */
- {51324, 239}, /* es-pe */
- {51330, 263}, /* es-pr */
- {51336, 255}, /* es-py */
- {51342, 259}, /* es-sv */
- {51348, 264}, /* es-us */
- {51354, 253}, /* es-uy */
- {51360, 233}, /* es-ve */
- {38447, 37}, /* et */
- {51366, 132}, /* et-ee */
- {38802, 45}, /* eu */
- {51372, 140}, /* eu-es */
- {38613, 41}, /* fa */
- {51378, 136}, /* fa-ir */
- {37104, 11}, /* fi */
- {51384, 106}, /* fi-fi */
- {41024, 84}, /* fil */
- {51390, 174}, /* fil-ph */
- {39181, 52}, /* fo */
- {51397, 147}, /* fo-fo */
- {37154, 12}, /* fr */
- {51403, 191}, /* fr-be */
- {51409, 208}, /* fr-ca */
- {51415, 215}, /* fr-ch */
- {51421, 107}, /* fr-fr */
- {51427, 221}, /* fr-lu */
- {51433, 225}, /* fr-mc */
- {39375, 56}, /* ga */
- {51439, 198}, /* ga-ie */
- {41442, 96}, /* gd */
- {51445, 185}, /* gd-gb */
- {40676, 77}, /* gl */
- {51451, 168}, /* gl-es */
- {41322, 93}, /* gsw */
- {39797, 64}, /* gu */
- {51457, 156}, /* gu-in */
- {41064, 85}, /* ha */
- {51463, 282}, /* ha-latn */
- {51471, 175}, /* ha-latn-ng */
- {37204, 13}, /* he */
- {51482, 108}, /* he-il */
- {39210, 53}, /* hi */
- {51488, 148}, /* hi-in */
- {37846, 26}, /* hr */
- {51494, 121}, /* hr-hr */
- {37266, 14}, /* hu */
- {51500, 109}, /* hu-hu */
- {38715, 43}, /* hy */
- {51506, 138}, /* hy-am */
- {38159, 33}, /* id */
- {51512, 128}, /* id-id */
+ {51006, 267}, /* az-cyrl */
+ {51014, 197}, /* az-cyrl-az */
+ {51025, 271}, /* az-latn */
+ {51033, 139}, /* az-latn-az */
+ {38283, 35}, /* be */
+ {51044, 130}, /* be-by */
+ {36551, 1}, /* bg */
+ {51050, 98}, /* bg-bg */
+ {39637, 62}, /* bn */
+ {51056, 201}, /* bn-bd */
+ {51062, 155}, /* bn-in */
+ {40515, 73}, /* bo */
+ {51068, 164}, /* bo-cn */
+ {41225, 91}, /* br */
+ {51074, 181}, /* br-fr */
+ {50548, 270}, /* bs */
+ {36633, 2}, /* ca */
+ {51080, 99}, /* ca-es */
+ {36769, 5}, /* cs */
+ {51086, 101}, /* cs-cz */
+ {40559, 74}, /* cy */
+ {51092, 165}, /* cy-gb */
+ {36822, 6}, /* da */
+ {51098, 102}, /* da-dk */
+ {36867, 7}, /* de */
+ {51104, 205}, /* de-at */
+ {51110, 188}, /* de-ch */
+ {51116, 103}, /* de-de */
+ {51122, 218}, /* de-li */
+ {51128, 212}, /* de-lu */
+ {36918, 8}, /* el */
+ {51134, 104}, /* el-gr */
+ {36994, 9}, /* en */
+ {51140, 206}, /* en-au */
+ {51146, 238}, /* en-bz */
+ {51152, 213}, /* en-ca */
+ {51158, 189}, /* en-gb */
+ {51164, 223}, /* en-ie */
+ {51170, 257}, /* en-in */
+ {51176, 232}, /* en-jm */
+ {51182, 219}, /* en-nz */
+ {51188, 250}, /* en-ph */
+ {51194, 260}, /* en-sg */
+ {51200, 242}, /* en-tt */
+ {51206, 105}, /* en-us */
+ {51212, 228}, /* en-za */
+ {51218, 246}, /* en-zw */
+ {37032, 10}, /* es */
+ {51224, 243}, /* es-ar */
+ {51230, 258}, /* es-bo */
+ {51236, 251}, /* es-cl */
+ {51242, 235}, /* es-co */
+ {51248, 220}, /* es-cr */
+ {51254, 229}, /* es-do */
+ {51260, 247}, /* es-ec */
+ {51266, 207}, /* es-es */
+ {51272, 214}, /* es-gt */
+ {51278, 261}, /* es-hn */
+ {51284, 190}, /* es-mx */
+ {51290, 262}, /* es-ni */
+ {51296, 224}, /* es-pa */
+ {51302, 239}, /* es-pe */
+ {51308, 263}, /* es-pr */
+ {51314, 255}, /* es-py */
+ {51320, 259}, /* es-sv */
+ {51326, 264}, /* es-us */
+ {51332, 253}, /* es-uy */
+ {51338, 233}, /* es-ve */
+ {38425, 37}, /* et */
+ {51344, 132}, /* et-ee */
+ {38780, 45}, /* eu */
+ {51350, 140}, /* eu-es */
+ {38591, 41}, /* fa */
+ {51356, 136}, /* fa-ir */
+ {37082, 11}, /* fi */
+ {51362, 106}, /* fi-fi */
+ {41002, 84}, /* fil */
+ {51368, 174}, /* fil-ph */
+ {39159, 52}, /* fo */
+ {51375, 147}, /* fo-fo */
+ {37132, 12}, /* fr */
+ {51381, 191}, /* fr-be */
+ {51387, 208}, /* fr-ca */
+ {51393, 215}, /* fr-ch */
+ {51399, 107}, /* fr-fr */
+ {51405, 221}, /* fr-lu */
+ {51411, 225}, /* fr-mc */
+ {39353, 56}, /* ga */
+ {51417, 198}, /* ga-ie */
+ {41420, 96}, /* gd */
+ {51423, 185}, /* gd-gb */
+ {40654, 77}, /* gl */
+ {51429, 168}, /* gl-es */
+ {41300, 93}, /* gsw */
+ {39775, 64}, /* gu */
+ {51435, 156}, /* gu-in */
+ {41042, 85}, /* ha */
+ {51441, 282}, /* ha-latn */
+ {51449, 175}, /* ha-latn-ng */
+ {37182, 13}, /* he */
+ {51460, 108}, /* he-il */
+ {39188, 53}, /* hi */
+ {51466, 148}, /* hi-in */
+ {37824, 26}, /* hr */
+ {51472, 121}, /* hr-hr */
+ {37244, 14}, /* hu */
+ {51478, 109}, /* hu-hu */
+ {38693, 43}, /* hy */
+ {51484, 138}, /* hy-am */
+ {38137, 33}, /* id */
+ {51490, 128}, /* id-id */
{14510, 89}, /* ig */
- {51518, 179}, /* ig-ng */
- {41202, 90}, /* ii */
- {51524, 180}, /* ii-cn */
- {37310, 15}, /* is */
- {51530, 110}, /* is-is */
- {37361, 16}, /* it */
- {51536, 192}, /* it-ch */
- {51542, 111}, /* it-it */
- {37389, 17}, /* ja */
- {51548, 112}, /* ja-jp */
- {39074, 51}, /* ka */
- {51554, 146}, /* ka-ge */
- {39469, 58}, /* kk */
- {41154, 88}, /* kl */
- {51560, 178}, /* kl-gl */
- {40606, 75}, /* km */
- {51566, 166}, /* km-kh */
- {35857, 68}, /* kn */
- {51572, 160}, /* kn-in */
- {37446, 18}, /* ko */
- {51578, 113}, /* ko-kr */
- {40703, 78}, /* kok */
- {51584, 169}, /* kok-in */
- {39549, 59}, /* ky */
- {51591, 152}, /* ky-kg */
- {40651, 76}, /* lo */
- {51597, 167}, /* lo-la */
- {38541, 39}, /* lt */
- {51603, 134}, /* lt-lt */
- {38493, 38}, /* lv */
- {51609, 133}, /* lv-lv */
- {38848, 46}, /* mk */
- {51615, 141}, /* mk-mk */
- {40228, 69}, /* ml */
- {51621, 161}, /* ml-in */
- {40503, 72}, /* mn */
- {51627, 273}, /* mn-cyrl */
- {51635, 280}, /* mn-mong */
- {51643, 202}, /* mn-mong-cn */
- {40410, 71}, /* mr */
- {51654, 163}, /* mr-in */
- {39421, 57}, /* ms */
- {51660, 199}, /* ms-bn */
- {51666, 151}, /* ms-my */
- {39287, 54}, /* mt */
- {51672, 149}, /* mt-mt */
- {37561, 276}, /* nb */
- {51678, 115}, /* nb-no */
+ {51496, 179}, /* ig-ng */
+ {41180, 90}, /* ii */
+ {51502, 180}, /* ii-cn */
+ {37288, 15}, /* is */
+ {51508, 110}, /* is-is */
+ {37339, 16}, /* it */
+ {51514, 192}, /* it-ch */
+ {51520, 111}, /* it-it */
+ {37367, 17}, /* ja */
+ {51526, 112}, /* ja-jp */
+ {39052, 51}, /* ka */
+ {51532, 146}, /* ka-ge */
+ {39447, 58}, /* kk */
+ {41132, 88}, /* kl */
+ {51538, 178}, /* kl-gl */
+ {40584, 75}, /* km */
+ {51544, 166}, /* km-kh */
+ {35839, 68}, /* kn */
+ {51550, 160}, /* kn-in */
+ {37424, 18}, /* ko */
+ {51556, 113}, /* ko-kr */
+ {40681, 78}, /* kok */
+ {51562, 169}, /* kok-in */
+ {39527, 59}, /* ky */
+ {51569, 152}, /* ky-kg */
+ {40629, 76}, /* lo */
+ {51575, 167}, /* lo-la */
+ {38519, 39}, /* lt */
+ {51581, 134}, /* lt-lt */
+ {38471, 38}, /* lv */
+ {51587, 133}, /* lv-lv */
+ {38826, 46}, /* mk */
+ {51593, 141}, /* mk-mk */
+ {40206, 69}, /* ml */
+ {51599, 161}, /* ml-in */
+ {40481, 72}, /* mn */
+ {51605, 273}, /* mn-cyrl */
+ {51613, 280}, /* mn-mong */
+ {51621, 202}, /* mn-mong-cn */
+ {40388, 71}, /* mr */
+ {51632, 163}, /* mr-in */
+ {39399, 57}, /* ms */
+ {51638, 199}, /* ms-bn */
+ {51644, 151}, /* ms-my */
+ {39265, 54}, /* mt */
+ {51650, 149}, /* mt-mt */
+ {37539, 276}, /* nb */
+ {51656, 115}, /* nb-no */
{2059, 82}, /* ne */
- {51684, 172}, /* ne-np */
- {37484, 19}, /* nl */
- {51690, 193}, /* nl-be */
- {51696, 114}, /* nl-nl */
- {46683, 269}, /* nn */
- {51702, 194}, /* nn-no */
- {37534, 20}, /* no */
- {41114, 87}, /* nso */
- {51708, 177}, /* nso-za */
- {41295, 92}, /* oc */
- {51715, 182}, /* oc-fr */
+ {51662, 172}, /* ne-np */
+ {37462, 19}, /* nl */
+ {51668, 193}, /* nl-be */
+ {51674, 114}, /* nl-nl */
+ {46661, 269}, /* nn */
+ {51680, 194}, /* nn-no */
+ {37512, 20}, /* no */
+ {41092, 87}, /* nso */
+ {51686, 177}, /* nso-za */
+ {41273, 92}, /* oc */
+ {51693, 182}, /* oc-fr */
{14525, 65}, /* or */
- {51721, 157}, /* or-in */
- {39759, 63}, /* pa */
- {37564, 21}, /* pl */
- {51727, 116}, /* pl-pl */
- {40997, 83}, /* ps */
- {51733, 173}, /* ps-af */
- {37613, 22}, /* pt */
- {51739, 117}, /* pt-br */
- {51745, 195}, /* pt-pt */
- {37669, 23}, /* rm */
- {51751, 118}, /* rm-ch */
- {37718, 24}, /* ro */
- {51757, 119}, /* ro-ro */
- {37766, 25}, /* ru */
- {51763, 120}, /* ru-ru */
- {41419, 95}, /* rw */
- {51769, 184}, /* rw-rw */
- {41387, 94}, /* sah */
- {51775, 183}, /* sah-ru */
- {39333, 55}, /* se */
- {51782, 209}, /* se-fi */
- {51788, 150}, /* se-no */
- {40738, 79}, /* si */
- {51794, 170}, /* si-lk */
- {37898, 27}, /* sk */
- {51800, 122}, /* sk-sk */
- {38390, 36}, /* sl */
- {51806, 131}, /* sl-si */
- {37952, 28}, /* sq */
- {51812, 123}, /* sq-al */
- {48434, 277}, /* sr */
- {51818, 265}, /* sr-cyrl */
- {51826, 230}, /* sr-cyrl-ba */
- {51837, 248}, /* sr-cyrl-me */
- {51848, 240}, /* sr-cyrl-rs */
- {51859, 266}, /* sr-latn */
- {51867, 226}, /* sr-latn-ba */
- {51878, 244}, /* sr-latn-me */
- {51889, 236}, /* sr-latn-rs */
- {37978, 29}, /* sv */
- {51900, 196}, /* sv-fi */
- {51906, 124}, /* sv-se */
- {39581, 60}, /* sw */
- {51912, 153}, /* sw-ke */
- {39925, 66}, /* ta */
- {51918, 158}, /* ta-in */
- {40023, 67}, /* te */
- {51924, 159}, /* te-in */
- {38596, 40}, /* tg */
- {51930, 278}, /* tg-cyrl */
- {51938, 135}, /* tg-cyrl-tj */
- {38005, 30}, /* th */
- {51949, 125}, /* th-th */
- {38935, 47}, /* tn */
- {51955, 142}, /* tn-za */
- {38062, 31}, /* tr */
- {51961, 126}, /* tr-tr */
- {40869, 81}, /* tzm */
- {51967, 281}, /* tzm-latn */
- {38217, 34}, /* uk */
- {51976, 129}, /* uk-ua */
- {38104, 32}, /* ur */
- {51982, 127}, /* ur-pk */
- {39631, 61}, /* uz */
- {51988, 272}, /* uz-cyrl */
- {51996, 200}, /* uz-cyrl-uz */
- {52007, 279}, /* uz-latn */
- {52015, 154}, /* uz-latn-uz */
- {38667, 42}, /* vi */
- {52026, 137}, /* vi-vn */
- {38962, 48}, /* xh */
- {52032, 143}, /* xh-za */
- {41081, 86}, /* yo */
- {52038, 176}, /* yo-ng */
- {36752, 268}, /* zh */
- {52044, 3}, /* zh-chs */
- {52051, 275}, /* zh-cht */
- {52058, 187}, /* zh-cn */
- {52064, 4}, /* zh-hans */
- {52072, 274}, /* zh-hant */
- {52080, 204}, /* zh-hk */
- {52086, 217}, /* zh-mo */
- {52092, 211}, /* zh-sg */
- {52098, 100}, /* zh-tw */
- {38988, 49}, /* zu */
- {52104, 144} /* zu-za */
+ {51699, 157}, /* or-in */
+ {39737, 63}, /* pa */
+ {37542, 21}, /* pl */
+ {51705, 116}, /* pl-pl */
+ {40975, 83}, /* ps */
+ {51711, 173}, /* ps-af */
+ {37591, 22}, /* pt */
+ {51717, 117}, /* pt-br */
+ {51723, 195}, /* pt-pt */
+ {37647, 23}, /* rm */
+ {51729, 118}, /* rm-ch */
+ {37696, 24}, /* ro */
+ {51735, 119}, /* ro-ro */
+ {37744, 25}, /* ru */
+ {51741, 120}, /* ru-ru */
+ {41397, 95}, /* rw */
+ {51747, 184}, /* rw-rw */
+ {41365, 94}, /* sah */
+ {51753, 183}, /* sah-ru */
+ {39311, 55}, /* se */
+ {51760, 209}, /* se-fi */
+ {51766, 150}, /* se-no */
+ {40716, 79}, /* si */
+ {51772, 170}, /* si-lk */
+ {37876, 27}, /* sk */
+ {51778, 122}, /* sk-sk */
+ {38368, 36}, /* sl */
+ {51784, 131}, /* sl-si */
+ {37930, 28}, /* sq */
+ {51790, 123}, /* sq-al */
+ {48412, 277}, /* sr */
+ {51796, 265}, /* sr-cyrl */
+ {51804, 230}, /* sr-cyrl-ba */
+ {51815, 248}, /* sr-cyrl-me */
+ {51826, 240}, /* sr-cyrl-rs */
+ {51837, 266}, /* sr-latn */
+ {51845, 226}, /* sr-latn-ba */
+ {51856, 244}, /* sr-latn-me */
+ {51867, 236}, /* sr-latn-rs */
+ {37956, 29}, /* sv */
+ {51878, 196}, /* sv-fi */
+ {51884, 124}, /* sv-se */
+ {39559, 60}, /* sw */
+ {51890, 153}, /* sw-ke */
+ {39903, 66}, /* ta */
+ {51896, 158}, /* ta-in */
+ {40001, 67}, /* te */
+ {51902, 159}, /* te-in */
+ {38574, 40}, /* tg */
+ {51908, 278}, /* tg-cyrl */
+ {51916, 135}, /* tg-cyrl-tj */
+ {37983, 30}, /* th */
+ {51927, 125}, /* th-th */
+ {38913, 47}, /* tn */
+ {51933, 142}, /* tn-za */
+ {38040, 31}, /* tr */
+ {51939, 126}, /* tr-tr */
+ {40847, 81}, /* tzm */
+ {51945, 281}, /* tzm-latn */
+ {38195, 34}, /* uk */
+ {51954, 129}, /* uk-ua */
+ {38082, 32}, /* ur */
+ {51960, 127}, /* ur-pk */
+ {39609, 61}, /* uz */
+ {51966, 272}, /* uz-cyrl */
+ {51974, 200}, /* uz-cyrl-uz */
+ {51985, 279}, /* uz-latn */
+ {51993, 154}, /* uz-latn-uz */
+ {38645, 42}, /* vi */
+ {52004, 137}, /* vi-vn */
+ {38940, 48}, /* xh */
+ {52010, 143}, /* xh-za */
+ {41059, 86}, /* yo */
+ {52016, 176}, /* yo-ng */
+ {36730, 268}, /* zh */
+ {52022, 3}, /* zh-chs */
+ {52029, 275}, /* zh-cht */
+ {52036, 187}, /* zh-cn */
+ {52042, 4}, /* zh-hans */
+ {52050, 274}, /* zh-hant */
+ {52058, 204}, /* zh-hk */
+ {52064, 217}, /* zh-mo */
+ {52070, 211}, /* zh-sg */
+ {52076, 100}, /* zh-tw */
+ {38966, 49}, /* zu */
+ {52082, 144} /* zu-za */
};
static const RegionInfoEntry region_entries [] = {
- { 224,49842,47137,47137,52110,52131,36448,52178,52182,52210},
- { 3,45709,52234,52234,52238,52250,36228,52269,52273,52288},
- { 6,42889,52301,52301,52305,52313,35860,52324,52328,0},
- { 7,3781,48191,48191,52341,52349,36009,52397,52401,0},
- { 11,49333,47838,47838,52415,52415,35586,49056,52425,52440},
- { 14,47286,52455,52455,52459,52467,35481,52479,52483,52483},
- { 12,47319,52488,52488,52492,52492,35586,52502,52506,52506},
- { 5,43784,38776,38776,52524,52535,36256,52547,52551,52569},
- { 25,48437,52589,52589,52593,52616,36346,52653,52657,52693},
- { 23,47045,52736,52736,52740,52751,36294,52776,52780,52797},
- { 21,46524,38340,38340,52838,52846,35481,52479,52483,52855},
- { 35,41661,36605,36605,52860,52869,35465,52886,52890,52904},
- { 17,49954,52930,52930,52934,52942,36458,52957,52961,52976},
- { 37,46928,53000,53000,53004,53004,35586,53011,53015,53029},
- { 26,50134,53042,53042,53046,53046,36482,40573,53054,53073},
- { 32,42581,53083,53083,53087,53094,35751,53101,53105,53120},
- { 29,43275,53136,53136,53140,53148,0,53165,53169,53186},
- { 24,49090,53218,53218,53222,53222,35586,53229,53233,53233},
- { 39,47412,53247,53247,53251,53251,35586,53258,53262,53278},
- { 223,13261,53294,53294,53298,53310,0,53317,53321,53333},
- { 46,49735,53347,53347,53351,53351,35586,53357,53361,53374},
- { 45,13340,53387,53387,53391,53397,36184,53416,53420,53433},
- { 51,48934,53452,53452,53456,53456,35586,53465,53469,53484},
- { 54,48082,53500,53500,53504,53504,36328,53515,53519,53538},
- { 75,41824,53559,53559,53563,53578,35506,53596,53600,53622},
- { 94,41914,36907,36907,53637,53645,35481,52479,52483,52483},
- { 61,41866,53657,53657,53661,53669,35534,53677,53681,53694},
- { 65,48624,53706,53706,53710,53729,35586,53751,53755,53770},
- { 4,47842,53786,53786,53790,53798,36318,53813,53817,53832},
- { 66,49552,53856,53856,53860,53860,35586,53868,53872,53882},
- { 70,43373,50445,50445,53904,53912,35481,52479,52483,52855},
- { 67,47141,53918,53918,53922,53928,36298,53935,53939,53954},
- { 217,41704,37074,37074,53972,53978,35481,52479,52483,52855},
- { 73,45588,53986,53986,53990,53999,36208,54015,54019,54034},
- { 77,42044,37121,37121,54060,54068,35481,52479,52483,52855},
- { 81,44204,54074,54074,54078,54092,35534,53677,53681,54101},
- { 84,42088,37174,37174,54114,54114,35481,52479,52483,52855},
- { 242,45233,54121,54121,54125,54140,36189,54153,54157,54180},
- { 88,44150,54202,54202,54206,54214,0,54245,54249,54263},
- { 93,45987,54298,54298,54302,54312,35534,53677,53681,54329},
- { 98,41970,54347,54347,54351,54358,35481,52479,52483,54371},
- { 99,47730,54380,54380,54384,54384,7774,54394,54398,54417},
- { 104,47234,54438,54438,54442,54462,35586,54490,54494,54511},
- { 106,50274,54518,54518,54522,54522,2471,54531,54535,54552},
- { 108,42780,37867,37867,54571,54579,35857,54588,54592,54606},
- { 109,42189,37286,37286,54611,54619,35636,54633,54637,54654},
- { 111,43138,54668,54668,54672,54672,35883,54682,54686,54704},
- { 68,46877,54721,54721,54725,54733,35481,52479,52483,52483},
- { 117,42137,54739,54739,54743,54750,35632,54761,54765,54784},
- { 113,44261,38190,38190,54791,54797,36034,54810,54814,54827},
- { 121,46318,54862,54862,54866,54871,36267,54884,54888,54900},
- { 116,43562,54922,54922,54926,54931,36001,54942,54946,54959},
- { 110,42238,37333,37333,54979,54987,35534,54995,54999,55016},
- { 118,42281,37381,37381,55032,55038,35481,52479,52483,52483},
- { 124,48772,55045,55045,55049,55049,35586,55057,55061,55061},
- { 126,49236,55077,55077,55081,55088,36418,55101,55105,55121},
- { 122,42326,37411,37411,55143,55149,35502,55156,55160,55173},
- { 129,44514,55183,55183,55187,55187,36048,55193,55197,55213},
- { 130,44471,55231,55231,55235,55246,36041,55267,55271,0},
- { 40,45311,40643,40643,55286,55295,36192,55317,55321,55336},
- { 134,42381,37466,37466,55341,55353,35686,55366,55370,55387},
- { 136,49657,55404,55404,55408,55415,36438,55428,55432,55446},
- { 138,45353,40668,40668,55468,40658,36196,55473,55477,55489},
- { 139,49470,55499,55499,55503,55511,36428,55522,55526,55541},
- { 145,47991,55563,55563,55567,55567,0,53317,53321,55581},
- { 42,45529,55599,55599,55603,55613,36200,55645,55649,55666},
- { 141,43471,55701,55701,55705,55715,35975,55723,55727,55744},
- { 147,47649,55750,55750,55754,55765,35481,52479,52483,52483},
- { 140,43419,55775,55775,55779,55786,35933,55794,55798,55811},
- { 148,47532,55825,55825,55829,55835,36308,55846,55850,55863},
- { 159,48195,40437,40437,55883,55891,36332,55904,55908,55924},
- { 158,48320,55944,55944,55948,55948,35481,52479,52483,52855},
- { 270,49412,55955,55955,55959,55970,35481,52479,52483,55988},
- { 19618,43900,55993,55993,55997,56007,0,55993,56028,56045},
- { 151,47931,56077,56077,56081,56097,0,56125,56129,56145},
- { 163,44300,39304,39304,56155,56155,35481,52479,52483,56161},
- { 166,46473,56166,56166,56170,56177,35586,56185,56189,56202},
- { 167,44405,56216,56216,56220,56220,36038,56229,56233,56251},
- { 175,45817,56268,56268,56272,56280,36235,56289,56293,56308},
- { 182,50328,56314,56314,56318,56318,36489,56328,56332,56352},
- { 176,42433,37504,37504,56375,56387,35481,52479,52483,52483},
- { 177,42491,37553,37553,56397,56404,35534,56410,56414,56430},
- { 178,45649,56444,56444,56448,56454,36215,56470,56474,0},
- { 183,48026,56489,56489,56493,56493,35586,56505,56509,56509},
- { 164,48741,56528,56528,56532,56537,36365,56548,56552,56563},
- { 192,48272,39789,39789,56583,56590,36342,56598,56602,56620},
- { 187,49135,56637,56637,56641,56646,36406,56652,56656,56675},
- { 201,45763,56693,56693,56697,56709,36231,56719,56723,56723},
- { 190,43077,56739,56739,56743,56752,35878,56767,56771,56787},
- { 191,42532,56815,56815,56819,56826,35709,56833,56837,56850},
- { 202,50386,56864,56864,56868,56868,35586,53868,53872,53882},
- { 193,46740,56880,56880,56884,56884,35481,52479,52483,52483},
- { 185,50006,56893,56893,56897,56897,36468,56906,56910,56929},
- { 197,50058,56948,56948,56952,56958,36472,56965,56969,56981},
- { 200,42676,56999,56999,57003,57011,0,57020,57024,57037},
- { 271,49004,50768,50768,57051,57058,36391,57071,57075,57089},
- { 203,42732,37792,37792,57102,57109,35778,57122,57126,57140},
- { 204,46186,57172,57172,57176,57176,36239,57183,57187,0},
- { 205,13258,57201,57201,57205,57218,35409,57265,57269,57281},
- { 221,42933,57301,57301,57305,57312,35534,57320,57324,57338},
- { 215,47596,57351,57351,57355,57365,0,57375,57379,57396},
- { 212,43331,57409,57409,57413,57422,35481,52479,52483,57432},
- { 143,42842,57437,57437,57441,57450,35481,52479,52483,52483},
- { 72,50192,38417,38417,57471,57471,36485,53868,53872,53882},
- { 222,49060,57483,57483,57487,57493,36396,57504,57508,57521},
- { 227,42980,38023,38023,57541,38013,35871,57550,57554,57564},
- { 228,43514,57583,57583,57587,0,36041,57598,57602,57621},
- { 234,48516,57634,57634,57638,57646,36349,57655,57659,57674},
- { 235,43026,57695,57695,57699,57706,35875,57715,57719,57732},
- { 225,49279,57746,57746,57750,57750,35586,57770,57774,57774},
- { 237,41755,57801,57801,57805,57812,36242,57819,57823,57841},
- { 241,43205,38251,38251,57851,57859,35886,57874,57878,57896},
- { 244,42003,57930,57930,57934,57934,35586,53868,53872,53872},
- { 246,49892,57948,57948,57952,57952,35586,57960,57964,57979},
- { 247,44588,39651,39651,57993,58004,36261,58025,58029,58044},
- { 249,48826,58063,58063,58067,58067,36375,58077,58081,58101},
- { 251,43620,58121,58121,58125,58133,36005,58144,58148,58164},
- { 261,48882,58172,58172,58176,58182,36381,58193,58197,58209},
- { 209,43931,58227,58227,58231,0,10511,58244,58248,0},
- { 264,49502,58267,58267,58271,58271,35586,53868,53872,53872}
+ { 224,49820,47115,47115,52088,52109,36426,52156,52160,52188},
+ { 3,45687,52212,52212,52216,52228,36206,52247,52251,52266},
+ { 6,42867,52279,52279,52283,52291,35842,52302,52306,0},
+ { 7,3781,48169,48169,52319,52327,35987,52375,52379,0},
+ { 11,49311,47816,47816,52393,52393,35586,49034,52403,52418},
+ { 14,47264,52433,52433,52437,52445,35481,52457,52461,52461},
+ { 12,47297,52466,52466,52470,52470,35586,52480,52484,52484},
+ { 5,43762,38754,38754,52502,52513,36234,52525,52529,52547},
+ { 25,48415,52567,52567,52571,52594,36324,52631,52635,52671},
+ { 23,47023,52714,52714,52718,52729,36272,52754,52758,52775},
+ { 21,46502,38318,38318,52816,52824,35481,52457,52461,52833},
+ { 35,41639,36583,36583,52838,52847,35465,52864,52868,52882},
+ { 17,49932,52908,52908,52912,52920,36436,52935,52939,52954},
+ { 37,46906,52978,52978,52982,52982,35586,52989,52993,53007},
+ { 26,50112,53020,53020,53024,53024,36460,40551,53032,53051},
+ { 32,42559,53061,53061,53065,53072,35735,53079,53083,53098},
+ { 29,43253,53114,53114,53118,53126,0,53143,53147,53164},
+ { 24,49068,53196,53196,53200,53200,35586,53207,53211,53211},
+ { 39,47390,53225,53225,53229,53229,35586,53236,53240,53256},
+ { 223,13261,53272,53272,53276,53288,0,53295,53299,53311},
+ { 46,49713,53325,53325,53329,53329,35586,53335,53339,53352},
+ { 45,13340,53365,53365,53369,53375,36162,53394,53398,53411},
+ { 51,48912,53430,53430,53434,53434,35586,53443,53447,53462},
+ { 54,48060,53478,53478,53482,53482,36306,53493,53497,53516},
+ { 75,41802,53537,53537,53541,53556,35506,53574,53578,53600},
+ { 94,41892,36885,36885,53615,53623,35481,52457,52461,52461},
+ { 61,41844,53635,53635,53639,53647,35534,53655,53659,53672},
+ { 65,48602,53684,53684,53688,53707,35586,53729,53733,53748},
+ { 4,47820,53764,53764,53768,53776,36296,53791,53795,53810},
+ { 66,49530,53834,53834,53838,53838,35586,53846,53850,53860},
+ { 70,43351,50423,50423,53882,53890,35481,52457,52461,52833},
+ { 67,47119,53896,53896,53900,53906,36276,53913,53917,53932},
+ { 217,41682,37052,37052,53950,53956,35481,52457,52461,52833},
+ { 73,45566,53964,53964,53968,53977,36186,53993,53997,54012},
+ { 77,42022,37099,37099,54038,54046,35481,52457,52461,52833},
+ { 81,44182,54052,54052,54056,54070,35534,53655,53659,54079},
+ { 84,42066,37152,37152,54092,54092,35481,52457,52461,52833},
+ { 242,45211,54099,54099,54103,54118,36167,54131,54135,54158},
+ { 88,44128,54180,54180,54184,54192,0,54223,54227,54241},
+ { 93,45965,54276,54276,54280,54290,35534,53655,53659,54307},
+ { 98,41948,54325,54325,54329,54336,35481,52457,52461,54349},
+ { 99,47708,54358,54358,54362,54362,7774,54372,54376,54395},
+ { 104,47212,54416,54416,54420,54440,35586,54468,54472,54489},
+ { 106,50252,54496,54496,54500,54500,2471,54509,54513,54530},
+ { 108,42758,37845,37845,54549,54557,35839,54566,54570,54584},
+ { 109,42167,37264,37264,54589,54597,35636,54611,54615,54632},
+ { 111,43116,54646,54646,54650,54650,35865,54660,54664,54682},
+ { 68,46855,54699,54699,54703,54711,35481,52457,52461,52461},
+ { 117,42115,54717,54717,54721,54728,35632,54739,54743,54762},
+ { 113,44239,38168,38168,54769,54775,36012,54788,54792,54805},
+ { 121,46296,54840,54840,54844,54849,36245,54862,54866,54878},
+ { 116,43540,54900,54900,54904,54909,35979,54920,54924,54937},
+ { 110,42216,37311,37311,54957,54965,35534,54973,54977,54994},
+ { 118,42259,37359,37359,55010,55016,35481,52457,52461,52461},
+ { 124,48750,55023,55023,55027,55027,35586,55035,55039,55039},
+ { 126,49214,55055,55055,55059,55066,36396,55079,55083,55099},
+ { 122,42304,37389,37389,55121,55127,35502,55134,55138,55151},
+ { 129,44492,55161,55161,55165,55165,36026,55171,55175,55191},
+ { 130,44449,55209,55209,55213,55224,36019,55245,55249,0},
+ { 40,45289,40621,40621,55264,55273,36170,55295,55299,55314},
+ { 134,42359,37444,37444,55319,55331,35670,55344,55348,55365},
+ { 136,49635,55382,55382,55386,55393,36416,55406,55410,55424},
+ { 138,45331,40646,40646,55446,40636,36174,55451,55455,55467},
+ { 139,49448,55477,55477,55481,55489,36406,55500,55504,55519},
+ { 145,47969,55541,55541,55545,55545,0,53295,53299,55559},
+ { 42,45507,55577,55577,55581,55591,36178,55623,55627,55644},
+ { 141,43449,55679,55679,55683,55693,35955,55701,55705,55722},
+ { 147,47627,55728,55728,55732,55743,35481,52457,52461,52461},
+ { 140,43397,55753,55753,55757,55764,35915,55772,55776,55789},
+ { 148,47510,55803,55803,55807,55813,36286,55824,55828,55841},
+ { 159,48173,40415,40415,55861,55869,36310,55882,55886,55902},
+ { 158,48298,55922,55922,55926,55926,35481,52457,52461,52833},
+ { 270,49390,55933,55933,55937,55948,35481,52457,52461,55966},
+ { 19618,43878,55971,55971,55975,55985,0,55971,56006,56023},
+ { 151,47909,56055,56055,56059,56075,0,56103,56107,56123},
+ { 163,44278,39282,39282,56133,56133,35481,52457,52461,56139},
+ { 166,46451,56144,56144,56148,56155,35586,56163,56167,56180},
+ { 167,44383,56194,56194,56198,56198,36016,56207,56211,56229},
+ { 175,45795,56246,56246,56250,56258,36213,56267,56271,56286},
+ { 182,50306,56292,56292,56296,56296,36467,56306,56310,56330},
+ { 176,42411,37482,37482,56353,56365,35481,52457,52461,52461},
+ { 177,42469,37531,37531,56375,56382,35534,56388,56392,56408},
+ { 178,45627,56422,56422,56426,56432,36193,56448,56452,0},
+ { 183,48004,56467,56467,56471,56471,35586,56483,56487,56487},
+ { 164,48719,56506,56506,56510,56515,36343,56526,56530,56541},
+ { 192,48250,39767,39767,56561,56568,36320,56576,56580,56598},
+ { 187,49113,56615,56615,56619,56624,36384,56630,56634,56653},
+ { 201,45741,56671,56671,56675,56687,36209,56697,56701,56701},
+ { 190,43055,56717,56717,56721,56730,35860,56745,56749,56765},
+ { 191,42510,56793,56793,56797,56804,35693,56811,56815,56828},
+ { 202,50364,56842,56842,56846,56846,35586,53846,53850,53860},
+ { 193,46718,56858,56858,56862,56862,35481,52457,52461,52461},
+ { 185,49984,56871,56871,56875,56875,36446,56884,56888,56907},
+ { 197,50036,56926,56926,56930,56936,36450,56943,56947,56959},
+ { 200,42654,56977,56977,56981,56989,0,56998,57002,57015},
+ { 271,48982,50746,50746,57029,57036,36369,57049,57053,57067},
+ { 203,42710,37770,37770,57080,57087,35760,57100,57104,57118},
+ { 204,46164,57150,57150,57154,57154,36217,57161,57165,0},
+ { 205,13258,57179,57179,57183,57196,35409,57243,57247,57259},
+ { 221,42911,57279,57279,57283,57290,35534,57298,57302,57316},
+ { 215,47574,57329,57329,57333,57343,0,57353,57357,57374},
+ { 212,43309,57387,57387,57391,57400,35481,52457,52461,57410},
+ { 143,42820,57415,57415,57419,57428,35481,52457,52461,52461},
+ { 72,50170,38395,38395,57449,57449,36463,53846,53850,53860},
+ { 222,49038,57461,57461,57465,57471,36374,57482,57486,57499},
+ { 227,42958,38001,38001,57519,37991,35853,57528,57532,57542},
+ { 228,43492,57561,57561,57565,0,36019,57576,57580,57599},
+ { 234,48494,57612,57612,57616,57624,36327,57633,57637,57652},
+ { 235,43004,57673,57673,57677,57684,35857,57693,57697,57710},
+ { 225,49257,57724,57724,57728,57728,35586,57748,57752,57752},
+ { 237,41733,57779,57779,57783,57790,36220,57797,57801,57819},
+ { 241,43183,38229,38229,57829,57837,35868,57852,57856,57874},
+ { 244,41981,57908,57908,57912,57912,35586,53846,53850,53850},
+ { 246,49870,57926,57926,57930,57930,35586,57938,57942,57957},
+ { 247,44566,39629,39629,57971,57982,36239,58003,58007,58022},
+ { 249,48804,58041,58041,58045,58045,36353,58055,58059,58079},
+ { 251,43598,58099,58099,58103,58111,35983,58122,58126,58142},
+ { 261,48860,58150,58150,58154,58160,36359,58171,58175,58187},
+ { 209,43909,58205,58205,58209,0,10511,58222,58226,0},
+ { 264,49480,58245,58245,58249,58249,35586,53846,53850,53850}
};
static const RegionInfoNameEntry region_name_entries [] = {
- {49842, 0}, /* AE */
- {45709, 1}, /* AF */
- {42889, 2}, /* AL */
+ {49820, 0}, /* AE */
+ {45687, 1}, /* AF */
+ {42867, 2}, /* AL */
{3781, 3}, /* AM */
- {49333, 4}, /* AR */
- {47286, 5}, /* AT */
- {47319, 6}, /* AU */
- {43784, 7}, /* AZ */
- {48437, 8}, /* BA */
- {47045, 9}, /* BD */
- {46524, 10}, /* BE */
- {41661, 11}, /* BG */
- {49954, 12}, /* BH */
- {46928, 13}, /* BN */
- {50134, 14}, /* BO */
- {42581, 15}, /* BR */
- {43275, 16}, /* BY */
- {49090, 17}, /* BZ */
- {47412, 18}, /* CA */
+ {49311, 4}, /* AR */
+ {47264, 5}, /* AT */
+ {47297, 6}, /* AU */
+ {43762, 7}, /* AZ */
+ {48415, 8}, /* BA */
+ {47023, 9}, /* BD */
+ {46502, 10}, /* BE */
+ {41639, 11}, /* BG */
+ {49932, 12}, /* BH */
+ {46906, 13}, /* BN */
+ {50112, 14}, /* BO */
+ {42559, 15}, /* BR */
+ {43253, 16}, /* BY */
+ {49068, 17}, /* BZ */
+ {47390, 18}, /* CA */
{13261, 19}, /* CH */
- {49735, 20}, /* CL */
+ {49713, 20}, /* CL */
{13340, 21}, /* CN */
- {48934, 22}, /* CO */
- {48082, 23}, /* CR */
- {41824, 24}, /* CZ */
- {41914, 25}, /* DE */
- {41866, 26}, /* DK */
- {48624, 27}, /* DO */
- {47842, 28}, /* DZ */
- {49552, 29}, /* EC */
- {43373, 30}, /* EE */
- {47141, 31}, /* EG */
- {41704, 32}, /* ES */
- {45588, 33}, /* ET */
- {42044, 34}, /* FI */
- {44204, 35}, /* FO */
- {42088, 36}, /* FR */
- {45233, 37}, /* GB */
- {44150, 38}, /* GE */
- {45987, 39}, /* GL */
- {41970, 40}, /* GR */
- {47730, 41}, /* GT */
- {47234, 42}, /* HK */
- {50274, 43}, /* HN */
- {42780, 44}, /* HR */
- {42189, 45}, /* HU */
- {43138, 46}, /* ID */
- {46877, 47}, /* IE */
- {42137, 48}, /* IL */
- {44261, 49}, /* IN */
- {46318, 50}, /* IQ */
- {43562, 51}, /* IR */
- {42238, 52}, /* IS */
- {42281, 53}, /* IT */
- {48772, 54}, /* JM */
- {49236, 55}, /* JO */
- {42326, 56}, /* JP */
- {44514, 57}, /* KE */
- {44471, 58}, /* KG */
- {45311, 59}, /* KH */
- {42381, 60}, /* KR */
- {49657, 61}, /* KW */
- {45353, 62}, /* LA */
- {49470, 63}, /* LB */
- {47991, 64}, /* LI */
- {45529, 65}, /* LK */
- {43471, 66}, /* LT */
- {47649, 67}, /* LU */
- {43419, 68}, /* LV */
- {47532, 69}, /* LY */
- {48195, 70}, /* MA */
- {48320, 71}, /* MC */
- {49412, 72}, /* ME */
- {43900, 73}, /* MK */
- {47931, 74}, /* MO */
- {44300, 75}, /* MT */
- {46473, 76}, /* MX */
- {44405, 77}, /* MY */
- {45817, 78}, /* NG */
- {50328, 79}, /* NI */
- {42433, 80}, /* NL */
- {42491, 81}, /* NO */
- {45649, 82}, /* NP */
- {48026, 83}, /* NZ */
- {48741, 84}, /* OM */
- {48272, 85}, /* PA */
- {49135, 86}, /* PE */
- {45763, 87}, /* PH */
- {43077, 88}, /* PK */
- {42532, 89}, /* PL */
- {50386, 90}, /* PR */
- {46740, 91}, /* PT */
- {50006, 92}, /* PY */
- {50058, 93}, /* QA */
- {42676, 94}, /* RO */
- {49004, 95}, /* RS */
- {42732, 96}, /* RU */
- {46186, 97}, /* RW */
+ {48912, 22}, /* CO */
+ {48060, 23}, /* CR */
+ {41802, 24}, /* CZ */
+ {41892, 25}, /* DE */
+ {41844, 26}, /* DK */
+ {48602, 27}, /* DO */
+ {47820, 28}, /* DZ */
+ {49530, 29}, /* EC */
+ {43351, 30}, /* EE */
+ {47119, 31}, /* EG */
+ {41682, 32}, /* ES */
+ {45566, 33}, /* ET */
+ {42022, 34}, /* FI */
+ {44182, 35}, /* FO */
+ {42066, 36}, /* FR */
+ {45211, 37}, /* GB */
+ {44128, 38}, /* GE */
+ {45965, 39}, /* GL */
+ {41948, 40}, /* GR */
+ {47708, 41}, /* GT */
+ {47212, 42}, /* HK */
+ {50252, 43}, /* HN */
+ {42758, 44}, /* HR */
+ {42167, 45}, /* HU */
+ {43116, 46}, /* ID */
+ {46855, 47}, /* IE */
+ {42115, 48}, /* IL */
+ {44239, 49}, /* IN */
+ {46296, 50}, /* IQ */
+ {43540, 51}, /* IR */
+ {42216, 52}, /* IS */
+ {42259, 53}, /* IT */
+ {48750, 54}, /* JM */
+ {49214, 55}, /* JO */
+ {42304, 56}, /* JP */
+ {44492, 57}, /* KE */
+ {44449, 58}, /* KG */
+ {45289, 59}, /* KH */
+ {42359, 60}, /* KR */
+ {49635, 61}, /* KW */
+ {45331, 62}, /* LA */
+ {49448, 63}, /* LB */
+ {47969, 64}, /* LI */
+ {45507, 65}, /* LK */
+ {43449, 66}, /* LT */
+ {47627, 67}, /* LU */
+ {43397, 68}, /* LV */
+ {47510, 69}, /* LY */
+ {48173, 70}, /* MA */
+ {48298, 71}, /* MC */
+ {49390, 72}, /* ME */
+ {43878, 73}, /* MK */
+ {47909, 74}, /* MO */
+ {44278, 75}, /* MT */
+ {46451, 76}, /* MX */
+ {44383, 77}, /* MY */
+ {45795, 78}, /* NG */
+ {50306, 79}, /* NI */
+ {42411, 80}, /* NL */
+ {42469, 81}, /* NO */
+ {45627, 82}, /* NP */
+ {48004, 83}, /* NZ */
+ {48719, 84}, /* OM */
+ {48250, 85}, /* PA */
+ {49113, 86}, /* PE */
+ {45741, 87}, /* PH */
+ {43055, 88}, /* PK */
+ {42510, 89}, /* PL */
+ {50364, 90}, /* PR */
+ {46718, 91}, /* PT */
+ {49984, 92}, /* PY */
+ {50036, 93}, /* QA */
+ {42654, 94}, /* RO */
+ {48982, 95}, /* RS */
+ {42710, 96}, /* RU */
+ {46164, 97}, /* RW */
{13258, 98}, /* SA */
- {42933, 99}, /* SE */
- {47596, 100}, /* SG */
- {43331, 101}, /* SI */
- {42842, 102}, /* SK */
- {50192, 103}, /* SV */
- {49060, 104}, /* SY */
- {42980, 105}, /* TH */
- {43514, 106}, /* TJ */
- {48516, 107}, /* TN */
- {43026, 108}, /* TR */
- {49279, 109}, /* TT */
- {41755, 110}, /* TW */
- {43205, 111}, /* UA */
- {42003, 112}, /* US */
- {49892, 113}, /* UY */
- {44588, 114}, /* UZ */
- {48826, 115}, /* VE */
- {43620, 116}, /* VN */
- {48882, 117}, /* YE */
- {43931, 118}, /* ZA */
- {49502, 119} /* ZW */
+ {42911, 99}, /* SE */
+ {47574, 100}, /* SG */
+ {43309, 101}, /* SI */
+ {42820, 102}, /* SK */
+ {50170, 103}, /* SV */
+ {49038, 104}, /* SY */
+ {42958, 105}, /* TH */
+ {43492, 106}, /* TJ */
+ {48494, 107}, /* TN */
+ {43004, 108}, /* TR */
+ {49257, 109}, /* TT */
+ {41733, 110}, /* TW */
+ {43183, 111}, /* UA */
+ {41981, 112}, /* US */
+ {49870, 113}, /* UY */
+ {44566, 114}, /* UZ */
+ {48804, 115}, /* VE */
+ {43598, 116}, /* VN */
+ {48860, 117}, /* YE */
+ {43909, 118}, /* ZA */
+ {49480, 119} /* ZW */
};
@@ -4947,8 +4947,6 @@ static const char locale_strings [] = {
"\xe2\x82\xaa\0"
"Ft\0"
"EiTa\0"
- "\xe2\x88\x92Infinity\0"
- "\xe2\x88\x92\0"
"+Infinito\0"
"NaN\xef\xbc\x88\xe9\x9d\x9e\xe6\x95\xb0\xef\xbc\x89\0"
"\xe2\x82\xa9\0"
@@ -4959,7 +4957,7 @@ static const char locale_strings [] = {
"+niesko\xc5\x84\x63zono\xc5\x9b\xc4\x87\0"
"R$\0"
"\xe2\x80\x99\0"
- "\xe2\x88\x92infinit\0"
+ "-infinit\0"
"+infinit\0"
"\xd1\x80\xd1\x83\xd0\xb1.\0"
"\xd0\xbd\xd0\xb5 \xd1\x87\xd0\xb8\xd1\x81\xd0\xbb\xd0\xbe\0"
@@ -4978,10 +4976,10 @@ static const char locale_strings [] = {
"neskon\xc4\x8dnost\0"
"Ls\0"
"nav\xc2\xa0skaitlis\0"
- "\xe2\x88\x92\x62\x65zgal\xc4\xab\x62\x61\0"
+ "-bezgal\xc4\xab\x62\x61\0"
"bezgal\xc4\xab\x62\x61\0"
"Lt\0"
- "\xe2\x88\x92\x62\x65galyb\xc4\x97\0"
+ "-begalyb\xc4\x97\0"
"begalyb\xc4\x97\0"
"\xef\xb7\xbc\0"
"\xe2\x82\xab\0"
diff --git a/mono/metadata/debug-helpers.h b/mono/metadata/debug-helpers.h
index 8743dced04a..09092f9e380 100644
--- a/mono/metadata/debug-helpers.h
+++ b/mono/metadata/debug-helpers.h
@@ -19,28 +19,28 @@ struct MonoDisHelper {
void* user_data;
};
-char* mono_disasm_code_one (MonoDisHelper *dh, MonoMethod *method, const mono_byte *ip, const mono_byte** endp);
-char* mono_disasm_code (MonoDisHelper *dh, MonoMethod *method, const mono_byte *ip, const mono_byte* end);
+MONO_API char* mono_disasm_code_one (MonoDisHelper *dh, MonoMethod *method, const mono_byte *ip, const mono_byte** endp);
+MONO_API char* mono_disasm_code (MonoDisHelper *dh, MonoMethod *method, const mono_byte *ip, const mono_byte* end);
typedef struct MonoMethodDesc MonoMethodDesc;
-char* mono_type_full_name (MonoType *type);
+MONO_API char* mono_type_full_name (MonoType *type);
-char* mono_signature_get_desc (MonoMethodSignature *sig, mono_bool include_namespace);
+MONO_API char* mono_signature_get_desc (MonoMethodSignature *sig, mono_bool include_namespace);
-char* mono_context_get_desc (MonoGenericContext *context);
+MONO_API char* mono_context_get_desc (MonoGenericContext *context);
-MonoMethodDesc* mono_method_desc_new (const char *name, mono_bool include_namespace);
-MonoMethodDesc* mono_method_desc_from_method (MonoMethod *method);
-void mono_method_desc_free (MonoMethodDesc *desc);
-mono_bool mono_method_desc_match (MonoMethodDesc *desc, MonoMethod *method);
-mono_bool mono_method_desc_full_match (MonoMethodDesc *desc, MonoMethod *method);
-MonoMethod* mono_method_desc_search_in_class (MonoMethodDesc *desc, MonoClass *klass);
-MonoMethod* mono_method_desc_search_in_image (MonoMethodDesc *desc, MonoImage *image);
+MONO_API MonoMethodDesc* mono_method_desc_new (const char *name, mono_bool include_namespace);
+MONO_API MonoMethodDesc* mono_method_desc_from_method (MonoMethod *method);
+MONO_API void mono_method_desc_free (MonoMethodDesc *desc);
+MONO_API mono_bool mono_method_desc_match (MonoMethodDesc *desc, MonoMethod *method);
+MONO_API mono_bool mono_method_desc_full_match (MonoMethodDesc *desc, MonoMethod *method);
+MONO_API MonoMethod* mono_method_desc_search_in_class (MonoMethodDesc *desc, MonoClass *klass);
+MONO_API MonoMethod* mono_method_desc_search_in_image (MonoMethodDesc *desc, MonoImage *image);
-char* mono_method_full_name (MonoMethod *method, mono_bool signature);
+MONO_API char* mono_method_full_name (MonoMethod *method, mono_bool signature);
-char* mono_field_full_name (MonoClassField *field);
+MONO_API char* mono_field_full_name (MonoClassField *field);
MONO_END_DECLS
diff --git a/mono/metadata/debug-mono-symfile.c b/mono/metadata/debug-mono-symfile.c
index d4c1241478f..9832418bec1 100644
--- a/mono/metadata/debug-mono-symfile.c
+++ b/mono/metadata/debug-mono-symfile.c
@@ -30,6 +30,7 @@
#include <mono/metadata/metadata-internals.h>
#include <mono/metadata/class-internals.h>
#include <mono/utils/mono-mmap.h>
+#include <mono/utils/bsearch.h>
#include <fcntl.h>
#ifdef HAVE_UNISTD_H
@@ -731,7 +732,7 @@ mono_debug_symfile_lookup_method (MonoDebugHandle *handle, MonoMethod *method)
first_ie = (MonoSymbolFileMethodEntry *)
(symfile->raw_contents + read32(&(symfile->offset_table->_method_table_offset)));
- ie = bsearch (GUINT_TO_POINTER (mono_method_get_token (method)), first_ie,
+ ie = mono_binary_search (GUINT_TO_POINTER (mono_method_get_token (method)), first_ie,
read32(&(symfile->offset_table->_method_count)),
sizeof (MonoSymbolFileMethodEntry), compare_method);
diff --git a/mono/metadata/debug-mono-symfile.h b/mono/metadata/debug-mono-symfile.h
index 36805ea3b6f..6ea3bccfc6e 100644
--- a/mono/metadata/debug-mono-symfile.h
+++ b/mono/metadata/debug-mono-symfile.h
@@ -122,43 +122,43 @@ typedef struct {
MONO_BEGIN_DECLS
-MonoSymbolFile *
+MONO_API MonoSymbolFile *
mono_debug_open_mono_symbols (MonoDebugHandle *handle,
const uint8_t *raw_contents,
int size,
mono_bool in_the_debugger);
-void
+MONO_API void
mono_debug_close_mono_symbol_file (MonoSymbolFile *symfile);
-mono_bool
+MONO_API mono_bool
mono_debug_symfile_is_loaded (MonoSymbolFile *symfile);
-MonoDebugSourceLocation *
+MONO_API MonoDebugSourceLocation *
mono_debug_symfile_lookup_location (MonoDebugMethodInfo *minfo,
uint32_t offset);
-void
+MONO_API void
mono_debug_symfile_free_location (MonoDebugSourceLocation *location);
int32_t
_mono_debug_address_from_il_offset (MonoDebugMethodJitInfo *jit,
uint32_t il_offset);
-MonoDebugMethodInfo *
+MONO_API MonoDebugMethodInfo *
mono_debug_symfile_lookup_method (MonoDebugHandle *handle,
MonoMethod *method);
-MonoDebugLocalsInfo*
+MONO_API MonoDebugLocalsInfo*
mono_debug_symfile_lookup_locals (MonoDebugMethodInfo *minfo);
-void
+MONO_API void
mono_debug_symfile_free_locals (MonoDebugLocalsInfo *info);
-void
+MONO_API void
mono_debug_symfile_get_line_numbers (MonoDebugMethodInfo *minfo, char **source_file, int *n_il_offsets, int **il_offsets, int **line_numbers);
-void
+MONO_API void
mono_debug_symfile_get_line_numbers_full (MonoDebugMethodInfo *minfo, char **source_file, GPtrArray **source_file_list, int *n_il_offsets, int **il_offsets, int **line_numbers, int **column_numbers, int **source_files);
MONO_END_DECLS
diff --git a/mono/metadata/domain-internals.h b/mono/metadata/domain-internals.h
index f337d0770a9..8ffe885532f 100644
--- a/mono/metadata/domain-internals.h
+++ b/mono/metadata/domain-internals.h
@@ -190,7 +190,11 @@ struct _MonoJitInfo {
next_jit_code_hash) must be in the same order and at the
same offset as in RuntimeMethod, because of the jit_code_hash
internal hash table in MonoDomain. */
- MonoMethod *method;
+ union {
+ MonoMethod *method;
+ MonoImage *image;
+ gpointer aot_info;
+ } d;
struct _MonoJitInfo *next_jit_code_hash;
gpointer code_start;
/* This might contain an id for the unwind info instead of a register mask */
@@ -207,6 +211,10 @@ struct _MonoJitInfo {
gboolean from_llvm:1;
gboolean dbg_hidden_inited:1;
gboolean dbg_hidden:1;
+ /* Whenever this jit info was loaded in async context */
+ gboolean async:1;
+ gboolean dbg_step_through_inited:1;
+ gboolean dbg_step_through:1;
/* FIXME: Embed this after the structure later*/
gpointer gc_info; /* Currently only used by SGen */
@@ -226,6 +234,17 @@ struct _MonoAppContext {
gpointer *static_data;
};
+/* Lock-free allocator */
+typedef struct {
+ guint8 *mem;
+ gpointer prev;
+ int size, pos;
+} LockFreeMempoolChunk;
+
+typedef struct {
+ LockFreeMempoolChunk *current, *chunks;
+} LockFreeMempool;
+
/*
* We have two unloading states because the domain
* must remain fully functional while AppDomain::DomainUnload is
@@ -315,10 +334,17 @@ struct _MonoDomain {
int num_jit_info_tables;
MonoJitInfoTable *
volatile jit_info_table;
+ /*
+ * Contains information about AOT loaded code.
+ * Only used in the root domain.
+ */
+ MonoJitInfoTable *
+ volatile aot_modules;
GSList *jit_info_free_queue;
/* Used when loading assemblies */
gchar **search_path;
gchar *private_bin_path;
+ LockFreeMempool *lock_free_mp;
/* Used by remoting proxies */
MonoMethod *create_proxy_for_type_method;
@@ -459,6 +485,9 @@ mono_domain_alloc (MonoDomain *domain, guint size) MONO_INTERNAL;
gpointer
mono_domain_alloc0 (MonoDomain *domain, guint size) MONO_INTERNAL;
+gpointer
+mono_domain_alloc0_lock_free (MonoDomain *domain, guint size) MONO_INTERNAL;
+
void*
mono_domain_code_reserve (MonoDomain *domain, int size) MONO_LLVM_INTERNAL;
@@ -608,7 +637,7 @@ MonoImage *mono_assembly_open_from_bundle (const char *filename,
MonoImageOpenStatus *status,
gboolean refonly) MONO_INTERNAL;
-void
+MONO_API void
mono_domain_add_class_static_data (MonoDomain *domain, MonoClass *klass, gpointer data, guint32 *bitmap);
MonoReflectionAssembly *
@@ -625,6 +654,8 @@ int mono_framework_version (void) MONO_INTERNAL;
void mono_reflection_cleanup_domain (MonoDomain *domain) MONO_INTERNAL;
-void mono_assembly_cleanup_domain_bindings (guint32 domain_id) MONO_INTERNAL;;
+void mono_assembly_cleanup_domain_bindings (guint32 domain_id) MONO_INTERNAL;
+
+MonoJitInfo* mono_jit_info_table_find_internal (MonoDomain *domain, char *addr, gboolean try_aot) MONO_INTERNAL;
#endif /* __MONO_METADATA_DOMAIN_INTERNALS_H__ */
diff --git a/mono/metadata/domain.c b/mono/metadata/domain.c
index 4f7bcfb8ea9..7f52929f504 100644
--- a/mono/metadata/domain.c
+++ b/mono/metadata/domain.c
@@ -17,12 +17,14 @@
#include <mono/metadata/gc-internal.h>
+#include <mono/utils/atomic.h>
#include <mono/utils/mono-compiler.h>
#include <mono/utils/mono-logger-internal.h>
#include <mono/utils/mono-membar.h>
#include <mono/utils/mono-counters.h>
#include <mono/utils/hazard-pointer.h>
#include <mono/utils/mono-tls.h>
+#include <mono/utils/mono-mmap.h>
#include <mono/metadata/object.h>
#include <mono/metadata/object-internals.h>
#include <mono/metadata/domain-internals.h>
@@ -102,23 +104,10 @@ typedef struct {
int startup_count;
} AppConfigInfo;
-/*
- * AotModuleInfo: Contains information about AOT modules.
- */
-typedef struct {
- MonoImage *image;
- gpointer start, end;
-} AotModuleInfo;
-
static const MonoRuntimeInfo *current_runtime = NULL;
static MonoJitInfoFindInAot jit_info_find_in_aot_func = NULL;
-/*
- * Contains information about AOT loaded code.
- */
-static MonoAotModuleInfoTable *aot_modules = NULL;
-
/* This is the list of runtime versions supported by this JIT.
*/
static const MonoRuntimeInfo supported_runtimes[] = {
@@ -147,9 +136,6 @@ get_runtimes_from_exe (const char *exe_file, MonoImage **exe_image, const MonoRu
static const MonoRuntimeInfo*
get_runtime_by_version (const char *version);
-static MonoImage*
-mono_jit_info_find_aot_module (guint8* addr);
-
MonoNativeTlsKey
mono_domain_get_tls_key (void)
{
@@ -174,7 +160,7 @@ mono_domain_get_tls_offset (void)
#define JIT_INFO_TABLE_HIGH_WATERMARK(n) ((n) * 5 / 6)
#define JIT_INFO_TOMBSTONE_MARKER ((MonoMethod*)NULL)
-#define IS_JIT_INFO_TOMBSTONE(ji) ((ji)->method == JIT_INFO_TOMBSTONE_MARKER)
+#define IS_JIT_INFO_TOMBSTONE(ji) ((ji)->d.method == JIT_INFO_TOMBSTONE_MARKER)
#define JIT_INFO_TABLE_HAZARD_INDEX 0
#define JIT_INFO_HAZARD_INDEX 1
@@ -331,26 +317,11 @@ jit_info_table_chunk_index (MonoJitInfoTableChunk *chunk, MonoThreadHazardPointe
return left;
}
-MonoJitInfo*
-mono_jit_info_table_find (MonoDomain *domain, char *addr)
+static MonoJitInfo*
+jit_info_table_find (MonoJitInfoTable *table, MonoThreadHazardPointers *hp, gint8 *addr)
{
- MonoJitInfoTable *table;
MonoJitInfo *ji;
int chunk_pos, pos;
- MonoThreadHazardPointers *hp = mono_hazard_pointer_get ();
- MonoImage *image;
-
- ++mono_stats.jit_info_table_lookup_count;
-
- /* First we have to get the domain's jit_info_table. This is
- complicated by the fact that a writer might substitute a
- new table and free the old one. What the writer guarantees
- us is that it looks at the hazard pointers after it has
- changed the jit_info_table pointer. So, if we guard the
- table by a hazard pointer and make sure that the pointer is
- still there after we've made it hazardous, we don't have to
- worry about the writer freeing the table. */
- table = get_hazardous_pointer ((gpointer volatile*)&domain->jit_info_table, hp, JIT_INFO_TABLE_HAZARD_INDEX);
chunk_pos = jit_info_table_index (table, (gint8*)addr);
g_assert (chunk_pos < table->num_chunks);
@@ -376,7 +347,6 @@ mono_jit_info_table_find (MonoDomain *domain, char *addr)
}
if ((gint8*)addr >= (gint8*)ji->code_start
&& (gint8*)addr < (gint8*)ji->code_start + ji->code_size) {
- mono_hazard_pointer_clear (hp, JIT_INFO_TABLE_HAZARD_INDEX);
mono_hazard_pointer_clear (hp, JIT_INFO_HAZARD_INDEX);
return ji;
}
@@ -393,22 +363,64 @@ mono_jit_info_table_find (MonoDomain *domain, char *addr)
} while (chunk_pos < table->num_chunks);
not_found:
- if (!hp)
- return NULL;
+ if (hp)
+ mono_hazard_pointer_clear (hp, JIT_INFO_HAZARD_INDEX);
+ return NULL;
+}
- mono_hazard_pointer_clear (hp, JIT_INFO_TABLE_HAZARD_INDEX);
- mono_hazard_pointer_clear (hp, JIT_INFO_HAZARD_INDEX);
+/*
+ * mono_jit_info_table_find_internal:
+ *
+ * If TRY_AOT is FALSE, avoid loading information for missing methods from AOT images, which is currently not async safe.
+ * In this case, only those AOT methods will be found whose jit info is already loaded.
+ * ASYNC SAFETY: When called in an async context (mono_thread_info_is_async_context ()), this is async safe.
+ * In this case, the returned MonoJitInfo might not have metadata information, in particular,
+ * mono_jit_info_get_method () could fail.
+ */
+MonoJitInfo*
+mono_jit_info_table_find_internal (MonoDomain *domain, char *addr, gboolean try_aot)
+{
+ MonoJitInfoTable *table;
+ MonoJitInfo *ji, *module_ji;
+ MonoThreadHazardPointers *hp = mono_hazard_pointer_get ();
- ji = NULL;
+ ++mono_stats.jit_info_table_lookup_count;
+
+ /* First we have to get the domain's jit_info_table. This is
+ complicated by the fact that a writer might substitute a
+ new table and free the old one. What the writer guarantees
+ us is that it looks at the hazard pointers after it has
+ changed the jit_info_table pointer. So, if we guard the
+ table by a hazard pointer and make sure that the pointer is
+ still there after we've made it hazardous, we don't have to
+ worry about the writer freeing the table. */
+ table = get_hazardous_pointer ((gpointer volatile*)&domain->jit_info_table, hp, JIT_INFO_TABLE_HAZARD_INDEX);
+
+ ji = jit_info_table_find (table, hp, (gint8*)addr);
+ if (hp)
+ mono_hazard_pointer_clear (hp, JIT_INFO_TABLE_HAZARD_INDEX);
+ if (ji)
+ return ji;
/* Maybe its an AOT module */
- image = mono_jit_info_find_aot_module ((guint8*)addr);
- if (image)
- ji = jit_info_find_in_aot_func (domain, image, addr);
+ if (try_aot && mono_root_domain && mono_root_domain->aot_modules) {
+ table = get_hazardous_pointer ((gpointer volatile*)&mono_root_domain->aot_modules, hp, JIT_INFO_TABLE_HAZARD_INDEX);
+ module_ji = jit_info_table_find (table, hp, (gint8*)addr);
+ if (module_ji)
+ ji = jit_info_find_in_aot_func (domain, module_ji->d.image, addr);
+ if (hp)
+ mono_hazard_pointer_clear (hp, JIT_INFO_TABLE_HAZARD_INDEX);
+ }
return ji;
}
+MonoJitInfo*
+mono_jit_info_table_find (MonoDomain *domain, char *addr)
+{
+ return mono_jit_info_table_find_internal (domain, addr, TRUE);
+}
+
static G_GNUC_UNUSED void
jit_info_table_check (MonoJitInfoTable *table)
{
@@ -665,22 +677,16 @@ jit_info_table_chunk_overflow (MonoJitInfoTable *table, MonoJitInfoTableChunk *c
* the one we're looking for (i.e. we either find the element directly
* or we end up to the left of it).
*/
-void
-mono_jit_info_table_add (MonoDomain *domain, MonoJitInfo *ji)
+static void
+jit_info_table_add (MonoDomain *domain, MonoJitInfoTable *volatile *table_ptr, MonoJitInfo *ji)
{
MonoJitInfoTable *table;
- int chunk_pos, pos;
MonoJitInfoTableChunk *chunk;
+ int chunk_pos, pos;
int num_elements;
int i;
- g_assert (ji->method != NULL);
-
- mono_domain_lock (domain);
-
- ++mono_stats.jit_info_table_insert_count;
-
- table = domain->jit_info_table;
+ table = *table_ptr;
restart:
chunk_pos = jit_info_table_index (table, (gint8*)ji->code_start + ji->code_size);
@@ -693,7 +699,7 @@ mono_jit_info_table_add (MonoDomain *domain, MonoJitInfo *ji)
/* Debugging code, should be removed. */
//jit_info_table_check (new_table);
- domain->jit_info_table = new_table;
+ *table_ptr = new_table;
mono_memory_barrier ();
domain->num_jit_info_tables++;
mono_thread_hazardous_free_or_queue (table, (MonoHazardousFreeFunc)jit_info_table_free, TRUE, FALSE);
@@ -735,6 +741,18 @@ mono_jit_info_table_add (MonoDomain *domain, MonoJitInfo *ji)
/* Debugging code, should be removed. */
//jit_info_table_check (table);
+}
+
+void
+mono_jit_info_table_add (MonoDomain *domain, MonoJitInfo *ji)
+{
+ g_assert (ji->d.method != NULL);
+
+ mono_domain_lock (domain);
+
+ ++mono_stats.jit_info_table_insert_count;
+
+ jit_info_table_add (domain, &domain->jit_info_table, ji);
mono_domain_unlock (domain);
}
@@ -746,7 +764,7 @@ mono_jit_info_make_tombstone (MonoJitInfo *ji)
tombstone->code_start = ji->code_start;
tombstone->code_size = ji->code_size;
- tombstone->method = JIT_INFO_TOMBSTONE_MARKER;
+ tombstone->d.method = JIT_INFO_TOMBSTONE_MARKER;
return tombstone;
}
@@ -766,19 +784,13 @@ mono_jit_info_free_or_queue (MonoDomain *domain, MonoJitInfo *ji)
}
}
-void
-mono_jit_info_table_remove (MonoDomain *domain, MonoJitInfo *ji)
+static void
+jit_info_table_remove (MonoJitInfoTable *table, MonoJitInfo *ji)
{
- MonoJitInfoTable *table;
MonoJitInfoTableChunk *chunk;
gpointer start = ji->code_start;
int chunk_pos, pos;
- mono_domain_lock (domain);
- table = domain->jit_info_table;
-
- ++mono_stats.jit_info_table_remove_count;
-
chunk_pos = jit_info_table_index (table, start);
g_assert (chunk_pos < table->num_chunks);
@@ -809,90 +821,49 @@ mono_jit_info_table_remove (MonoDomain *domain, MonoJitInfo *ji)
/* Debugging code, should be removed. */
//jit_info_table_check (table);
-
- mono_jit_info_free_or_queue (domain, ji);
-
- mono_domain_unlock (domain);
-}
-
-static MonoAotModuleInfoTable*
-mono_aot_module_info_table_new (void)
-{
- return g_array_new (FALSE, FALSE, sizeof (gpointer));
-}
-
-static int
-aot_info_table_index (MonoAotModuleInfoTable *table, char *addr)
-{
- int left = 0, right = table->len;
-
- while (left < right) {
- int pos = (left + right) / 2;
- AotModuleInfo *ainfo = g_array_index (table, gpointer, pos);
- char *start = ainfo->start;
- char *end = ainfo->end;
-
- if (addr < start)
- right = pos;
- else if (addr >= end)
- left = pos + 1;
- else
- return pos;
- }
-
- return left;
}
void
-mono_jit_info_add_aot_module (MonoImage *image, gpointer start, gpointer end)
+mono_jit_info_table_remove (MonoDomain *domain, MonoJitInfo *ji)
{
- AotModuleInfo *ainfo = g_new0 (AotModuleInfo, 1);
- int pos;
-
- ainfo->image = image;
- ainfo->start = start;
- ainfo->end = end;
+ MonoJitInfoTable *table;
- mono_appdomains_lock ();
+ mono_domain_lock (domain);
+ table = domain->jit_info_table;
- if (!aot_modules)
- aot_modules = mono_aot_module_info_table_new ();
+ ++mono_stats.jit_info_table_remove_count;
- pos = aot_info_table_index (aot_modules, start);
+ jit_info_table_remove (table, ji);
- g_array_insert_val (aot_modules, pos, ainfo);
+ mono_jit_info_free_or_queue (domain, ji);
- mono_appdomains_unlock ();
+ mono_domain_unlock (domain);
}
-static MonoImage*
-mono_jit_info_find_aot_module (guint8* addr)
+void
+mono_jit_info_add_aot_module (MonoImage *image, gpointer start, gpointer end)
{
- guint left = 0, right;
-
- if (!aot_modules)
- return NULL;
+ MonoJitInfo *ji;
mono_appdomains_lock ();
- right = aot_modules->len;
- while (left < right) {
- guint pos = (left + right) / 2;
- AotModuleInfo *ai = g_array_index (aot_modules, gpointer, pos);
-
- if (addr < (guint8*)ai->start)
- right = pos;
- else if (addr >= (guint8*)ai->end)
- left = pos + 1;
- else {
- mono_appdomains_unlock ();
- return ai->image;
- }
+ /*
+ * We reuse MonoJitInfoTable to store AOT module info,
+ * this gives us async-safe lookup.
+ */
+ g_assert (mono_root_domain);
+ if (!mono_root_domain->aot_modules) {
+ mono_root_domain->num_jit_info_tables ++;
+ mono_root_domain->aot_modules = jit_info_table_new (mono_root_domain);
}
- mono_appdomains_unlock ();
+ ji = g_new0 (MonoJitInfo, 1);
+ ji->d.image = image;
+ ji->code_start = start;
+ ji->code_size = (guint8*)end - (guint8*)start;
+ jit_info_table_add (mono_root_domain, &mono_root_domain->aot_modules, ji);
- return NULL;
+ mono_appdomains_unlock ();
}
void
@@ -916,7 +887,8 @@ mono_jit_info_get_code_size (MonoJitInfo* ji)
MonoMethod*
mono_jit_info_get_method (MonoJitInfo* ji)
{
- return ji->method;
+ g_assert (!ji->async);
+ return ji->d.method;
}
static gpointer
@@ -924,7 +896,7 @@ jit_info_key_extract (gpointer value)
{
MonoJitInfo *info = (MonoJitInfo*)value;
- return info->method;
+ return info->d.method;
}
static gpointer*
@@ -1034,6 +1006,94 @@ mono_jit_info_get_cas_info (MonoJitInfo *ji)
}
}
+#define ALIGN_TO(val,align) ((((guint64)val) + ((align) - 1)) & ~((align) - 1))
+#define ALIGN_PTR_TO(ptr,align) (gpointer)((((gssize)(ptr)) + (align - 1)) & (~(align - 1)))
+
+static LockFreeMempool*
+lock_free_mempool_new (void)
+{
+ return g_new0 (LockFreeMempool, 1);
+}
+
+static void
+lock_free_mempool_free (LockFreeMempool *mp)
+{
+ LockFreeMempoolChunk *chunk, *next;
+
+ chunk = mp->chunks;
+ while (chunk) {
+ next = chunk->prev;
+ mono_vfree (chunk, mono_pagesize ());
+ chunk = next;
+ }
+}
+
+/*
+ * This is async safe
+ */
+static LockFreeMempoolChunk*
+lock_free_mempool_chunk_new (LockFreeMempool *mp, int len)
+{
+ LockFreeMempoolChunk *chunk, *prev;
+ int size;
+
+ size = mono_pagesize ();
+ while (size - sizeof (LockFreeMempoolChunk) < len)
+ size += mono_pagesize ();
+ chunk = mono_valloc (0, size, MONO_MMAP_READ|MONO_MMAP_WRITE);
+ g_assert (chunk);
+ chunk->mem = ALIGN_PTR_TO ((char*)chunk + sizeof (LockFreeMempoolChunk), 16);
+ chunk->size = ((char*)chunk + size) - (char*)chunk->mem;
+ chunk->pos = 0;
+
+ /* Add to list of chunks lock-free */
+ while (TRUE) {
+ prev = mp->chunks;
+ if (InterlockedCompareExchangePointer ((volatile gpointer*)&mp->chunks, chunk, prev) == prev)
+ break;
+ }
+ chunk->prev = prev;
+
+ return chunk;
+}
+
+/*
+ * This is async safe
+ */
+static gpointer
+lock_free_mempool_alloc0 (LockFreeMempool *mp, guint size)
+{
+ LockFreeMempoolChunk *chunk;
+ gpointer res;
+ int oldpos;
+
+ // FIXME: Free the allocator
+
+ size = ALIGN_TO (size, 8);
+ chunk = mp->current;
+ if (!chunk) {
+ chunk = lock_free_mempool_chunk_new (mp, size);
+ mono_memory_barrier ();
+ /* Publish */
+ mp->current = chunk;
+ }
+
+ /* The code below is lock-free, 'chunk' is shared state */
+ oldpos = InterlockedExchangeAdd (&chunk->pos, size);
+ if (oldpos + size > chunk->size) {
+ chunk = lock_free_mempool_chunk_new (mp, size);
+ g_assert (chunk->pos + size <= chunk->size);
+ res = chunk->mem;
+ chunk->pos += size;
+ mono_memory_barrier ();
+ mp->current = chunk;
+ } else {
+ res = (char*)chunk->mem + oldpos;
+ }
+
+ return res;
+}
+
void
mono_install_create_domain_hook (MonoCreateDomainFunc func)
{
@@ -1206,6 +1266,7 @@ mono_domain_create (void)
domain->mp = mono_mempool_new ();
domain->code_mp = mono_code_manager_new ();
+ domain->lock_free_mp = lock_free_mempool_new ();
domain->env = mono_g_hash_table_new_type ((GHashFunc)mono_string_hash, (GCompareFunc)mono_string_equal, MONO_HASH_KEY_VALUE_GC);
domain->domain_assemblies = NULL;
domain->assembly_bindings = NULL;
@@ -1860,6 +1921,8 @@ mono_domain_free (MonoDomain *domain, gboolean force)
{
int code_size, code_alloc;
GSList *tmp;
+ gpointer *p;
+
if ((domain == mono_root_domain) && !force) {
g_warning ("cant unload root domain");
return;
@@ -1923,6 +1986,10 @@ mono_domain_free (MonoDomain *domain, gboolean force)
mono_assembly_release_gc_roots (ass);
}
+ /* Have to zero out reference fields since they will be invalidated by the clear_domain () call below */
+ for (p = (gpointer*)&domain->MONO_DOMAIN_FIRST_OBJECT; p < (gpointer*)&domain->MONO_DOMAIN_FIRST_GC_TRACKED; ++p)
+ *p = NULL;
+
/* This needs to be done before closing assemblies */
mono_gc_clear_domain (domain);
@@ -1996,6 +2063,8 @@ mono_domain_free (MonoDomain *domain, gboolean force)
* this will free them.
*/
mono_thread_hazardous_try_free_all ();
+ if (domain->aot_modules)
+ jit_info_table_free (domain->aot_modules);
g_assert (domain->num_jit_info_tables == 1);
jit_info_table_free (domain->jit_info_table);
domain->jit_info_table = NULL;
@@ -2019,6 +2088,8 @@ mono_domain_free (MonoDomain *domain, gboolean force)
mono_code_manager_destroy (domain->code_mp);
domain->code_mp = NULL;
#endif
+ lock_free_mempool_free (domain->lock_free_mp);
+ domain->lock_free_mp = NULL;
g_hash_table_destroy (domain->finalizable_objects_hash);
domain->finalizable_objects_hash = NULL;
@@ -2126,6 +2197,12 @@ mono_domain_alloc0 (MonoDomain *domain, guint size)
return res;
}
+gpointer
+mono_domain_alloc0_lock_free (MonoDomain *domain, guint size)
+{
+ return lock_free_mempool_alloc0 (domain->lock_free_mp, size);
+}
+
/*
* mono_domain_code_reserve:
*
diff --git a/mono/metadata/environment.h b/mono/metadata/environment.h
index 619249a4715..360ba3baa8a 100644
--- a/mono/metadata/environment.h
+++ b/mono/metadata/environment.h
@@ -14,8 +14,8 @@
MONO_BEGIN_DECLS
-extern int32_t mono_environment_exitcode_get (void);
-extern void mono_environment_exitcode_set (int32_t value);
+MONO_API extern int32_t mono_environment_exitcode_get (void);
+MONO_API extern void mono_environment_exitcode_set (int32_t value);
MONO_END_DECLS
diff --git a/mono/metadata/exception.c b/mono/metadata/exception.c
index d8ffb90b49e..24bfd6ed5ba 100644
--- a/mono/metadata/exception.c
+++ b/mono/metadata/exception.c
@@ -831,7 +831,7 @@ mono_exception_get_native_backtrace (MonoException *exc)
gpointer ip = mono_array_get (arr, gpointer, i);
MonoJitInfo *ji = mono_jit_info_table_find (mono_domain_get (), ip);
if (ji) {
- char *msg = mono_debug_print_stack_frame (ji->method, (char*)ip - (char*)ji->code_start, domain);
+ char *msg = mono_debug_print_stack_frame (mono_jit_info_get_method (ji), (char*)ip - (char*)ji->code_start, domain);
g_string_append_printf (text, "%s\n", msg);
g_free (msg);
} else {
diff --git a/mono/metadata/exception.h b/mono/metadata/exception.h
index fa17fa29e24..17279507a01 100644
--- a/mono/metadata/exception.h
+++ b/mono/metadata/exception.h
@@ -9,140 +9,140 @@
MONO_BEGIN_DECLS
-extern MonoException *
+extern MONO_API MonoException *
mono_exception_from_name (MonoImage *image,
const char* name_space,
const char *name);
-MonoException *
+MONO_API MonoException *
mono_exception_from_token (MonoImage *image, uint32_t token);
-MonoException *
+MONO_API MonoException *
mono_exception_from_name_two_strings (MonoImage *image, const char *name_space,
const char *name, MonoString *a1, MonoString *a2);
-MonoException *
+MONO_API MonoException *
mono_exception_from_name_msg (MonoImage *image, const char *name_space,
const char *name, const char *msg);
-MonoException *
+MONO_API MonoException *
mono_exception_from_token_two_strings (MonoImage *image, uint32_t token,
MonoString *a1, MonoString *a2);
-extern MonoException *
+extern MONO_API MonoException *
mono_exception_from_name_domain (MonoDomain *domain, MonoImage *image,
const char* name_space,
const char *name);
-MonoException *
+MONO_API MonoException *
mono_get_exception_divide_by_zero (void);
-MonoException *
+MONO_API MonoException *
mono_get_exception_security (void);
-MonoException *
+MONO_API MonoException *
mono_get_exception_arithmetic (void);
-MonoException *
+MONO_API MonoException *
mono_get_exception_overflow (void);
-MonoException *
+MONO_API MonoException *
mono_get_exception_null_reference (void);
-MonoException *
+MONO_API MonoException *
mono_get_exception_execution_engine (const char *msg);
-MonoException *
+MONO_API MonoException *
mono_get_exception_thread_abort (void);
-MonoException *
+MONO_API MonoException *
mono_get_exception_thread_state (const char *msg);
-MonoException *
+MONO_API MonoException *
mono_get_exception_thread_interrupted (void);
-MonoException *
+MONO_API MonoException *
mono_get_exception_serialization (const char *msg);
-MonoException *
+MONO_API MonoException *
mono_get_exception_invalid_cast (void);
-MonoException *
+MONO_API MonoException *
mono_get_exception_invalid_operation (const char *msg);
-MonoException *
+MONO_API MonoException *
mono_get_exception_index_out_of_range (void);
-MonoException *
+MONO_API MonoException *
mono_get_exception_array_type_mismatch (void);
-MonoException *
+MONO_API MonoException *
mono_get_exception_type_load (MonoString *class_name, char *assembly_name);
-MonoException *
+MONO_API MonoException *
mono_get_exception_missing_method (const char *class_name, const char *member_name);
-MonoException *
+MONO_API MonoException *
mono_get_exception_missing_field (const char *class_name, const char *member_name);
-MonoException *
+MONO_API MonoException *
mono_get_exception_not_implemented (const char *msg);
-MonoException *
+MONO_API MonoException *
mono_get_exception_not_supported (const char *msg);
-MonoException*
+MONO_API MonoException*
mono_get_exception_argument_null (const char *arg);
-MonoException *
+MONO_API MonoException *
mono_get_exception_argument (const char *arg, const char *msg);
-MonoException *
+MONO_API MonoException *
mono_get_exception_argument_out_of_range (const char *arg);
-MonoException *
+MONO_API MonoException *
mono_get_exception_io (const char *msg);
-MonoException *
+MONO_API MonoException *
mono_get_exception_file_not_found (MonoString *fname);
-MonoException *
+MONO_API MonoException *
mono_get_exception_file_not_found2 (const char *msg, MonoString *fname);
-MonoException *
+MONO_API MonoException *
mono_get_exception_type_initialization (const char *type_name, MonoException *inner);
-MonoException *
+MONO_API MonoException *
mono_get_exception_synchronization_lock (const char *msg);
-MonoException *
+MONO_API MonoException *
mono_get_exception_cannot_unload_appdomain (const char *msg);
-MonoException *
+MONO_API MonoException *
mono_get_exception_appdomain_unloaded (void);
-MonoException *
+MONO_API MonoException *
mono_get_exception_bad_image_format (const char *msg);
-MonoException *
+MONO_API MonoException *
mono_get_exception_bad_image_format2 (const char *msg, MonoString *fname);
-MonoException *
+MONO_API MonoException *
mono_get_exception_stack_overflow (void);
-MonoException *
+MONO_API MonoException *
mono_get_exception_out_of_memory (void);
-MonoException *
+MONO_API MonoException *
mono_get_exception_field_access (void);
-MonoException *
+MONO_API MonoException *
mono_get_exception_method_access (void);
-MonoException *
+MONO_API MonoException *
mono_get_exception_reflection_type_load (MonoArray *types, MonoArray *exceptions);
-MonoException *
+MONO_API MonoException *
mono_get_exception_runtime_wrapped (MonoObject *wrapped_exception);
MONO_END_DECLS
diff --git a/mono/metadata/file-io.c b/mono/metadata/file-io.c
index ac7b0c41cc3..097da28a8c7 100644
--- a/mono/metadata/file-io.c
+++ b/mono/metadata/file-io.c
@@ -482,7 +482,7 @@ ves_icall_System_IO_MonoIO_FindNext (gpointer handle, gint32 *result_attr, gint3
WIN32_FIND_DATA data;
MonoString *result;
- error = ERROR_SUCCESS;
+ *error = ERROR_SUCCESS;
do {
if (FindNextFile (ifh->find_handle, &data) == FALSE){
int e = GetLastError ();
@@ -607,6 +607,7 @@ ves_icall_System_IO_MonoIO_ReplaceFile (MonoString *sourceFileName, MonoString *
if (ignoreMetadataErrors)
replaceFlags |= REPLACEFILE_IGNORE_MERGE_ERRORS;
+ /* FIXME: source and destination file names must not be NULL, but apparently they might be! */
ret = ReplaceFile (utf16_destinationFileName, utf16_sourceFileName, utf16_destinationBackupFileName,
replaceFlags, NULL, NULL);
if (ret == FALSE)
@@ -824,9 +825,9 @@ ves_icall_System_IO_MonoIO_Read (HANDLE handle, MonoArray *dest,
*error=ERROR_SUCCESS;
MONO_CHECK_ARG_NULL (dest);
-
- if (dest_offset + count > mono_array_length (dest))
- return 0;
+
+ if (dest_offset > mono_array_length (dest) - count)
+ mono_raise_exception (mono_get_exception_argument ("array", "array too small. numBytes/offset wrong."));
buffer = mono_array_addr (dest, guchar, dest_offset);
result = ReadFile (handle, buffer, count, &n, NULL);
@@ -854,8 +855,8 @@ ves_icall_System_IO_MonoIO_Write (HANDLE handle, MonoArray *src,
MONO_CHECK_ARG_NULL (src);
- if (src_offset + count > mono_array_length (src))
- return 0;
+ if (src_offset > mono_array_length (src) - count)
+ mono_raise_exception (mono_get_exception_argument ("array", "array too small. numBytes/offset wrong."));
buffer = mono_array_addr (src, guchar, src_offset);
result = WriteFile (handle, buffer, count, &n, NULL);
diff --git a/mono/metadata/gc-internal.h b/mono/metadata/gc-internal.h
index 2ef9a933b32..2930ed3444c 100644
--- a/mono/metadata/gc-internal.h
+++ b/mono/metadata/gc-internal.h
@@ -112,10 +112,10 @@ extern void mono_gc_set_stack_end (void *stack_end) MONO_INTERNAL;
/* only valid after the RECLAIM_START GC event and before RECLAIM_END
* Not exported in public headers, but can be linked to (unsupported).
*/
-extern gboolean mono_object_is_alive (MonoObject* obj);
-extern gboolean mono_gc_is_finalizer_thread (MonoThread *thread);
-extern gpointer mono_gc_out_of_memory (size_t size);
-extern void mono_gc_enable_events (void);
+extern MONO_API gboolean mono_object_is_alive (MonoObject* obj);
+extern MONO_API gboolean mono_gc_is_finalizer_thread (MonoThread *thread);
+extern MONO_API gpointer mono_gc_out_of_memory (size_t size);
+extern MONO_API void mono_gc_enable_events (void);
/* disappearing link functionality */
void mono_gc_weak_link_add (void **link_addr, MonoObject *obj, gboolean track) MONO_INTERNAL;
@@ -146,7 +146,7 @@ typedef void (*MonoGCMarkFunc) (void **addr);
typedef void (*MonoGCRootMarkFunc) (void *addr, MonoGCMarkFunc mark_func);
/* Create a descriptor with a user defined marking function */
-void *mono_gc_make_root_descr_user (MonoGCRootMarkFunc marker);
+MONO_API void *mono_gc_make_root_descr_user (MonoGCRootMarkFunc marker);
/* Return whenever user defined marking functions are supported */
gboolean mono_gc_user_markers_supported (void) MONO_INTERNAL;
@@ -335,9 +335,6 @@ gboolean mono_gc_precise_stack_mark_enabled (void) MONO_INTERNAL;
FILE *mono_gc_get_logfile (void) MONO_INTERNAL;
-typedef void (*mono_reference_queue_callback) (void *user_data);
-
-typedef struct _MonoReferenceQueue MonoReferenceQueue;
typedef struct _RefQueueEntry RefQueueEntry;
struct _RefQueueEntry {
@@ -355,10 +352,6 @@ struct _MonoReferenceQueue {
gboolean should_be_deleted;
};
-MonoReferenceQueue* mono_gc_reference_queue_new (mono_reference_queue_callback callback) MONO_INTERNAL;
-void mono_gc_reference_queue_free (MonoReferenceQueue *queue) MONO_INTERNAL;
-gboolean mono_gc_reference_queue_add (MonoReferenceQueue *queue, MonoObject *obj, void *user_data) MONO_INTERNAL;
-
#ifdef HOST_WIN32
BOOL APIENTRY mono_gc_dllmain (HMODULE module_handle, DWORD reason, LPVOID reserved) MONO_INTERNAL;
#endif
diff --git a/mono/metadata/gc.c b/mono/metadata/gc.c
index 7a46d49301d..465f6d1974d 100644
--- a/mono/metadata/gc.c
+++ b/mono/metadata/gc.c
@@ -1473,16 +1473,20 @@ reference_queue_clear_for_domain (MonoDomain *domain)
}
/**
* mono_gc_reference_queue_new:
- * @callback callback used when processing dead entries.
+ * @callback callback used when processing collected entries.
*
* Create a new reference queue used to process collected objects.
- * A reference queue let you queue a pair (managed object, user data)
+ * A reference queue let you add a pair of (managed object, user data)
* using the mono_gc_reference_queue_add method.
*
* Once the managed object is collected @callback will be called
* in the finalizer thread with 'user data' as argument.
*
- * The callback is called without any locks held.
+ * The callback is called from the finalizer thread without any locks held.
+ * When a AppDomain is unloaded, all callbacks for objects belonging to it
+ * will be invoked.
+ *
+ * @returns the new queue.
*/
MonoReferenceQueue*
mono_gc_reference_queue_new (mono_reference_queue_callback callback)
@@ -1506,7 +1510,7 @@ mono_gc_reference_queue_new (mono_reference_queue_callback callback)
*
* Queue an object to be watched for collection, when the @obj is
* collected, the callback that was registered for the @queue will
- * be invoked with the @obj and @user_data arguments.
+ * be invoked with @user_data as argument.
*
* @returns false if the queue is scheduled to be freed.
*/
@@ -1534,9 +1538,9 @@ mono_gc_reference_queue_add (MonoReferenceQueue *queue, MonoObject *obj, void *u
/**
* mono_gc_reference_queue_free:
- * @queue the queue that should be deleted.
+ * @queue the queue that should be freed.
*
- * This operation signals that @queue should be deleted. This operation is deferred
+ * This operation signals that @queue should be freed. This operation is deferred
* as it happens on the finalizer thread.
*
* After this call, no further objects can be queued. It's the responsibility of the
diff --git a/mono/metadata/icall-def.h b/mono/metadata/icall-def.h
index 3f17c549593..ac2e0278ab5 100644
--- a/mono/metadata/icall-def.h
+++ b/mono/metadata/icall-def.h
@@ -890,7 +890,7 @@ ICALL(THREAD_28, "VolatileRead(int&)", ves_icall_System_Threading_Thread_Volatil
ICALL(THREAD_29, "VolatileRead(int16&)", ves_icall_System_Threading_Thread_VolatileRead2)
ICALL(THREAD_30, "VolatileRead(intptr&)", ves_icall_System_Threading_Thread_VolatileReadIntPtr)
ICALL(THREAD_31, "VolatileRead(long&)", ves_icall_System_Threading_Thread_VolatileRead8)
-ICALL(THREAD_32, "VolatileRead(object&)", ves_icall_System_Threading_Thread_VolatileReadIntPtr)
+ICALL(THREAD_32, "VolatileRead(object&)", ves_icall_System_Threading_Thread_VolatileReadObject)
ICALL(THREAD_33, "VolatileRead(sbyte&)", ves_icall_System_Threading_Thread_VolatileRead1)
ICALL(THREAD_34, "VolatileRead(single&)", ves_icall_System_Threading_Thread_VolatileReadFloat)
ICALL(THREAD_35, "VolatileRead(uint&)", ves_icall_System_Threading_Thread_VolatileRead4)
@@ -923,33 +923,33 @@ ICALL(THREADP_5, "pool_queue", icall_append_job)
ICALL_TYPE(VOLATILE, "System.Threading.Volatile", VOLATILE_28)
ICALL(VOLATILE_28, "Read(T&)", ves_icall_System_Threading_Volatile_Read_T)
-ICALL(VOLATILE_1, "Read(bool&)", ves_icall_System_Threading_Thread_VolatileRead1)
-ICALL(VOLATILE_2, "Read(byte&)", ves_icall_System_Threading_Thread_VolatileRead1)
-ICALL(VOLATILE_3, "Read(double&)", ves_icall_System_Threading_Thread_VolatileReadDouble)
-ICALL(VOLATILE_4, "Read(int&)", ves_icall_System_Threading_Thread_VolatileRead4)
-ICALL(VOLATILE_5, "Read(int16&)", ves_icall_System_Threading_Thread_VolatileRead2)
-ICALL(VOLATILE_6, "Read(intptr&)", ves_icall_System_Threading_Thread_VolatileReadIntPtr)
-ICALL(VOLATILE_7, "Read(long&)", ves_icall_System_Threading_Thread_VolatileRead8)
-ICALL(VOLATILE_8, "Read(sbyte&)", ves_icall_System_Threading_Thread_VolatileRead1)
-ICALL(VOLATILE_9, "Read(single&)", ves_icall_System_Threading_Thread_VolatileReadFloat)
-ICALL(VOLATILE_10, "Read(uint&)", ves_icall_System_Threading_Thread_VolatileRead4)
-ICALL(VOLATILE_11, "Read(uint16&)", ves_icall_System_Threading_Thread_VolatileRead2)
-ICALL(VOLATILE_12, "Read(uintptr&)", ves_icall_System_Threading_Thread_VolatileReadIntPtr)
-ICALL(VOLATILE_13, "Read(ulong&)", ves_icall_System_Threading_Thread_VolatileRead8)
+ICALL(VOLATILE_1, "Read(bool&)", ves_icall_System_Threading_Volatile_Read1)
+ICALL(VOLATILE_2, "Read(byte&)", ves_icall_System_Threading_Volatile_Read1)
+ICALL(VOLATILE_3, "Read(double&)", ves_icall_System_Threading_Volatile_ReadDouble)
+ICALL(VOLATILE_4, "Read(int&)", ves_icall_System_Threading_Volatile_Read4)
+ICALL(VOLATILE_5, "Read(int16&)", ves_icall_System_Threading_Volatile_Read2)
+ICALL(VOLATILE_6, "Read(intptr&)", ves_icall_System_Threading_Volatile_ReadIntPtr)
+ICALL(VOLATILE_7, "Read(long&)", ves_icall_System_Threading_Volatile_Read8)
+ICALL(VOLATILE_8, "Read(sbyte&)", ves_icall_System_Threading_Volatile_Read1)
+ICALL(VOLATILE_9, "Read(single&)", ves_icall_System_Threading_Volatile_ReadFloat)
+ICALL(VOLATILE_10, "Read(uint&)", ves_icall_System_Threading_Volatile_Read4)
+ICALL(VOLATILE_11, "Read(uint16&)", ves_icall_System_Threading_Volatile_Read2)
+ICALL(VOLATILE_12, "Read(uintptr&)", ves_icall_System_Threading_Volatile_ReadIntPtr)
+ICALL(VOLATILE_13, "Read(ulong&)", ves_icall_System_Threading_Volatile_Read8)
ICALL(VOLATILE_27, "Write(T&,T)", ves_icall_System_Threading_Volatile_Write_T)
-ICALL(VOLATILE_14, "Write(bool&,bool)", ves_icall_System_Threading_Thread_VolatileWrite1)
-ICALL(VOLATILE_15, "Write(byte&,byte)", ves_icall_System_Threading_Thread_VolatileWrite1)
-ICALL(VOLATILE_16, "Write(double&,double)", ves_icall_System_Threading_Thread_VolatileWriteDouble)
-ICALL(VOLATILE_17, "Write(int&,int)", ves_icall_System_Threading_Thread_VolatileWrite4)
-ICALL(VOLATILE_18, "Write(int16&,int16)", ves_icall_System_Threading_Thread_VolatileWrite2)
-ICALL(VOLATILE_19, "Write(intptr&,intptr)", ves_icall_System_Threading_Thread_VolatileWriteIntPtr)
-ICALL(VOLATILE_20, "Write(long&,long)", ves_icall_System_Threading_Thread_VolatileWrite8)
-ICALL(VOLATILE_21, "Write(sbyte&,sbyte)", ves_icall_System_Threading_Thread_VolatileWrite1)
-ICALL(VOLATILE_22, "Write(single&,single)", ves_icall_System_Threading_Thread_VolatileWriteFloat)
-ICALL(VOLATILE_23, "Write(uint&,uint)", ves_icall_System_Threading_Thread_VolatileWrite4)
-ICALL(VOLATILE_24, "Write(uint16&,uint16)", ves_icall_System_Threading_Thread_VolatileWrite2)
-ICALL(VOLATILE_25, "Write(uintptr&,uintptr)", ves_icall_System_Threading_Thread_VolatileWriteIntPtr)
-ICALL(VOLATILE_26, "Write(ulong&,ulong)", ves_icall_System_Threading_Thread_VolatileWrite8)
+ICALL(VOLATILE_14, "Write(bool&,bool)", ves_icall_System_Threading_Volatile_Write1)
+ICALL(VOLATILE_15, "Write(byte&,byte)", ves_icall_System_Threading_Volatile_Write1)
+ICALL(VOLATILE_16, "Write(double&,double)", ves_icall_System_Threading_Volatile_WriteDouble)
+ICALL(VOLATILE_17, "Write(int&,int)", ves_icall_System_Threading_Volatile_Write4)
+ICALL(VOLATILE_18, "Write(int16&,int16)", ves_icall_System_Threading_Volatile_Write2)
+ICALL(VOLATILE_19, "Write(intptr&,intptr)", ves_icall_System_Threading_Volatile_WriteIntPtr)
+ICALL(VOLATILE_20, "Write(long&,long)", ves_icall_System_Threading_Volatile_Write8)
+ICALL(VOLATILE_21, "Write(sbyte&,sbyte)", ves_icall_System_Threading_Volatile_Write1)
+ICALL(VOLATILE_22, "Write(single&,single)", ves_icall_System_Threading_Volatile_WriteFloat)
+ICALL(VOLATILE_23, "Write(uint&,uint)", ves_icall_System_Threading_Volatile_Write4)
+ICALL(VOLATILE_24, "Write(uint16&,uint16)", ves_icall_System_Threading_Volatile_Write2)
+ICALL(VOLATILE_25, "Write(uintptr&,uintptr)", ves_icall_System_Threading_Volatile_WriteIntPtr)
+ICALL(VOLATILE_26, "Write(ulong&,ulong)", ves_icall_System_Threading_Volatile_Write8)
ICALL_TYPE(WAITH, "System.Threading.WaitHandle", WAITH_1)
ICALL(WAITH_1, "SignalAndWait_Internal", ves_icall_System_Threading_WaitHandle_SignalAndWait_Internal)
diff --git a/mono/metadata/icall.c b/mono/metadata/icall.c
index 317f894fc43..618e4da40af 100644
--- a/mono/metadata/icall.c
+++ b/mono/metadata/icall.c
@@ -84,6 +84,7 @@
#include <mono/utils/mono-mmap.h>
#include <mono/utils/mono-io-portability.h>
#include <mono/utils/mono-digest.h>
+#include <mono/utils/bsearch.h>
#if defined (HOST_WIN32)
#include <windows.h>
@@ -684,7 +685,7 @@ ICALL_EXPORT void
ves_icall_System_Array_ClearInternal (MonoArray *arr, int idx, int length)
{
int sz = mono_array_element_size (mono_object_class (arr));
- mono_gc_bzero (mono_array_addr_with_size (arr, sz, idx), length * sz);
+ mono_gc_bzero (mono_array_addr_with_size_fast (arr, sz, idx), length * sz);
}
ICALL_EXPORT gboolean
@@ -693,92 +694,59 @@ ves_icall_System_Array_FastCopy (MonoArray *source, int source_idx, MonoArray* d
int element_size;
void * dest_addr;
void * source_addr;
+ MonoVTable *src_vtable;
+ MonoVTable *dest_vtable;
MonoClass *src_class;
MonoClass *dest_class;
- MONO_ARCH_SAVE_REGS;
+ src_vtable = source->obj.vtable;
+ dest_vtable = dest->obj.vtable;
- if (source->obj.vtable->klass->rank != dest->obj.vtable->klass->rank)
+ if (src_vtable->rank != dest_vtable->rank)
return FALSE;
if (source->bounds || dest->bounds)
return FALSE;
/* there's no integer overflow since mono_array_length returns an unsigned integer */
- if ((dest_idx + length > mono_array_length (dest)) ||
- (source_idx + length > mono_array_length (source)))
+ if ((dest_idx + length > mono_array_length_fast (dest)) ||
+ (source_idx + length > mono_array_length_fast (source)))
return FALSE;
- src_class = source->obj.vtable->klass->element_class;
- dest_class = dest->obj.vtable->klass->element_class;
+ src_class = src_vtable->klass->element_class;
+ dest_class = dest_vtable->klass->element_class;
/*
* Handle common cases.
*/
- /* Case1: object[] -> valuetype[] (ArrayList::ToArray) */
- if (src_class == mono_defaults.object_class && dest_class->valuetype) {
- // FIXME: This is racy
+ /* Case1: object[] -> valuetype[] (ArrayList::ToArray)
+ We fallback to managed here since we need to typecheck each boxed valuetype before storing them in the dest array.
+ */
+ if (src_class == mono_defaults.object_class && dest_class->valuetype)
return FALSE;
- /*
- int i;
- int has_refs = dest_class->has_references;
- for (i = source_idx; i < source_idx + length; ++i) {
- MonoObject *elem = mono_array_get (source, MonoObject*, i);
- if (elem && !mono_object_isinst (elem, dest_class))
- return FALSE;
- }
-
- element_size = mono_array_element_size (dest->obj.vtable->klass);
- memset (mono_array_addr_with_size (dest, element_size, dest_idx), 0, element_size * length);
- for (i = 0; i < length; ++i) {
- MonoObject *elem = mono_array_get (source, MonoObject*, source_idx + i);
- void *addr = mono_array_addr_with_size (dest, element_size, dest_idx + i);
- if (!elem)
- continue;
- if (has_refs)
- mono_value_copy (addr, (char *)elem + sizeof (MonoObject), dest_class);
- else
- memcpy (addr, (char *)elem + sizeof (MonoObject), element_size);
- }
- return TRUE;
- */
- }
/* Check if we're copying a char[] <==> (u)short[] */
if (src_class != dest_class) {
if (dest_class->valuetype || dest_class->enumtype || src_class->valuetype || src_class->enumtype)
return FALSE;
- if (mono_class_is_subclass_of (src_class, dest_class, FALSE))
- ;
- /* Case2: object[] -> reftype[] (ArrayList::ToArray) */
- else if (mono_class_is_subclass_of (dest_class, src_class, FALSE)) {
- // FIXME: This is racy
- return FALSE;
- /*
- int i;
- for (i = source_idx; i < source_idx + length; ++i) {
- MonoObject *elem = mono_array_get (source, MonoObject*, i);
- if (elem && !mono_object_isinst (elem, dest_class))
- return FALSE;
- }
- */
- } else
+ /* It's only safe to copy between arrays if we can ensure the source will always have a subtype of the destination. We bail otherwise. */
+ if (!mono_class_is_subclass_of (src_class, dest_class, FALSE))
return FALSE;
}
if (dest_class->valuetype) {
element_size = mono_array_element_size (source->obj.vtable->klass);
- source_addr = mono_array_addr_with_size (source, element_size, source_idx);
+ source_addr = mono_array_addr_with_size_fast (source, element_size, source_idx);
if (dest_class->has_references) {
mono_value_copy_array (dest, dest_idx, source_addr, length);
} else {
- dest_addr = mono_array_addr_with_size (dest, element_size, dest_idx);
+ dest_addr = mono_array_addr_with_size_fast (dest, element_size, dest_idx);
mono_gc_memmove (dest_addr, source_addr, element_size * length);
}
} else {
- mono_array_memcpy_refs (dest, dest_idx, source, source_idx, length);
+ mono_array_memcpy_refs_fast (dest, dest_idx, source, source_idx, length);
}
return TRUE;
@@ -1146,7 +1114,7 @@ ves_icall_System_ValueType_Equals (MonoObject *this, MonoObject *that, MonoArray
int i;
mono_gc_wbarrier_generic_store (fields, (MonoObject*) mono_array_new (mono_domain_get (), mono_defaults.object_class, count));
for (i = 0; i < count; ++i)
- mono_array_setref (*fields, i, values [i]);
+ mono_array_setref_fast (*fields, i, values [i]);
return FALSE;
} else {
return TRUE;
@@ -2784,6 +2752,7 @@ ves_icall_InternalInvoke (MonoReflectionMethod *method, MonoObject *this, MonoAr
*/
MonoMethod *m = method->method;
MonoMethodSignature *sig = mono_method_signature (m);
+ MonoImage *image;
int pcount;
void *obj = this;
@@ -2837,10 +2806,16 @@ ves_icall_InternalInvoke (MonoReflectionMethod *method, MonoObject *this, MonoAr
return NULL;
}
- if (m->klass->image->assembly->ref_only) {
+ image = m->klass->image;
+ if (image->assembly->ref_only) {
mono_gc_wbarrier_generic_store (exc, (MonoObject*) mono_get_exception_invalid_operation ("It is illegal to invoke a method on a type loaded using the ReflectionOnly api."));
return NULL;
}
+
+ if (image->dynamic && !((MonoDynamicImage*)image)->run) {
+ mono_gc_wbarrier_generic_store (exc, (MonoObject*) mono_get_exception_not_supported ("Cannot invoke a method in a dynamic assembly without run access."));
+ return NULL;
+ }
if (m->klass->rank && !strcmp (m->name, ".ctor")) {
int i;
@@ -7947,7 +7922,7 @@ compare_method_imap (const void *key, const void *elem)
static gpointer
find_method_icall (const IcallTypeDesc *imap, const char *name)
{
- const guint16 *nameslot = bsearch (name, icall_names_idx + imap->first_icall, icall_desc_num_icalls (imap), sizeof (icall_names_idx [0]), compare_method_imap);
+ const guint16 *nameslot = mono_binary_search (name, icall_names_idx + imap->first_icall, icall_desc_num_icalls (imap), sizeof (icall_names_idx [0]), compare_method_imap);
if (!nameslot)
return NULL;
return (gpointer)icall_functions [(nameslot - &icall_names_idx [0])];
@@ -7963,7 +7938,7 @@ compare_class_imap (const void *key, const void *elem)
static const IcallTypeDesc*
find_class_icalls (const char *name)
{
- const guint16 *nameslot = bsearch (name, icall_type_names_idx, Icall_type_num, sizeof (icall_type_names_idx [0]), compare_class_imap);
+ const guint16 *nameslot = mono_binary_search (name, icall_type_names_idx, Icall_type_num, sizeof (icall_type_names_idx [0]), compare_class_imap);
if (!nameslot)
return NULL;
return &icall_type_descs [nameslot - &icall_type_names_idx [0]];
@@ -7981,7 +7956,7 @@ compare_method_imap (const void *key, const void *elem)
static gpointer
find_method_icall (const IcallTypeDesc *imap, const char *name)
{
- const char **nameslot = bsearch (name, icall_names + imap->first_icall, icall_desc_num_icalls (imap), sizeof (icall_names [0]), compare_method_imap);
+ const char **nameslot = mono_binary_search (name, icall_names + imap->first_icall, icall_desc_num_icalls (imap), sizeof (icall_names [0]), compare_method_imap);
if (!nameslot)
return NULL;
return (gpointer)icall_functions [(nameslot - icall_names)];
@@ -7997,7 +7972,7 @@ compare_class_imap (const void *key, const void *elem)
static const IcallTypeDesc*
find_class_icalls (const char *name)
{
- const char **nameslot = bsearch (name, icall_type_names, Icall_type_num, sizeof (icall_type_names [0]), compare_class_imap);
+ const char **nameslot = mono_binary_search (name, icall_type_names, Icall_type_num, sizeof (icall_type_names [0]), compare_class_imap);
if (!nameslot)
return NULL;
return &icall_type_descs [nameslot - icall_type_names];
@@ -8208,7 +8183,7 @@ mono_lookup_icall_symbol (MonoMethod *m)
func = mono_lookup_internal_call (m);
if (!func)
return NULL;
- slot = bsearch (func, functions_sorted, G_N_ELEMENTS (icall_functions), sizeof (gpointer), func_cmp);
+ slot = mono_binary_search (func, functions_sorted, G_N_ELEMENTS (icall_functions), sizeof (gpointer), func_cmp);
if (!slot)
return NULL;
g_assert (slot);
diff --git a/mono/metadata/image.c b/mono/metadata/image.c
index d161ba63a73..7140a630bad 100644
--- a/mono/metadata/image.c
+++ b/mono/metadata/image.c
@@ -151,7 +151,16 @@ mono_image_rva_map (MonoImage *image, guint32 addr)
const int top = iinfo->cli_section_count;
MonoSectionTable *tables = iinfo->cli_section_tables;
int i;
-
+
+#ifdef HOST_WIN32
+ if (image->is_module_handle) {
+ if (addr && addr < image->raw_data_len)
+ return image->raw_data + addr;
+ else
+ return NULL;
+ }
+#endif
+
for (i = 0; i < top; i++){
if ((addr >= tables->st_virtual_address) &&
(addr < tables->st_virtual_address + tables->st_raw_data_size)){
@@ -159,10 +168,6 @@ mono_image_rva_map (MonoImage *image, guint32 addr)
if (!mono_image_ensure_section_idx (image, i))
return NULL;
}
-#ifdef HOST_WIN32
- if (image->is_module_handle)
- return image->raw_data + addr;
-#endif
return (char*)iinfo->cli_sections [i] +
(addr - tables->st_virtual_address);
}
@@ -1622,8 +1627,10 @@ mono_image_close_except_pools (MonoImage *image)
free_hash (image->delegate_invoke_generic_cache);
free_hash (image->delegate_begin_invoke_generic_cache);
free_hash (image->delegate_end_invoke_generic_cache);
+ free_hash (image->synchronized_generic_cache);
free_hash (image->remoting_invoke_cache);
free_hash (image->runtime_invoke_cache);
+ free_hash (image->runtime_invoke_vtype_cache);
free_hash (image->runtime_invoke_direct_cache);
free_hash (image->runtime_invoke_vcall_cache);
free_hash (image->synchronized_cache);
diff --git a/mono/metadata/image.h b/mono/metadata/image.h
index a42be33a3e4..c3ad58b3431 100644
--- a/mono/metadata/image.h
+++ b/mono/metadata/image.h
@@ -18,65 +18,65 @@ typedef enum {
MONO_IMAGE_IMAGE_INVALID
} MonoImageOpenStatus;
-void mono_images_init (void);
-void mono_images_cleanup (void);
+MONO_API void mono_images_init (void);
+MONO_API void mono_images_cleanup (void);
-MonoImage *mono_image_open (const char *fname,
+MONO_API MonoImage *mono_image_open (const char *fname,
MonoImageOpenStatus *status);
-MonoImage *mono_image_open_full (const char *fname,
+MONO_API MonoImage *mono_image_open_full (const char *fname,
MonoImageOpenStatus *status, mono_bool refonly);
-MonoImage *mono_pe_file_open (const char *fname,
+MONO_API MonoImage *mono_pe_file_open (const char *fname,
MonoImageOpenStatus *status);
-MonoImage *mono_image_open_from_data (char *data, uint32_t data_len, mono_bool need_copy,
+MONO_API MonoImage *mono_image_open_from_data (char *data, uint32_t data_len, mono_bool need_copy,
MonoImageOpenStatus *status);
-MonoImage *mono_image_open_from_data_full (char *data, uint32_t data_len, mono_bool need_copy,
+MONO_API MonoImage *mono_image_open_from_data_full (char *data, uint32_t data_len, mono_bool need_copy,
MonoImageOpenStatus *status, mono_bool refonly);
-MonoImage *mono_image_open_from_data_with_name (char *data, uint32_t data_len, mono_bool need_copy,
+MONO_API MonoImage *mono_image_open_from_data_with_name (char *data, uint32_t data_len, mono_bool need_copy,
MonoImageOpenStatus *status, mono_bool refonly, const char *name);
-void mono_image_fixup_vtable (MonoImage *image);
-MonoImage *mono_image_loaded (const char *name);
-MonoImage *mono_image_loaded_full (const char *name, mono_bool refonly);
-MonoImage *mono_image_loaded_by_guid (const char *guid);
-MonoImage *mono_image_loaded_by_guid_full (const char *guid, mono_bool refonly);
-void mono_image_init (MonoImage *image);
-void mono_image_close (MonoImage *image);
-void mono_image_addref (MonoImage *image);
-const char *mono_image_strerror (MonoImageOpenStatus status);
+MONO_API void mono_image_fixup_vtable (MonoImage *image);
+MONO_API MonoImage *mono_image_loaded (const char *name);
+MONO_API MonoImage *mono_image_loaded_full (const char *name, mono_bool refonly);
+MONO_API MonoImage *mono_image_loaded_by_guid (const char *guid);
+MONO_API MonoImage *mono_image_loaded_by_guid_full (const char *guid, mono_bool refonly);
+MONO_API void mono_image_init (MonoImage *image);
+MONO_API void mono_image_close (MonoImage *image);
+MONO_API void mono_image_addref (MonoImage *image);
+MONO_API const char *mono_image_strerror (MonoImageOpenStatus status);
-int mono_image_ensure_section (MonoImage *image,
+MONO_API int mono_image_ensure_section (MonoImage *image,
const char *section);
-int mono_image_ensure_section_idx (MonoImage *image,
+MONO_API int mono_image_ensure_section_idx (MonoImage *image,
int section);
-uint32_t mono_image_get_entry_point (MonoImage *image);
-const char *mono_image_get_resource (MonoImage *image, uint32_t offset, uint32_t *size);
-MonoImage* mono_image_load_file_for_image (MonoImage *image, int fileidx);
+MONO_API uint32_t mono_image_get_entry_point (MonoImage *image);
+MONO_API const char *mono_image_get_resource (MonoImage *image, uint32_t offset, uint32_t *size);
+MONO_API MonoImage* mono_image_load_file_for_image (MonoImage *image, int fileidx);
-MonoImage* mono_image_load_module (MonoImage *image, int idx);
+MONO_API MonoImage* mono_image_load_module (MonoImage *image, int idx);
-const char* mono_image_get_name (MonoImage *image);
-const char* mono_image_get_filename (MonoImage *image);
-const char * mono_image_get_guid (MonoImage *image);
-MonoAssembly* mono_image_get_assembly (MonoImage *image);
-mono_bool mono_image_is_dynamic (MonoImage *image);
-char* mono_image_rva_map (MonoImage *image, uint32_t rva);
+MONO_API const char* mono_image_get_name (MonoImage *image);
+MONO_API const char* mono_image_get_filename (MonoImage *image);
+MONO_API const char * mono_image_get_guid (MonoImage *image);
+MONO_API MonoAssembly* mono_image_get_assembly (MonoImage *image);
+MONO_API mono_bool mono_image_is_dynamic (MonoImage *image);
+MONO_API char* mono_image_rva_map (MonoImage *image, uint32_t rva);
-const MonoTableInfo *mono_image_get_table_info (MonoImage *image, int table_id);
-int mono_image_get_table_rows (MonoImage *image, int table_id);
-int mono_table_info_get_rows (const MonoTableInfo *table);
+MONO_API const MonoTableInfo *mono_image_get_table_info (MonoImage *image, int table_id);
+MONO_API int mono_image_get_table_rows (MonoImage *image, int table_id);
+MONO_API int mono_table_info_get_rows (const MonoTableInfo *table);
/* This actually returns a MonoPEResourceDataEntry *, but declaring it
* causes an include file loop.
*/
-void* mono_image_lookup_resource (MonoImage *image, uint32_t res_id,
+MONO_API void* mono_image_lookup_resource (MonoImage *image, uint32_t res_id,
uint32_t lang_id, mono_unichar2 *name);
-const char* mono_image_get_public_key (MonoImage *image, uint32_t *size);
-const char* mono_image_get_strong_name (MonoImage *image, uint32_t *size);
-uint32_t mono_image_strong_name_position (MonoImage *image, uint32_t *size);
-void mono_image_add_to_name_cache (MonoImage *image,
+MONO_API const char* mono_image_get_public_key (MonoImage *image, uint32_t *size);
+MONO_API const char* mono_image_get_strong_name (MonoImage *image, uint32_t *size);
+MONO_API uint32_t mono_image_strong_name_position (MonoImage *image, uint32_t *size);
+MONO_API void mono_image_add_to_name_cache (MonoImage *image,
const char *nspace, const char *name, uint32_t idx);
-mono_bool mono_image_has_authenticode_entry (MonoImage *image);
+MONO_API mono_bool mono_image_has_authenticode_entry (MonoImage *image);
MONO_END_DECLS
diff --git a/mono/metadata/loader.c b/mono/metadata/loader.c
index fb9f0128629..6983eb71e5b 100644
--- a/mono/metadata/loader.c
+++ b/mono/metadata/loader.c
@@ -2252,7 +2252,7 @@ stack_walk_adapter (MonoStackFrameInfo *frame, MonoContext *ctx, gpointer data)
return FALSE;
case FRAME_TYPE_MANAGED:
g_assert (frame->ji);
- return d->func (frame->ji->method, frame->native_offset, frame->il_offset, frame->managed, d->user_data);
+ return d->func (mono_jit_info_get_method (frame->ji), frame->native_offset, frame->il_offset, frame->managed, d->user_data);
break;
default:
g_assert_not_reached ();
diff --git a/mono/metadata/loader.h b/mono/metadata/loader.h
index c519c30607f..b159dee727a 100644
--- a/mono/metadata/loader.h
+++ b/mono/metadata/loader.h
@@ -8,86 +8,86 @@ MONO_BEGIN_DECLS
typedef mono_bool (*MonoStackWalk) (MonoMethod *method, int32_t native_offset, int32_t il_offset, mono_bool managed, void* data);
-MonoMethod *
+MONO_API MonoMethod *
mono_get_method (MonoImage *image, uint32_t token, MonoClass *klass);
-MonoMethod *
+MONO_API MonoMethod *
mono_get_method_full (MonoImage *image, uint32_t token, MonoClass *klass,
MonoGenericContext *context);
-MonoMethod *
+MONO_API MonoMethod *
mono_get_method_constrained (MonoImage *image, uint32_t token, MonoClass *constrained_class,
MonoGenericContext *context, MonoMethod **cil_method);
-void
+MONO_API void
mono_free_method (MonoMethod *method);
-MonoMethodSignature*
+MONO_API MonoMethodSignature*
mono_method_get_signature_full (MonoMethod *method, MonoImage *image, uint32_t token,
MonoGenericContext *context);
-MonoMethodSignature*
+MONO_API MonoMethodSignature*
mono_method_get_signature (MonoMethod *method, MonoImage *image, uint32_t token);
-MonoMethodSignature*
+MONO_API MonoMethodSignature*
mono_method_signature (MonoMethod *method);
-MonoMethodHeader*
+MONO_API MonoMethodHeader*
mono_method_get_header (MonoMethod *method);
-const char*
+MONO_API const char*
mono_method_get_name (MonoMethod *method);
-MonoClass*
+MONO_API MonoClass*
mono_method_get_class (MonoMethod *method);
-uint32_t
+MONO_API uint32_t
mono_method_get_token (MonoMethod *method);
-uint32_t
+MONO_API uint32_t
mono_method_get_flags (MonoMethod *method, uint32_t *iflags);
-uint32_t
+MONO_API uint32_t
mono_method_get_index (MonoMethod *method);
-MonoImage *
+MONO_API MonoImage *
mono_load_image (const char *fname, MonoImageOpenStatus *status);
-void
+MONO_API void
mono_add_internal_call (const char *name, const void* method);
-void*
+MONO_API void*
mono_lookup_internal_call (MonoMethod *method);
-const char*
+MONO_API const char*
mono_lookup_icall_symbol (MonoMethod *m);
-void
+MONO_API void
mono_dllmap_insert (MonoImage *assembly, const char *dll, const char *func, const char *tdll, const char *tfunc);
-void*
+MONO_API void*
mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char **exc_arg);
-void
+MONO_API void
mono_method_get_param_names (MonoMethod *method, const char **names);
-uint32_t
+MONO_API uint32_t
mono_method_get_param_token (MonoMethod *method, int idx);
-void
+MONO_API void
mono_method_get_marshal_info (MonoMethod *method, MonoMarshalSpec **mspecs);
-mono_bool
+MONO_API mono_bool
mono_method_has_marshal_info (MonoMethod *method);
-MonoMethod*
+MONO_API MonoMethod*
mono_method_get_last_managed (void);
-void
+MONO_API void
mono_stack_walk (MonoStackWalk func, void* user_data);
/* Use this if the IL offset is not needed: it's faster */
-void
+MONO_API void
mono_stack_walk_no_il (MonoStackWalk func, void* user_data);
MONO_END_DECLS
diff --git a/mono/metadata/locales.c b/mono/metadata/locales.c
index 23e63c5e733..1474a105737 100644
--- a/mono/metadata/locales.c
+++ b/mono/metadata/locales.c
@@ -24,6 +24,7 @@
#include <mono/metadata/locales.h>
#include <mono/metadata/culture-info.h>
#include <mono/metadata/culture-info-tables.h>
+#include <mono/utils/bsearch.h>
#ifndef DISABLE_NORMALIZATION
#include <mono/metadata/normalization-tables.h>
@@ -313,7 +314,7 @@ construct_culture_from_specific_name (MonoCultureInfo *ci, gchar *name)
MONO_ARCH_SAVE_REGS;
- ne = bsearch (name, culture_name_entries, NUM_CULTURE_ENTRIES,
+ ne = mono_binary_search (name, culture_name_entries, NUM_CULTURE_ENTRIES,
sizeof (CultureInfoNameEntry), culture_name_locator);
if (ne == NULL)
@@ -332,7 +333,7 @@ culture_info_entry_from_lcid (int lcid)
{
const CultureInfoEntry *ci;
- ci = bsearch (&lcid, culture_entries, NUM_CULTURE_ENTRIES, sizeof (CultureInfoEntry), culture_lcid_locator);
+ ci = mono_binary_search (&lcid, culture_entries, NUM_CULTURE_ENTRIES, sizeof (CultureInfoEntry), culture_lcid_locator);
return ci;
}
@@ -345,7 +346,7 @@ region_info_entry_from_lcid (int lcid)
MONO_ARCH_SAVE_REGS;
- ne = bsearch (&lcid, culture_entries, NUM_CULTURE_ENTRIES, sizeof (CultureInfoEntry), culture_lcid_locator);
+ ne = mono_binary_search (&lcid, culture_entries, NUM_CULTURE_ENTRIES, sizeof (CultureInfoEntry), culture_lcid_locator);
if (ne == NULL)
return FALSE;
@@ -355,47 +356,18 @@ region_info_entry_from_lcid (int lcid)
return entry;
}
-/*
- * The following two methods are modified from the ICU source code. (http://oss.software.ibm.com/icu)
- * Copyright (c) 1995-2003 International Business Machines Corporation and others
- * All rights reserved.
- */
-static gchar*
-get_posix_locale (void)
-{
- const gchar* posix_locale = NULL;
-
- posix_locale = g_getenv("LC_ALL");
- if (posix_locale == 0) {
- posix_locale = g_getenv("LANG");
- if (posix_locale == 0) {
- posix_locale = setlocale(LC_ALL, NULL);
- }
- }
-
- if (posix_locale == NULL)
- return NULL;
-
- if ((strcmp ("C", posix_locale) == 0) || (strchr (posix_locale, ' ') != NULL)
- || (strchr (posix_locale, '/') != NULL)) {
- /*
- * HPUX returns 'C C C C C C C'
- * Solaris can return /en_US/C/C/C/C/C on the second try.
- * Maybe we got some garbage.
- */
- return NULL;
- }
-
- return g_strdup (posix_locale);
-}
-
#if defined (__APPLE__)
static gchar*
get_darwin_locale (void)
{
static gchar *darwin_locale = NULL;
CFLocaleRef locale = NULL;
+ CFStringRef locale_language = NULL;
+ CFStringRef locale_country = NULL;
+ CFStringRef locale_script = NULL;
CFStringRef locale_cfstr = NULL;
+ CFIndex bytes_converted;
+ CFIndex bytes_written;
CFIndex len;
int i;
@@ -405,21 +377,51 @@ get_darwin_locale (void)
locale = CFLocaleCopyCurrent ();
if (locale) {
- locale_cfstr = CFLocaleGetIdentifier (locale);
-
- if (locale_cfstr) {
- len = CFStringGetMaximumSizeForEncoding (CFStringGetLength (locale_cfstr), kCFStringEncodingMacRoman) + 1;
- darwin_locale = (char *) malloc (len);
- if (!CFStringGetCString (locale_cfstr, darwin_locale, len, kCFStringEncodingMacRoman)) {
- free (darwin_locale);
- CFRelease (locale);
- darwin_locale = NULL;
- return NULL;
+ locale_language = CFLocaleGetValue (locale, kCFLocaleLanguageCode);
+ if (locale_language != NULL && CFStringGetBytes(locale_language, CFRangeMake (0, CFStringGetLength (locale_language)), kCFStringEncodingMacRoman, 0, FALSE, NULL, 0, &bytes_converted) > 0) {
+ len = bytes_converted + 1;
+
+ locale_country = CFLocaleGetValue (locale, kCFLocaleCountryCode);
+ if (locale_country != NULL && CFStringGetBytes (locale_country, CFRangeMake (0, CFStringGetLength (locale_country)), kCFStringEncodingMacRoman, 0, FALSE, NULL, 0, &bytes_converted) > 0) {
+ len += bytes_converted + 1;
+
+ locale_script = CFLocaleGetValue (locale, kCFLocaleScriptCode);
+ if (locale_script != NULL && CFStringGetBytes (locale_script, CFRangeMake (0, CFStringGetLength (locale_script)), kCFStringEncodingMacRoman, 0, FALSE, NULL, 0, &bytes_converted) > 0) {
+ len += bytes_converted + 1;
+ }
+
+ darwin_locale = (char *) malloc (len + 1);
+ CFStringGetBytes (locale_language, CFRangeMake (0, CFStringGetLength (locale_language)), kCFStringEncodingMacRoman, 0, FALSE, (UInt8 *) darwin_locale, len, &bytes_converted);
+
+ darwin_locale[bytes_converted] = '-';
+ bytes_written = bytes_converted + 1;
+ if (locale_script != NULL && CFStringGetBytes (locale_script, CFRangeMake (0, CFStringGetLength (locale_script)), kCFStringEncodingMacRoman, 0, FALSE, (UInt8 *) &darwin_locale[bytes_written], len - bytes_written, &bytes_converted) > 0) {
+ darwin_locale[bytes_written + bytes_converted] = '-';
+ bytes_written += bytes_converted + 1;
+ }
+
+ CFStringGetBytes (locale_country, CFRangeMake (0, CFStringGetLength (locale_country)), kCFStringEncodingMacRoman, 0, FALSE, (UInt8 *) &darwin_locale[bytes_written], len - bytes_written, &bytes_converted);
+ darwin_locale[bytes_written + bytes_converted] = '\0';
}
+ }
- for (i = 0; i < strlen (darwin_locale); i++)
- if (darwin_locale [i] == '_')
- darwin_locale [i] = '-';
+ if (darwin_locale == NULL) {
+ locale_cfstr = CFLocaleGetIdentifier (locale);
+
+ if (locale_cfstr) {
+ len = CFStringGetMaximumSizeForEncoding (CFStringGetLength (locale_cfstr), kCFStringEncodingMacRoman) + 1;
+ darwin_locale = (char *) malloc (len);
+ if (!CFStringGetCString (locale_cfstr, darwin_locale, len, kCFStringEncodingMacRoman)) {
+ free (darwin_locale);
+ CFRelease (locale);
+ darwin_locale = NULL;
+ return NULL;
+ }
+
+ for (i = 0; i < strlen (darwin_locale); i++)
+ if (darwin_locale [i] == '_')
+ darwin_locale [i] = '-';
+ }
}
CFRelease (locale);
@@ -429,14 +431,34 @@ get_darwin_locale (void)
}
#endif
-static gchar*
-get_current_locale_name (void)
+static char *
+get_posix_locale (void)
{
- gchar *locale;
- gchar *corrected = NULL;
- const gchar *p;
- gchar *c;
+ const char *locale;
+
+ locale = g_getenv ("LC_ALL");
+ if (locale == NULL) {
+ locale = g_getenv ("LANG");
+ if (locale == NULL)
+ locale = setlocale (LC_ALL, NULL);
+ }
+ if (locale == NULL)
+ return NULL;
+
+ /* Skip English-only locale 'C' */
+ if (strcmp (locale, "C") == 0)
+ return NULL;
+ return g_strdup (locale);
+}
+
+
+static gchar *
+get_current_locale_name (void)
+{
+ char *locale;
+ char *p, *ret;
+
#ifdef HOST_WIN32
locale = g_win32_getlocale ();
#elif defined (__APPLE__)
@@ -445,52 +467,23 @@ get_current_locale_name (void)
locale = get_posix_locale ();
#else
locale = get_posix_locale ();
-#endif
+#endif
if (locale == NULL)
return NULL;
- if ((p = strchr (locale, '.')) != NULL) {
- /* assume new locale can't be larger than old one? */
- corrected = g_malloc (strlen (locale));
- strncpy (corrected, locale, p - locale);
- corrected [p - locale] = 0;
+ p = strchr (locale, '.');
+ if (p != NULL)
+ *p = 0;
+ p = strchr (locale, '@');
+ if (p != NULL)
+ *p = 0;
- /* do not copy after the @ */
- if ((p = strchr (corrected, '@')) != NULL)
- corrected [p - corrected] = 0;
- }
-
- /* Note that we scan the *uncorrected* ID. */
- if ((p = strrchr (locale, '@')) != NULL) {
-
- /*
- * In Mono we dont handle the '@' modifier because we do
- * not have any cultures that use it. We just trim it
- * off of the end of the name.
- */
-
- if (corrected == NULL) {
- corrected = g_malloc (strlen (locale));
- strncpy (corrected, locale, p - locale);
- corrected [p - locale] = 0;
- }
- }
-
- if (corrected == NULL)
- corrected = locale;
- else
- g_free (locale);
-
- if ((c = strchr (corrected, '_')) != NULL)
- *c = '-';
-
- c = corrected;
- corrected = g_ascii_strdown (c, -1);
- g_free (c);
+ ret = g_ascii_strdown (locale, -1);
+ g_free (locale);
- return corrected;
-}
+ return ret;
+}
MonoBoolean
ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_current_locale (MonoCultureInfo *ci)
@@ -537,7 +530,7 @@ ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_name (
MONO_ARCH_SAVE_REGS;
n = mono_string_to_utf8 (name);
- ne = bsearch (n, culture_name_entries, NUM_CULTURE_ENTRIES,
+ ne = mono_binary_search (n, culture_name_entries, NUM_CULTURE_ENTRIES,
sizeof (CultureInfoNameEntry), culture_name_locator);
if (ne == NULL) {
@@ -591,7 +584,7 @@ ves_icall_System_Globalization_RegionInfo_construct_internal_region_from_name (M
MONO_ARCH_SAVE_REGS;
n = mono_string_to_utf8 (name);
- ne = bsearch (n, region_name_entries, NUM_REGION_ENTRIES,
+ ne = mono_binary_search (n, region_name_entries, NUM_REGION_ENTRIES,
sizeof (RegionInfoNameEntry), region_name_locator);
if (ne == NULL) {
diff --git a/mono/metadata/lock-tracer.c b/mono/metadata/lock-tracer.c
index f7623db73f5..d75e9c302cb 100644
--- a/mono/metadata/lock-tracer.c
+++ b/mono/metadata/lock-tracer.c
@@ -64,7 +64,7 @@ mono_locks_tracer_init (void)
{
char *name;
InitializeCriticalSection (&tracer_lock);
- if (!getenv ("MONO_ENABLE_LOCK_TRACER"))
+ if (!g_getenv ("MONO_ENABLE_LOCK_TRACER"))
return;
name = g_strdup_printf ("locks.%d", getpid ());
trace_file = fopen (name, "w+");
diff --git a/mono/metadata/marshal.c b/mono/metadata/marshal.c
index a69402c3d86..a6114b1b7e7 100644
--- a/mono/metadata/marshal.c
+++ b/mono/metadata/marshal.c
@@ -98,7 +98,7 @@ emit_struct_conv_full (MonoMethodBuilder *mb, MonoClass *klass, gboolean to_obje
static void
mono_struct_delete_old (MonoClass *klass, char *ptr);
-void *
+MONO_API void *
mono_marshal_string_to_utf16 (MonoString *s);
static void *
@@ -123,8 +123,13 @@ static void
mono_byvalarray_to_array (MonoArray *arr, gpointer native_arr, MonoClass *eltype, guint32 elnum);
static void
+mono_byvalarray_to_byte_array (MonoArray *arr, gpointer native_arr, guint32 elnum);
+
+static void
mono_array_to_byvalarray (gpointer native_arr, MonoArray *arr, MonoClass *eltype, guint32 elnum);
+static void
+mono_array_to_byte_byvalarray (gpointer native_arr, MonoArray *arr, guint32 elnum);
static MonoAsyncResult *
mono_delegate_begin_invoke (MonoDelegate *delegate, gpointer *params);
@@ -145,7 +150,7 @@ mono_marshal_check_domain_image (gint32 domain_id, MonoImage *image);
static MonoObject *
mono_remoting_wrapper (MonoMethod *method, gpointer *params);
-void
+MONO_API void
mono_upgrade_remote_class_wrapper (MonoReflectionType *rtype, MonoTransparentProxy *tproxy);
#endif
@@ -239,7 +244,9 @@ mono_marshal_init (void)
register_icall (mono_array_to_lparray, "mono_array_to_lparray", "ptr object", FALSE);
register_icall (mono_free_lparray, "mono_free_lparray", "void object ptr", FALSE);
register_icall (mono_byvalarray_to_array, "mono_byvalarray_to_array", "void object ptr ptr int32", FALSE);
+ register_icall (mono_byvalarray_to_byte_array, "mono_byvalarray_to_byte_array", "void object ptr int32", FALSE);
register_icall (mono_array_to_byvalarray, "mono_array_to_byvalarray", "void ptr object ptr int32", FALSE);
+ register_icall (mono_array_to_byte_byvalarray, "mono_array_to_byte_byvalarray", "void ptr object int32", FALSE);
register_icall (mono_delegate_to_ftnptr, "mono_delegate_to_ftnptr", "ptr object", FALSE);
register_icall (mono_ftnptr_to_delegate, "mono_ftnptr_to_delegate", "object ptr ptr", FALSE);
register_icall (mono_marshal_asany, "mono_marshal_asany", "ptr object int32 int32", FALSE);
@@ -548,10 +555,13 @@ mono_delegate_free_ftnptr (MonoDelegate *delegate)
if (ptr) {
uint32_t gchandle;
void **method_data;
+ MonoMethod *method;
+
ji = mono_jit_info_table_find (mono_domain_get (), mono_get_addr_from_ftnptr (ptr));
g_assert (ji);
- method_data = ((MonoMethodWrapper*)ji->method)->method_data;
+ method = mono_jit_info_get_method (ji);
+ method_data = ((MonoMethodWrapper*)method)->method_data;
/*the target gchandle is the first entry after size and the wrapper itself.*/
gchandle = GPOINTER_TO_UINT (method_data [2]);
@@ -559,7 +569,7 @@ mono_delegate_free_ftnptr (MonoDelegate *delegate)
if (gchandle)
mono_gchandle_free (gchandle);
- mono_runtime_free_method (mono_object_domain (delegate), ji->method);
+ mono_runtime_free_method (mono_object_domain (delegate), method);
}
}
@@ -693,6 +703,12 @@ mono_byvalarray_to_array (MonoArray *arr, gpointer native_arr, MonoClass *elclas
}
static void
+mono_byvalarray_to_byte_array (MonoArray *arr, gpointer native_arr, guint32 elnum)
+{
+ mono_byvalarray_to_array (arr, native_arr, mono_defaults.byte_class, elnum);
+}
+
+static void
mono_array_to_byvalarray (gpointer native_arr, MonoArray *arr, MonoClass *elclass, guint32 elnum)
{
g_assert (arr->obj.vtable->klass->element_class == mono_defaults.char_class);
@@ -715,6 +731,12 @@ mono_array_to_byvalarray (gpointer native_arr, MonoArray *arr, MonoClass *elclas
}
}
+static void
+mono_array_to_byte_byvalarray (gpointer native_arr, MonoArray *arr, guint32 elnum)
+{
+ mono_array_to_byvalarray (native_arr, arr, mono_defaults.byte_class, elnum);
+}
+
void
mono_string_utf8_to_builder (MonoStringBuilder *sb, char *text)
{
@@ -1346,9 +1368,8 @@ emit_ptr_to_object_conv (MonoMethodBuilder *mb, MonoType *type, MonoMarshalConv
mono_mb_emit_ldloc (mb, 1);
mono_mb_emit_byte (mb, CEE_LDIND_REF);
mono_mb_emit_ldloc (mb, 0);
- mono_mb_emit_ptr (mb, mono_defaults.byte_class);
mono_mb_emit_icon (mb, mspec->data.array_data.num_elem);
- mono_mb_emit_icall (mb, mono_byvalarray_to_array);
+ mono_mb_emit_icall (mb, mono_byvalarray_to_byte_array);
break;
}
case MONO_MARSHAL_CONV_STR_BYVALSTR:
@@ -1721,9 +1742,8 @@ emit_object_to_ptr_conv (MonoMethodBuilder *mb, MonoType *type, MonoMarshalConv
mono_mb_emit_ldloc (mb, 1);
mono_mb_emit_ldloc (mb, 0);
mono_mb_emit_byte (mb, CEE_LDIND_REF);
- mono_mb_emit_ptr (mb, mono_defaults.byte_class);
mono_mb_emit_icon (mb, mspec->data.array_data.num_elem);
- mono_mb_emit_icall (mb, mono_array_to_byvalarray);
+ mono_mb_emit_icall (mb, mono_array_to_byte_byvalarray);
mono_mb_patch_short_branch (mb, pos);
break;
}
@@ -2575,7 +2595,14 @@ mono_marshal_method_from_wrapper (MonoMethod *wrapper)
res = mono_marshal_get_wrapper_info (wrapper);
if (res == NULL)
return wrapper;
- return res;
+ if (wrapper->is_inflated)
+ /*
+ * A method cannot be inflated and a wrapper at the same time, so the wrapper info
+ * contains an uninflated method.
+ */
+ return mono_class_inflate_generic_method (res, mono_method_get_context (wrapper));
+ else
+ return res;
case MONO_WRAPPER_MANAGED_TO_NATIVE:
info = mono_marshal_get_wrapper_info (wrapper);
if (info && (info->subtype == WRAPPER_SUBTYPE_NONE || info->subtype == WRAPPER_SUBTYPE_NATIVE_FUNC_AOT))
@@ -2669,6 +2696,77 @@ get_wrapper_target_class (MonoImage *image)
return klass;
}
+/*
+ * Wrappers for generic methods should be instances of generic wrapper methods, i.e .the wrapper for Sort<int> should be
+ * an instance of the wrapper for Sort<T>. This is required for full-aot to work.
+ */
+
+/*
+ * check_generic_wrapper_cache:
+ *
+ * Check CACHE for the wrapper of the generic instance ORIG_METHOD, and return it if it is found.
+ * KEY should be the key for ORIG_METHOD in the cache, while DEF_KEY should be the key of its
+ * generic method definition.
+ */
+static MonoMethod*
+check_generic_wrapper_cache (GHashTable *cache, MonoMethod *orig_method, gpointer key, gpointer def_key)
+{
+ MonoMethod *res;
+ MonoMethod *inst, *def;
+ MonoGenericContext *ctx;
+ MonoMethod *def_method;
+
+ g_assert (orig_method->is_inflated);
+ def_method = ((MonoMethodInflated*)orig_method)->declaring;
+ ctx = mono_method_get_context (orig_method);
+
+ /*
+ * Look for the instance
+ */
+ res = mono_marshal_find_in_cache (cache, key);
+ if (res)
+ return res;
+
+ /*
+ * Look for the definition
+ */
+ def = mono_marshal_find_in_cache (cache, def_key);
+ if (def) {
+ inst = mono_class_inflate_generic_method (def, ctx);
+ /* Cache it */
+ mono_memory_barrier ();
+ mono_marshal_lock ();
+ res = g_hash_table_lookup (cache, key);
+ if (!res) {
+ g_hash_table_insert (cache, key, inst);
+ res = inst;
+ }
+ mono_marshal_unlock ();
+ return res;
+ }
+ return NULL;
+}
+
+static MonoMethod*
+cache_generic_wrapper (GHashTable *cache, MonoMethod *orig_method, MonoMethod *def, MonoGenericContext *ctx, gpointer key)
+{
+ MonoMethod *inst, *res;
+
+ /*
+ * We use the same cache for the generic definition and the instances.
+ */
+ inst = mono_class_inflate_generic_method (def, ctx);
+ mono_memory_barrier ();
+ mono_marshal_lock ();
+ res = g_hash_table_lookup (cache, key);
+ if (!res) {
+ g_hash_table_insert (cache, key, inst);
+ res = inst;
+ }
+ mono_marshal_unlock ();
+ return res;
+}
+
static MonoMethod*
check_generic_delegate_wrapper_cache (GHashTable *cache, MonoMethod *orig_method, MonoMethod *def_method, MonoGenericContext *ctx)
{
@@ -4096,6 +4194,7 @@ mono_marshal_get_delegate_invoke (MonoMethod *method, MonoDelegate *del)
MonoGenericContext *ctx = NULL;
MonoGenericContainer *container = NULL;
MonoMethod *orig_method = NULL;
+ WrapperInfo *info;
/*
* If the delegate target is null, and the target method is not static, a virtual
@@ -4126,8 +4225,9 @@ mono_marshal_get_delegate_invoke (MonoMethod *method, MonoDelegate *del)
closed_over_null = sig->param_count == mono_method_signature (del->method)->param_count;
if (del && del->method && mono_method_signature (del->method)->param_count == sig->param_count + 1 && (del->method->flags & METHOD_ATTRIBUTE_STATIC)) {
+ g_assert (!callvirt);
invoke_sig = mono_method_signature (del->method);
- target_method = del->method;
+ target_method = NULL;
static_method_with_first_arg_bound = TRUE;
}
@@ -4155,12 +4255,20 @@ mono_marshal_get_delegate_invoke (MonoMethod *method, MonoDelegate *del)
res = check_generic_delegate_wrapper_cache (cache, orig_method, method, ctx);
if (res)
return res;
- } else if (callvirt || static_method_with_first_arg_bound) {
+ } else if (static_method_with_first_arg_bound) {
+ cache = get_cache (&method->klass->image->delegate_bound_static_invoke_cache,
+ (GHashFunc)mono_signature_hash,
+ (GCompareFunc)mono_metadata_signature_equal);
+ /*
+ * The wrapper is based on sig+invoke_sig, but sig can be derived from invoke_sig.
+ */
+ res = mono_marshal_find_in_cache (cache, invoke_sig);
+ if (res)
+ return res;
+ } else if (callvirt) {
GHashTable **cache_ptr;
- if (static_method_with_first_arg_bound)
- cache_ptr = &method->klass->image->delegate_bound_static_invoke_cache;
- else
- cache_ptr = &method->klass->image->delegate_abstract_invoke_cache;
+
+ cache_ptr = &method->klass->image->delegate_abstract_invoke_cache;
/* We need to cache the signature+method pair */
mono_marshal_lock ();
@@ -4187,7 +4295,10 @@ mono_marshal_get_delegate_invoke (MonoMethod *method, MonoDelegate *del)
if (!static_method_with_first_arg_bound)
invoke_sig = static_sig;
- name = mono_signature_to_name (sig, "invoke");
+ if (static_method_with_first_arg_bound)
+ name = mono_signature_to_name (invoke_sig, "invoke_bound_");
+ else
+ name = mono_signature_to_name (sig, "invoke");
if (ctx)
mb = mono_mb_new (method->klass, name, MONO_WRAPPER_DELEGATE_INVOKE);
else
@@ -4307,7 +4418,12 @@ mono_marshal_get_delegate_invoke (MonoMethod *method, MonoDelegate *del)
def = mono_mb_create_and_cache (cache, method->klass, mb, sig, sig->param_count + 16);
res = cache_generic_delegate_wrapper (cache, orig_method, def, ctx);
- } else if (static_method_with_first_arg_bound || callvirt) {
+ } else if (static_method_with_first_arg_bound) {
+ res = mono_mb_create_and_cache (cache, invoke_sig, mb, sig, sig->param_count + 16);
+
+ info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_DELEGATE_INVOKE_BOUND);
+ mono_marshal_set_wrapper_info (res, info);
+ } else if (callvirt) {
// From mono_mb_create_and_cache
newm = mono_mb_create_method (mb, sig, sig->param_count + 16);
/*We perform double checked locking, so must fence before publishing*/
@@ -4321,7 +4437,10 @@ mono_marshal_get_delegate_invoke (MonoMethod *method, MonoDelegate *del)
if (static_method_with_first_arg_bound)
new_key->sig = signature_dup (del->method->klass->image, key.sig);
g_hash_table_insert (cache, new_key, res);
- mono_marshal_set_wrapper_info (res, new_key);
+
+ info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_DELEGATE_INVOKE_VIRTUAL);
+ mono_marshal_set_wrapper_info (res, info);
+
mono_marshal_unlock ();
} else {
mono_marshal_unlock ();
@@ -4329,6 +4448,9 @@ mono_marshal_get_delegate_invoke (MonoMethod *method, MonoDelegate *del)
}
} else {
res = mono_mb_create_and_cache (cache, sig, mb, sig, sig->param_count + 16);
+
+ info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_NONE);
+ mono_marshal_set_wrapper_info (res, info);
}
mono_mb_free (mb);
@@ -4425,9 +4547,12 @@ mono_marshal_get_string_ctor_signature (MonoMethod *method)
static MonoType*
get_runtime_invoke_type (MonoType *t, gboolean ret)
{
- if (t->byref)
+ if (t->byref) {
+ if (t->type == MONO_TYPE_GENERICINST && mono_class_is_nullable (mono_class_from_mono_type (t)))
+ return t;
/* Can't share this with 'I' as that needs another indirection */
- return t;
+ return &mono_defaults.int_class->this_arg;
+ }
if (MONO_TYPE_IS_REFERENCE (t))
return &mono_defaults.object_class->byval_arg;
@@ -4846,20 +4971,10 @@ mono_marshal_get_runtime_invoke (MonoMethod *method, gboolean virtual)
/* Can't share this as we push a string as this */
need_direct_wrapper = TRUE;
} else {
- if (method->klass->valuetype && mono_method_signature (method)->hasthis) {
- /*
- * Valuetype methods receive a managed pointer as the this argument.
- * Create a new signature to reflect this.
- */
- callsig = signature_dup_add_this (method->klass->image, mono_method_signature (method), method->klass);
- /* Can't share this as it would be shared with static methods taking an IntPtr argument */
- need_direct_wrapper = TRUE;
- } else {
- if (method->dynamic)
- callsig = signature_dup (method->klass->image, mono_method_signature (method));
- else
- callsig = mono_method_signature (method);
- }
+ if (method->dynamic)
+ callsig = signature_dup (method->klass->image, mono_method_signature (method));
+ else
+ callsig = mono_method_signature (method);
}
target_klass = get_wrapper_target_class (method->klass->image);
@@ -4880,9 +4995,15 @@ mono_marshal_get_runtime_invoke (MonoMethod *method, gboolean virtual)
callsig = mono_marshal_get_runtime_invoke_sig (callsig);
- cache = get_cache (&target_klass->image->runtime_invoke_cache,
- (GHashFunc)mono_signature_hash,
- (GCompareFunc)runtime_invoke_signature_equal);
+ if (method->klass->valuetype && mono_method_signature (method)->hasthis)
+ /* These have a different csig */
+ cache = get_cache (&target_klass->image->runtime_invoke_vtype_cache,
+ (GHashFunc)mono_signature_hash,
+ (GCompareFunc)runtime_invoke_signature_equal);
+ else
+ cache = get_cache (&target_klass->image->runtime_invoke_cache,
+ (GHashFunc)mono_signature_hash,
+ (GCompareFunc)runtime_invoke_signature_equal);
/* from mono_marshal_find_in_cache */
mono_marshal_lock ();
@@ -4906,7 +5027,7 @@ mono_marshal_get_runtime_invoke (MonoMethod *method, gboolean virtual)
csig->ret = &mono_defaults.object_class->byval_arg;
if (method->klass->valuetype && mono_method_signature (method)->hasthis)
- csig->params [0] = callsig->params [0];
+ csig->params [0] = get_runtime_invoke_type (&method->klass->this_arg, FALSE);
else
csig->params [0] = &mono_defaults.object_class->byval_arg;
csig->params [1] = &mono_defaults.int_class->byval_arg;
@@ -6317,6 +6438,9 @@ emit_marshal_vtype (EmitMarshalContext *m, int argnum, MonoType *t,
break;
}
+ if (t->byref && (t->attrs & PARAM_ATTRIBUTE_IN) && !(t->attrs & PARAM_ATTRIBUTE_OUT))
+ break;
+
/* Check for null */
mono_mb_emit_ldarg (mb, argnum);
pos2 = mono_mb_emit_branch (mb, CEE_BRFALSE);
@@ -6834,7 +6958,7 @@ emit_marshal_object (EmitMarshalContext *m, int argnum, MonoType *t,
}
#endif
- if (t->byref && !t->attrs & PARAM_ATTRIBUTE_IN && t->attrs & PARAM_ATTRIBUTE_OUT)
+ if (t->byref && !(t->attrs & PARAM_ATTRIBUTE_IN) && (t->attrs & PARAM_ATTRIBUTE_OUT))
break;
if (conv == -1) {
@@ -8756,13 +8880,14 @@ mono_marshal_get_native_wrapper (MonoMethod *method, gboolean check_exceptions,
pinvoke = TRUE;
if (!piinfo->addr) {
- if (pinvoke)
+ if (pinvoke) {
if (method->iflags & METHOD_IMPL_ATTRIBUTE_NATIVE)
exc_arg = "Method contains unsupported native code";
- else
+ else if (!aot)
mono_lookup_pinvoke_call (method, &exc_class, &exc_arg);
- else
+ } else {
piinfo->addr = mono_lookup_internal_call (method);
+ }
}
/* hack - redirect certain string constructors to CreateString */
@@ -9073,6 +9198,16 @@ mono_marshal_emit_managed_wrapper (MonoMethodBuilder *mb, MonoMethodSignature *i
emit_marshal (m, i, sig->params [i], mspecs [i + 1], 0, &csig->params [i], MARSHAL_ACTION_MANAGED_CONV_IN);
}
}
+
+ if (!sig->ret->byref) {
+ switch (sig->ret->type) {
+ case MONO_TYPE_STRING:
+ csig->ret = &mono_defaults.int_class->byval_arg;
+ break;
+ default:
+ break;
+ }
+ }
#else
MonoMethodSignature *sig, *csig;
int i, *tmp_locals;
@@ -9388,9 +9523,10 @@ mono_marshal_get_managed_wrapper (MonoMethod *method, MonoClass *delegate_klass,
MonoBoolean set_last_error = 0;
MonoBoolean best_fit_mapping = 0;
MonoBoolean throw_on_unmappable = 0;
+ MonoError error;
- mono_reflection_create_custom_attr_data_args (mono_defaults.corlib, attr->ctor, attr->data, attr->data_size, &typed_args, &named_args, &arginfo);
-
+ mono_reflection_create_custom_attr_data_args (mono_defaults.corlib, attr->ctor, attr->data, attr->data_size, &typed_args, &named_args, &arginfo, &error);
+ g_assert (mono_error_ok (&error));
g_assert (mono_array_length (typed_args) == 1);
/* typed args */
@@ -10209,6 +10345,19 @@ mono_marshal_get_synchronized_inner_wrapper (MonoMethod *method)
WrapperInfo *info;
MonoMethodSignature *sig;
MonoMethod *res;
+ MonoGenericContext *ctx = NULL;
+ MonoMethod *orig_method = NULL;
+ MonoGenericContainer *container = NULL;
+
+ if (method->is_inflated && !mono_method_get_context (method)->method_inst) {
+ orig_method = method;
+ ctx = &((MonoMethodInflated*)method)->context;
+ method = ((MonoMethodInflated*)method)->declaring;
+ container = mono_method_get_generic_container (method);
+ if (!container)
+ container = method->klass->generic_container;
+ g_assert (container);
+ }
mb = mono_mb_new (method->klass, method->name, MONO_WRAPPER_UNKNOWN);
#ifndef DISABLE_JIT
@@ -10221,6 +10370,8 @@ mono_marshal_get_synchronized_inner_wrapper (MonoMethod *method)
info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_SYNCHRONIZED_INNER);
info->d.synchronized_inner.method = method;
mono_marshal_set_wrapper_info (res, info);
+ if (ctx)
+ res = mono_class_inflate_generic_method (res, ctx);
return res;
}
@@ -10238,15 +10389,39 @@ mono_marshal_get_synchronized_wrapper (MonoMethod *method)
MonoMethod *res;
GHashTable *cache;
int i, pos, this_local, ret_local = 0;
+ MonoGenericContext *ctx = NULL;
+ MonoMethod *orig_method = NULL;
+ MonoGenericContainer *container = NULL;
g_assert (method);
if (method->wrapper_type == MONO_WRAPPER_SYNCHRONIZED)
return method;
- cache = get_cache (&method->klass->image->synchronized_cache, mono_aligned_addr_hash, NULL);
- if ((res = mono_marshal_find_in_cache (cache, method)))
- return res;
+ /* FIXME: Support generic methods too */
+ if (method->is_inflated && !mono_method_get_context (method)->method_inst) {
+ orig_method = method;
+ ctx = &((MonoMethodInflated*)method)->context;
+ method = ((MonoMethodInflated*)method)->declaring;
+ container = mono_method_get_generic_container (method);
+ if (!container)
+ container = method->klass->generic_container;
+ g_assert (container);
+ }
+
+ /*
+ * Check cache
+ */
+ if (ctx) {
+ cache = get_cache (&method->klass->image->synchronized_generic_cache, mono_aligned_addr_hash, NULL);
+ res = check_generic_wrapper_cache (cache, orig_method, orig_method, method);
+ if (res)
+ return res;
+ } else {
+ cache = get_cache (&method->klass->image->synchronized_cache, mono_aligned_addr_hash, NULL);
+ if ((res = mono_marshal_find_in_cache (cache, method)))
+ return res;
+ }
sig = signature_dup (method->klass->image, mono_method_signature (method));
sig->pinvoke = 0;
@@ -10303,7 +10478,7 @@ mono_marshal_get_synchronized_wrapper (MonoMethod *method)
mono_method_desc_free (desc);
desc = mono_method_desc_new ("Type:GetTypeFromHandle", FALSE);
- gettypefromhandle_method = mono_method_desc_search_in_class (desc, mono_defaults.monotype_class->parent);
+ gettypefromhandle_method = mono_method_desc_search_in_class (desc, mono_defaults.systemtype_class);
g_assert (gettypefromhandle_method);
mono_method_desc_free (desc);
}
@@ -10337,7 +10512,10 @@ mono_marshal_get_synchronized_wrapper (MonoMethod *method)
for (i = 0; i < sig->param_count; i++)
mono_mb_emit_ldarg (mb, i + (sig->hasthis == TRUE));
- mono_mb_emit_managed_call (mb, method, NULL);
+ if (ctx)
+ mono_mb_emit_managed_call (mb, mono_class_inflate_generic_method (method, &container->context), NULL);
+ else
+ mono_mb_emit_managed_call (mb, method, NULL);
if (!MONO_TYPE_IS_VOID (sig->ret))
mono_mb_emit_stloc (mb, ret_local);
@@ -10362,8 +10540,14 @@ mono_marshal_get_synchronized_wrapper (MonoMethod *method)
mono_mb_set_clauses (mb, 1, clause);
#endif
- res = mono_mb_create_and_cache (cache, method,
- mb, sig, sig->param_count + 16);
+ if (ctx) {
+ MonoMethod *def;
+ def = mono_mb_create_and_cache (cache, method, mb, sig, sig->param_count + 16);
+ res = cache_generic_wrapper (cache, orig_method, def, ctx, orig_method);
+ } else {
+ res = mono_mb_create_and_cache (cache, method,
+ mb, sig, sig->param_count + 16);
+ }
mono_mb_free (mb);
return res;
@@ -11321,6 +11505,76 @@ mono_marshal_get_array_address (int rank, int elem_size)
return ret;
}
+/*
+ * mono_marshal_get_array_accessor_wrapper:
+ *
+ * Return a wrapper which just calls METHOD, which should be an Array Get/Set/Address method.
+ */
+MonoMethod *
+mono_marshal_get_array_accessor_wrapper (MonoMethod *method)
+{
+ MonoMethodSignature *sig;
+ MonoMethodBuilder *mb;
+ MonoMethod *res;
+ GHashTable *cache;
+ int i;
+ MonoGenericContext *ctx = NULL;
+ MonoMethod *orig_method = NULL;
+ MonoGenericContainer *container = NULL;
+ WrapperInfo *info;
+
+ /*
+ * These wrappers are needed to avoid the JIT replacing the calls to these methods with intrinsics
+ * inside runtime invoke wrappers, thereby making the wrappers not unshareable.
+ * FIXME: Use generic methods.
+ */
+ /*
+ * Check cache
+ */
+ if (ctx) {
+ cache = NULL;
+ g_assert_not_reached ();
+ } else {
+ cache = get_cache (&method->klass->image->array_accessor_cache, mono_aligned_addr_hash, NULL);
+ if ((res = mono_marshal_find_in_cache (cache, method)))
+ return res;
+ }
+
+ sig = signature_dup (method->klass->image, mono_method_signature (method));
+ sig->pinvoke = 0;
+
+ mb = mono_mb_new (method->klass, method->name, MONO_WRAPPER_UNKNOWN);
+
+#ifndef DISABLE_JIT
+ /* Call the method */
+ if (sig->hasthis)
+ mono_mb_emit_ldarg (mb, 0);
+ for (i = 0; i < sig->param_count; i++)
+ mono_mb_emit_ldarg (mb, i + (sig->hasthis == TRUE));
+
+ if (ctx)
+ mono_mb_emit_managed_call (mb, mono_class_inflate_generic_method (method, &container->context), NULL);
+ else
+ mono_mb_emit_managed_call (mb, method, NULL);
+ mono_mb_emit_byte (mb, CEE_RET);
+#endif
+
+ if (ctx) {
+ MonoMethod *def;
+ def = mono_mb_create_and_cache (cache, method, mb, sig, sig->param_count + 16);
+ res = cache_generic_wrapper (cache, orig_method, def, ctx, orig_method);
+ } else {
+ res = mono_mb_create_and_cache (cache, method,
+ mb, sig, sig->param_count + 16);
+ info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_ARRAY_ACCESSOR);
+ info->d.array_accessor.method = method;
+ mono_marshal_set_wrapper_info (res, info);
+ }
+ mono_mb_free (mb);
+
+ return res;
+}
+
void*
mono_marshal_alloc (gulong size)
{
@@ -11426,7 +11680,7 @@ ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged (MonoArray *s
element_size = mono_array_element_size (src->obj.vtable->klass);
/* no references should be involved */
- source_addr = mono_array_addr_with_size (src, element_size, start_index);
+ source_addr = mono_array_addr_with_size_fast (src, element_size, start_index);
memcpy (dest, source_addr, length * element_size);
}
@@ -11455,7 +11709,7 @@ ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged (gpointer s
element_size = mono_array_element_size (dest->obj.vtable->klass);
/* no references should be involved */
- dest_addr = mono_array_addr_with_size (dest, element_size, start_index);
+ dest_addr = mono_array_addr_with_size_fast (dest, element_size, start_index);
memcpy (dest_addr, src, length * element_size);
}
@@ -11903,7 +12157,7 @@ ves_icall_System_Runtime_InteropServices_Marshal_ReAllocCoTaskMem (gpointer ptr,
void*
ves_icall_System_Runtime_InteropServices_Marshal_UnsafeAddrOfPinnedArrayElement (MonoArray *arrayobj, int index)
{
- return mono_array_addr_with_size (arrayobj, mono_array_element_size (arrayobj->obj.vtable->klass), index);
+ return mono_array_addr_with_size_fast (arrayobj, mono_array_element_size (arrayobj->obj.vtable->klass), index);
}
MonoDelegate*
@@ -12692,8 +12946,6 @@ mono_marshal_free_dynamic_wrappers (MonoMethod *method)
*/
if (image->runtime_invoke_direct_cache)
g_hash_table_remove (image->runtime_invoke_direct_cache, method);
- if (image->delegate_bound_static_invoke_cache)
- g_hash_table_foreach_remove (image->delegate_bound_static_invoke_cache, signature_method_pair_matches_method, method);
if (image->delegate_abstract_invoke_cache)
g_hash_table_foreach_remove (image->delegate_abstract_invoke_cache, signature_method_pair_matches_method, method);
@@ -12744,6 +12996,8 @@ mono_marshal_free_inflated_wrappers (MonoMethod *method)
g_hash_table_remove (method->klass->image->delegate_invoke_cache, sig);
if (sig && method->klass->image->runtime_invoke_cache)
g_hash_table_remove (method->klass->image->runtime_invoke_cache, sig);
+ if (sig && method->klass->image->runtime_invoke_vtype_cache)
+ g_hash_table_remove (method->klass->image->runtime_invoke_vtype_cache, sig);
/*
* indexed by SignatureMethodPair
@@ -12752,10 +13006,6 @@ mono_marshal_free_inflated_wrappers (MonoMethod *method)
g_hash_table_foreach_remove (method->klass->image->delegate_abstract_invoke_cache,
signature_method_pair_matches_signature, (gpointer)sig);
- if (sig && method->klass->image->delegate_bound_static_invoke_cache)
- g_hash_table_foreach_remove (method->klass->image->delegate_bound_static_invoke_cache,
- signature_method_pair_matches_signature, (gpointer)sig);
-
/*
* indexed by MonoMethod pointers
*/
diff --git a/mono/metadata/marshal.h b/mono/metadata/marshal.h
index 981a8a6dd4c..a5e45ee0d7a 100644
--- a/mono/metadata/marshal.h
+++ b/mono/metadata/marshal.h
@@ -108,8 +108,12 @@ typedef enum {
WRAPPER_SUBTYPE_SYNCHRONIZED_INNER,
WRAPPER_SUBTYPE_GSHAREDVT_IN,
WRAPPER_SUBTYPE_GSHAREDVT_OUT,
+ WRAPPER_SUBTYPE_ARRAY_ACCESSOR,
/* Subtypes of MONO_WRAPPER_MANAGED_TO_MANAGED */
- WRAPPER_SUBTYPE_GENERIC_ARRAY_HELPER
+ WRAPPER_SUBTYPE_GENERIC_ARRAY_HELPER,
+ /* Subtypes of MONO_WRAPPER_DELEGATE_INVOKE */
+ WRAPPER_SUBTYPE_DELEGATE_INVOKE_VIRTUAL,
+ WRAPPER_SUBTYPE_DELEGATE_INVOKE_BOUND
} WrapperSubtype;
typedef struct {
@@ -151,6 +155,10 @@ typedef struct {
gpointer func;
} ICallWrapperInfo;
+typedef struct {
+ MonoMethod *method;
+} ArrayAccessorWrapperInfo;
+
/*
* This structure contains additional information to uniquely identify a given wrapper
* method. It can be retrieved by mono_marshal_get_wrapper_info () for certain types
@@ -177,6 +185,8 @@ typedef struct {
GenericArrayHelperWrapperInfo generic_array_helper;
/* ICALL_WRAPPER */
ICallWrapperInfo icall;
+ /* ARRAY_ACCESSOR */
+ ArrayAccessorWrapperInfo array_accessor;
} d;
} WrapperInfo;
@@ -354,6 +364,9 @@ MonoMethod*
mono_marshal_get_array_address (int rank, int elem_size) MONO_INTERNAL;
MonoMethod *
+mono_marshal_get_array_accessor_wrapper (MonoMethod *method) MONO_INTERNAL;
+
+MonoMethod *
mono_marshal_get_generic_array_helper (MonoClass *class, MonoClass *iface,
gchar *name, MonoMethod *method) MONO_INTERNAL;
@@ -514,16 +527,16 @@ ves_icall_Mono_Interop_ComInteropProxy_AddProxy (gpointer pUnk, MonoComInteropPr
MonoComInteropProxy*
ves_icall_Mono_Interop_ComInteropProxy_FindProxy (gpointer pUnk) MONO_INTERNAL;
-void
+MONO_API void
mono_win32_compat_CopyMemory (gpointer dest, gconstpointer source, gsize length);
-void
+MONO_API void
mono_win32_compat_FillMemory (gpointer dest, gsize length, guchar fill);
-void
+MONO_API void
mono_win32_compat_MoveMemory (gpointer dest, gconstpointer source, gsize length);
-void
+MONO_API void
mono_win32_compat_ZeroMemory (gpointer dest, gsize length);
void
diff --git a/mono/metadata/mempool.h b/mono/metadata/mempool.h
index b8226ed6168..b096be6e4fd 100644
--- a/mono/metadata/mempool.h
+++ b/mono/metadata/mempool.h
@@ -7,37 +7,37 @@ MONO_BEGIN_DECLS
typedef struct _MonoMemPool MonoMemPool;
-MonoMemPool *
+MONO_API MonoMemPool *
mono_mempool_new (void);
-MonoMemPool *
+MONO_API MonoMemPool *
mono_mempool_new_size (int initial_size);
-void
+MONO_API void
mono_mempool_destroy (MonoMemPool *pool);
-void
+MONO_API void
mono_mempool_invalidate (MonoMemPool *pool);
-void
+MONO_API void
mono_mempool_empty (MonoMemPool *pool);
-void
+MONO_API void
mono_mempool_stats (MonoMemPool *pool);
-void*
+MONO_API void*
mono_mempool_alloc (MonoMemPool *pool, unsigned int size);
-void*
+MONO_API void*
mono_mempool_alloc0 (MonoMemPool *pool, unsigned int size);
-mono_bool
+MONO_API mono_bool
mono_mempool_contains_addr (MonoMemPool *pool, void* addr);
-char*
+MONO_API char*
mono_mempool_strdup (MonoMemPool *pool, const char *s);
-uint32_t
+MONO_API uint32_t
mono_mempool_get_allocated (MonoMemPool *pool);
MONO_END_DECLS
diff --git a/mono/metadata/metadata-internals.h b/mono/metadata/metadata-internals.h
index 973f5fd35dc..a9f3149d952 100644
--- a/mono/metadata/metadata-internals.h
+++ b/mono/metadata/metadata-internals.h
@@ -44,6 +44,7 @@ struct _MonoType {
#define MONO_PROCESSOR_ARCHITECTURE_X86 2
#define MONO_PROCESSOR_ARCHITECTURE_IA64 3
#define MONO_PROCESSOR_ARCHITECTURE_AMD64 4
+#define MONO_PROCESSOR_ARCHITECTURE_ARM 5
struct _MonoAssemblyName {
const char *name;
@@ -256,6 +257,7 @@ struct _MonoImage {
GHashTable *delegate_end_invoke_cache;
GHashTable *delegate_invoke_cache;
GHashTable *runtime_invoke_cache;
+ GHashTable *runtime_invoke_vtype_cache;
/*
* indexed by SignatureMethodPair
@@ -282,6 +284,8 @@ struct _MonoImage {
GHashTable *cominterop_wrapper_cache; /* LOCKING: marshal lock */
GHashTable *thunk_invoke_cache;
GHashTable *wrapper_param_names;
+ GHashTable *synchronized_generic_cache;
+ GHashTable *array_accessor_cache;
/*
* indexed by MonoClass pointers
@@ -588,7 +592,7 @@ mono_metadata_clean_for_image (MonoImage *image) MONO_INTERNAL;
void
mono_metadata_clean_generic_classes_for_image (MonoImage *image) MONO_INTERNAL;
-void
+MONO_API void
mono_metadata_cleanup (void);
const char * mono_meta_table_name (int table) MONO_INTERNAL;
@@ -608,7 +612,7 @@ mono_metadata_parse_array_full (MonoImage *image,
const char *ptr,
const char **rptr) MONO_INTERNAL;
-MonoType *
+MONO_API MonoType *
mono_metadata_parse_type_full (MonoImage *image,
MonoGenericContainer *container,
MonoParseTypeMode mode,
@@ -621,14 +625,14 @@ mono_metadata_parse_signature_full (MonoImage *image,
MonoGenericContainer *generic_container,
guint32 token) MONO_INTERNAL;
-MonoMethodSignature *
+MONO_API MonoMethodSignature *
mono_metadata_parse_method_signature_full (MonoImage *image,
MonoGenericContainer *generic_container,
int def,
const char *ptr,
const char **rptr);
-MonoMethodHeader *
+MONO_API MonoMethodHeader *
mono_metadata_parse_mh_full (MonoImage *image,
MonoGenericContainer *container,
const char *ptr);
@@ -687,7 +691,7 @@ mono_assembly_name_parse_full (const char *name,
gboolean *is_version_defined,
gboolean *is_token_defined) MONO_INTERNAL;
-guint32 mono_metadata_get_generic_param_row (MonoImage *image, guint32 token, guint32 *owner);
+MONO_API guint32 mono_metadata_get_generic_param_row (MonoImage *image, guint32 token, guint32 *owner);
void mono_unload_interface_ids (MonoBitSet *bitset) MONO_INTERNAL;
@@ -702,7 +706,7 @@ mono_get_shared_generic_inst (MonoGenericContainer *container) MONO_INTERNAL;
int
mono_type_stack_size_internal (MonoType *t, int *align, gboolean allow_open) MONO_INTERNAL;
-void mono_type_get_desc (GString *res, MonoType *type, mono_bool include_namespace);
+MONO_API void mono_type_get_desc (GString *res, MonoType *type, mono_bool include_namespace);
gboolean
mono_metadata_type_equal_full (MonoType *t1, MonoType *t2, gboolean signature_only) MONO_INTERNAL;
@@ -713,7 +717,7 @@ mono_metadata_parse_marshal_spec_full (MonoImage *image, const char *ptr) MONO_I
guint mono_metadata_generic_inst_hash (gconstpointer data) MONO_INTERNAL;
gboolean mono_metadata_generic_inst_equal (gconstpointer ka, gconstpointer kb) MONO_INTERNAL;
-void
+MONO_API void
mono_metadata_field_info_with_mempool (
MonoImage *meta,
guint32 table_index,
diff --git a/mono/metadata/metadata-verify.c b/mono/metadata/metadata-verify.c
index 94780bb0d5a..e72f97abd5a 100644
--- a/mono/metadata/metadata-verify.c
+++ b/mono/metadata/metadata-verify.c
@@ -24,6 +24,7 @@
#include <mono/metadata/attrdefs.h>
#include <mono/utils/strenc.h>
#include <mono/utils/mono-error-internals.h>
+#include <mono/utils/bsearch.h>
#include <string.h>
//#include <signal.h>
#include <ctype.h>
@@ -1069,7 +1070,7 @@ search_sorted_table (VerifyContext *ctx, int table, int column, guint32 coded_to
base = tinfo->base;
VERIFIER_DEBUG ( printf ("looking token %x table %d col %d rsize %d roff %d\n", coded_token, table, column, locator.col_size, locator.col_offset) );
- res = bsearch (&locator, base, tinfo->rows, tinfo->row_size, token_locator);
+ res = mono_binary_search (&locator, base, tinfo->rows, tinfo->row_size, token_locator);
if (!res)
return -1;
@@ -2659,8 +2660,8 @@ verify_method_table (VerifyContext *ctx)
ADD_ERROR (ctx, g_strdup_printf ("Invalid method row %d is a global method but not Static", i));
if (flags & (METHOD_ATTRIBUTE_ABSTRACT | METHOD_ATTRIBUTE_VIRTUAL))
ADD_ERROR (ctx, g_strdup_printf ("Invalid method row %d is a global method but is Abstract or Virtual", i));
- if (!(access == METHOD_ATTRIBUTE_COMPILER_CONTROLLED || access == METHOD_ATTRIBUTE_PUBLIC || access == METHOD_ATTRIBUTE_PRIVATE))
- ADD_ERROR (ctx, g_strdup_printf ("Invalid method row %d is a global method but not CompilerControled, Public or Private", i));
+ if (access == METHOD_ATTRIBUTE_FAMILY || access == METHOD_ATTRIBUTE_FAM_AND_ASSEM || access == METHOD_ATTRIBUTE_FAM_OR_ASSEM)
+ ADD_ERROR (ctx, g_strdup_printf ("Invalid method row %d is a global method but not CompilerControled, Public, Private or Assembly", i));
}
//TODO check valuetype for synchronized
@@ -3192,7 +3193,7 @@ verify_event_table_full (VerifyContext *ctx)
if (!found_add)
ADD_ERROR (ctx, g_strdup_printf ("Invalid Event row %d has no AddOn associated method", i));
if (!found_remove)
- ADD_ERROR (ctx, g_strdup_printf ("Invalid Event row %d has no AddOn associated method", i));
+ ADD_ERROR (ctx, g_strdup_printf ("Invalid Event row %d has no RemoveOn associated method", i));
}
}
@@ -3625,6 +3626,7 @@ verify_generic_param_constraint_table (VerifyContext *ctx)
MonoTableInfo *table = &ctx->image->tables [MONO_TABLE_GENERICPARAMCONSTRAINT];
guint32 data [MONO_GENPARCONSTRAINT_SIZE];
int i;
+ guint32 last_owner = 0, last_constraint = 0;
for (i = 0; i < table->rows; ++i) {
mono_metadata_decode_row (table, i, data, MONO_GENPARCONSTRAINT_SIZE);
@@ -3637,6 +3639,17 @@ verify_generic_param_constraint_table (VerifyContext *ctx)
if (!get_coded_index_token (TYPEDEF_OR_REF_DESC, data [MONO_GENPARCONSTRAINT_CONSTRAINT]))
ADD_ERROR (ctx, g_strdup_printf ("GenericParamConstraint table row %d has null Constraint token", i));
+
+ if (last_owner > data [MONO_GENPARCONSTRAINT_GENERICPAR])
+ ADD_ERROR (ctx, g_strdup_printf ("GenericParamConstraint table row %d is not properly sorted. Previous value of the owner column is 0x%08x current value is 0x%08x", i, last_owner, data [MONO_GENPARCONSTRAINT_GENERICPAR]));
+
+ if (last_owner == data [MONO_GENPARCONSTRAINT_GENERICPAR]) {
+ if (last_constraint == data [MONO_GENPARCONSTRAINT_CONSTRAINT])
+ ADD_ERROR (ctx, g_strdup_printf ("GenericParamConstraint table row %d has duplicate constraint 0x%08x", i, last_constraint));
+ } else {
+ last_owner = data [MONO_GENPARCONSTRAINT_GENERICPAR];
+ }
+ last_constraint = data [MONO_GENPARCONSTRAINT_CONSTRAINT];
}
}
diff --git a/mono/metadata/metadata.c b/mono/metadata/metadata.c
index a8db2e2d893..18c1be537c8 100644
--- a/mono/metadata/metadata.c
+++ b/mono/metadata/metadata.c
@@ -26,7 +26,8 @@
#include "marshal.h"
#include "debug-helpers.h"
#include <mono/utils/mono-error-internals.h>
-
+#include <mono/utils/bsearch.h>
+
/* Auxiliary structure used for caching inflated signatures */
typedef struct {
MonoMethodSignature *sig;
@@ -3917,7 +3918,7 @@ mono_metadata_typedef_from_field (MonoImage *meta, guint32 index)
if (meta->uncompressed_metadata)
loc.idx = search_ptr_table (meta, MONO_TABLE_FIELD_POINTER, loc.idx);
- if (!bsearch (&loc, tdef->base, tdef->rows, tdef->row_size, typedef_locator))
+ if (!mono_binary_search (&loc, tdef->base, tdef->rows, tdef->row_size, typedef_locator))
return 0;
/* loc_result is 0..1, needs to be mapped to table index (that is +1) */
@@ -3948,7 +3949,7 @@ mono_metadata_typedef_from_method (MonoImage *meta, guint32 index)
if (meta->uncompressed_metadata)
loc.idx = search_ptr_table (meta, MONO_TABLE_METHOD_POINTER, loc.idx);
- if (!bsearch (&loc, tdef->base, tdef->rows, tdef->row_size, typedef_locator))
+ if (!mono_binary_search (&loc, tdef->base, tdef->rows, tdef->row_size, typedef_locator))
return 0;
/* loc_result is 0..1, needs to be mapped to table index (that is +1) */
@@ -3990,7 +3991,7 @@ mono_metadata_interfaces_from_typedef_full (MonoImage *meta, guint32 index, Mono
loc.col_idx = MONO_INTERFACEIMPL_CLASS;
loc.t = tdef;
- if (!bsearch (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
+ if (!mono_binary_search (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
return TRUE;
start = loc.result;
@@ -4086,7 +4087,7 @@ mono_metadata_nested_in_typedef (MonoImage *meta, guint32 index)
loc.col_idx = MONO_NESTED_CLASS_NESTED;
loc.t = tdef;
- if (!bsearch (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
+ if (!mono_binary_search (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
return 0;
/* loc_result is 0..1, needs to be mapped to table index (that is +1) */
@@ -4150,7 +4151,7 @@ mono_metadata_packing_from_typedef (MonoImage *meta, guint32 index, guint32 *pac
loc.col_idx = MONO_CLASS_LAYOUT_PARENT;
loc.t = tdef;
- if (!bsearch (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
+ if (!mono_binary_search (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
return 0;
mono_metadata_decode_row (tdef, loc.result, cols, MONO_CLASS_LAYOUT_SIZE);
@@ -4187,7 +4188,7 @@ mono_metadata_custom_attrs_from_index (MonoImage *meta, guint32 index)
/* FIXME: Index translation */
- if (!bsearch (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
+ if (!mono_binary_search (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
return 0;
/* Find the first entry by searching backwards */
@@ -4220,7 +4221,7 @@ mono_metadata_declsec_from_index (MonoImage *meta, guint32 index)
loc.col_idx = MONO_DECL_SECURITY_PARENT;
loc.t = tdef;
- if (!bsearch (&loc, tdef->base, tdef->rows, tdef->row_size, declsec_locator))
+ if (!mono_binary_search (&loc, tdef->base, tdef->rows, tdef->row_size, declsec_locator))
return -1;
/* Find the first entry by searching backwards */
@@ -4934,7 +4935,7 @@ mono_metadata_field_info_full (MonoImage *meta, guint32 index, guint32 *offset,
loc.col_idx = MONO_FIELD_LAYOUT_FIELD;
loc.t = tdef;
- if (tdef->base && bsearch (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator)) {
+ if (tdef->base && mono_binary_search (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator)) {
*offset = mono_metadata_decode_row_col (tdef, loc.result, MONO_FIELD_LAYOUT_OFFSET);
} else {
*offset = (guint32)-1;
@@ -4946,7 +4947,7 @@ mono_metadata_field_info_full (MonoImage *meta, guint32 index, guint32 *offset,
loc.col_idx = MONO_FIELD_RVA_FIELD;
loc.t = tdef;
- if (tdef->base && bsearch (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator)) {
+ if (tdef->base && mono_binary_search (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator)) {
/*
* LAMESPEC: There is no signature, no nothing, just the raw data.
*/
@@ -5007,7 +5008,7 @@ mono_metadata_get_constant_index (MonoImage *meta, guint32 token, guint32 hint)
if ((hint > 0) && (hint < tdef->rows) && (mono_metadata_decode_row_col (tdef, hint - 1, MONO_CONSTANT_PARENT) == index))
return hint;
- if (tdef->base && bsearch (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator)) {
+ if (tdef->base && mono_binary_search (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator)) {
return loc.result + 1;
}
return 0;
@@ -5038,7 +5039,7 @@ mono_metadata_events_from_typedef (MonoImage *meta, guint32 index, guint *end_id
loc.col_idx = MONO_EVENT_MAP_PARENT;
loc.idx = index + 1;
- if (!bsearch (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
+ if (!mono_binary_search (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
return 0;
start = mono_metadata_decode_row_col (tdef, loc.result, MONO_EVENT_MAP_EVENTLIST);
@@ -5080,7 +5081,7 @@ mono_metadata_methods_from_event (MonoImage *meta, guint32 index, guint *end_i
loc.col_idx = MONO_METHOD_SEMA_ASSOCIATION;
loc.idx = ((index + 1) << MONO_HAS_SEMANTICS_BITS) | MONO_HAS_SEMANTICS_EVENT; /* Method association coded index */
- if (!bsearch (&loc, msemt->base, msemt->rows, msemt->row_size, table_locator))
+ if (!mono_binary_search (&loc, msemt->base, msemt->rows, msemt->row_size, table_locator))
return 0;
start = loc.result;
@@ -5129,7 +5130,7 @@ mono_metadata_properties_from_typedef (MonoImage *meta, guint32 index, guint *en
loc.col_idx = MONO_PROPERTY_MAP_PARENT;
loc.idx = index + 1;
- if (!bsearch (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
+ if (!mono_binary_search (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
return 0;
start = mono_metadata_decode_row_col (tdef, loc.result, MONO_PROPERTY_MAP_PROPERTY_LIST);
@@ -5171,7 +5172,7 @@ mono_metadata_methods_from_property (MonoImage *meta, guint32 index, guint *en
loc.col_idx = MONO_METHOD_SEMA_ASSOCIATION;
loc.idx = ((index + 1) << MONO_HAS_SEMANTICS_BITS) | MONO_HAS_SEMANTICS_PROPERTY; /* Method association coded index */
- if (!bsearch (&loc, msemt->base, msemt->rows, msemt->row_size, table_locator))
+ if (!mono_binary_search (&loc, msemt->base, msemt->rows, msemt->row_size, table_locator))
return 0;
start = loc.result;
@@ -5210,7 +5211,7 @@ mono_metadata_implmap_from_method (MonoImage *meta, guint32 method_idx)
loc.col_idx = MONO_IMPLMAP_MEMBER;
loc.idx = ((method_idx + 1) << MONO_MEMBERFORWD_BITS) | MONO_MEMBERFORWD_METHODDEF;
- if (!bsearch (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
+ if (!mono_binary_search (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
return 0;
return loc.result + 1;
@@ -5594,7 +5595,7 @@ mono_metadata_get_marshal_info (MonoImage *meta, guint32 idx, gboolean is_field)
/* FIXME: Index translation */
- if (!bsearch (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
+ if (!mono_binary_search (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
return NULL;
return mono_metadata_blob_heap (meta, mono_metadata_decode_row_col (tdef, loc.result, MONO_FIELD_MARSHAL_NATIVE_TYPE));
@@ -5647,7 +5648,7 @@ mono_class_get_overrides_full (MonoImage *image, guint32 type_token, MonoMethod
loc.col_idx = MONO_METHODIMPL_CLASS;
loc.idx = mono_metadata_token_index (type_token);
- if (!bsearch (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
+ if (!mono_binary_search (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
return TRUE;
start = loc.result;
@@ -5787,7 +5788,7 @@ mono_metadata_get_generic_param_row (MonoImage *image, guint32 token, guint32 *o
loc.col_idx = MONO_GENERICPARAM_OWNER;
loc.t = tdef;
- if (!bsearch (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
+ if (!mono_binary_search (&loc, tdef->base, tdef->rows, tdef->row_size, table_locator))
return 0;
/* Find the first entry by searching backwards */
@@ -6203,6 +6204,21 @@ mono_signature_is_instance (MonoMethodSignature *sig)
}
/**
+ * mono_signature_param_is_out
+ * @sig: the method signature inspected
+ * @param_num: the 0-based index of the inspected parameter
+ *
+ * Returns: #TRUE if the parameter is an out parameter, #FALSE
+ * otherwise.
+ */
+mono_bool
+mono_signature_param_is_out (MonoMethodSignature *sig, int param_num)
+{
+ g_assert (param_num >= 0 && param_num < sig->param_count);
+ return (sig->params [param_num]->attrs & PARAM_ATTRIBUTE_OUT) != 0;
+}
+
+/**
* mono_signature_explicit_this:
* @sig: the method signature inspected
*
diff --git a/mono/metadata/metadata.h b/mono/metadata/metadata.h
index 4d83adf9ead..4b880c7bab4 100644
--- a/mono/metadata/metadata.h
+++ b/mono/metadata/metadata.h
@@ -198,14 +198,14 @@ typedef struct {
} data;
} MonoMarshalSpec;
-void mono_metadata_init (void);
+MONO_API void mono_metadata_init (void);
-void mono_metadata_decode_row (const MonoTableInfo *t,
+MONO_API void mono_metadata_decode_row (const MonoTableInfo *t,
int idx,
uint32_t *res,
int res_size);
-uint32_t mono_metadata_decode_row_col (const MonoTableInfo *t,
+MONO_API uint32_t mono_metadata_decode_row_col (const MonoTableInfo *t,
int idx,
unsigned int col);
@@ -216,61 +216,61 @@ uint32_t mono_metadata_decode_row_col (const MonoTableInfo *t,
#define mono_metadata_table_size(bitfield,table) ((((bitfield) >> ((table)*2)) & 0x3) + 1)
#define mono_metadata_table_count(bitfield) ((bitfield) >> 24)
-int mono_metadata_compute_size (MonoImage *meta,
+MONO_API int mono_metadata_compute_size (MonoImage *meta,
int tableindex,
uint32_t *result_bitfield);
/*
*
*/
-const char *mono_metadata_locate (MonoImage *meta, int table, int idx);
-const char *mono_metadata_locate_token (MonoImage *meta, uint32_t token);
+MONO_API const char *mono_metadata_locate (MonoImage *meta, int table, int idx);
+MONO_API const char *mono_metadata_locate_token (MonoImage *meta, uint32_t token);
-const char *mono_metadata_string_heap (MonoImage *meta, uint32_t table_index);
-const char *mono_metadata_blob_heap (MonoImage *meta, uint32_t table_index);
-const char *mono_metadata_user_string (MonoImage *meta, uint32_t table_index);
-const char *mono_metadata_guid_heap (MonoImage *meta, uint32_t table_index);
+MONO_API const char *mono_metadata_string_heap (MonoImage *meta, uint32_t table_index);
+MONO_API const char *mono_metadata_blob_heap (MonoImage *meta, uint32_t table_index);
+MONO_API const char *mono_metadata_user_string (MonoImage *meta, uint32_t table_index);
+MONO_API const char *mono_metadata_guid_heap (MonoImage *meta, uint32_t table_index);
-uint32_t mono_metadata_typedef_from_field (MonoImage *meta, uint32_t table_index);
-uint32_t mono_metadata_typedef_from_method (MonoImage *meta, uint32_t table_index);
-uint32_t mono_metadata_nested_in_typedef (MonoImage *meta, uint32_t table_index);
-uint32_t mono_metadata_nesting_typedef (MonoImage *meta, uint32_t table_index, uint32_t start_index);
+MONO_API uint32_t mono_metadata_typedef_from_field (MonoImage *meta, uint32_t table_index);
+MONO_API uint32_t mono_metadata_typedef_from_method (MonoImage *meta, uint32_t table_index);
+MONO_API uint32_t mono_metadata_nested_in_typedef (MonoImage *meta, uint32_t table_index);
+MONO_API uint32_t mono_metadata_nesting_typedef (MonoImage *meta, uint32_t table_index, uint32_t start_index);
-MonoClass** mono_metadata_interfaces_from_typedef (MonoImage *meta, uint32_t table_index, unsigned int *count);
+MONO_API MonoClass** mono_metadata_interfaces_from_typedef (MonoImage *meta, uint32_t table_index, unsigned int *count);
-uint32_t mono_metadata_events_from_typedef (MonoImage *meta, uint32_t table_index, unsigned int *end_idx);
-uint32_t mono_metadata_methods_from_event (MonoImage *meta, uint32_t table_index, unsigned int *end);
-uint32_t mono_metadata_properties_from_typedef (MonoImage *meta, uint32_t table_index, unsigned int *end);
-uint32_t mono_metadata_methods_from_property (MonoImage *meta, uint32_t table_index, unsigned int *end);
-uint32_t mono_metadata_packing_from_typedef (MonoImage *meta, uint32_t table_index, uint32_t *packing, uint32_t *size);
-const char* mono_metadata_get_marshal_info (MonoImage *meta, uint32_t idx, mono_bool is_field);
-uint32_t mono_metadata_custom_attrs_from_index (MonoImage *meta, uint32_t cattr_index);
+MONO_API uint32_t mono_metadata_events_from_typedef (MonoImage *meta, uint32_t table_index, unsigned int *end_idx);
+MONO_API uint32_t mono_metadata_methods_from_event (MonoImage *meta, uint32_t table_index, unsigned int *end);
+MONO_API uint32_t mono_metadata_properties_from_typedef (MonoImage *meta, uint32_t table_index, unsigned int *end);
+MONO_API uint32_t mono_metadata_methods_from_property (MonoImage *meta, uint32_t table_index, unsigned int *end);
+MONO_API uint32_t mono_metadata_packing_from_typedef (MonoImage *meta, uint32_t table_index, uint32_t *packing, uint32_t *size);
+MONO_API const char* mono_metadata_get_marshal_info (MonoImage *meta, uint32_t idx, mono_bool is_field);
+MONO_API uint32_t mono_metadata_custom_attrs_from_index (MonoImage *meta, uint32_t cattr_index);
-MonoMarshalSpec *mono_metadata_parse_marshal_spec (MonoImage *image, const char *ptr);
+MONO_API MonoMarshalSpec *mono_metadata_parse_marshal_spec (MonoImage *image, const char *ptr);
-void mono_metadata_free_marshal_spec (MonoMarshalSpec *spec);
+MONO_API void mono_metadata_free_marshal_spec (MonoMarshalSpec *spec);
-uint32_t mono_metadata_implmap_from_method (MonoImage *meta, uint32_t method_idx);
+MONO_API uint32_t mono_metadata_implmap_from_method (MonoImage *meta, uint32_t method_idx);
-void mono_metadata_field_info (MonoImage *meta,
+MONO_API void mono_metadata_field_info (MonoImage *meta,
uint32_t table_index,
uint32_t *offset,
uint32_t *rva,
MonoMarshalSpec **marshal_spec);
-uint32_t mono_metadata_get_constant_index (MonoImage *meta, uint32_t token, uint32_t hint);
+MONO_API uint32_t mono_metadata_get_constant_index (MonoImage *meta, uint32_t token, uint32_t hint);
/*
* Functions to extract information from the Blobs
*/
-uint32_t mono_metadata_decode_value (const char *ptr,
+MONO_API uint32_t mono_metadata_decode_value (const char *ptr,
const char **rptr);
-int32_t mono_metadata_decode_signed_value (const char *ptr, const char **rptr);
+MONO_API int32_t mono_metadata_decode_signed_value (const char *ptr, const char **rptr);
-uint32_t mono_metadata_decode_blob_size (const char *ptr,
+MONO_API uint32_t mono_metadata_decode_blob_size (const char *ptr,
const char **rptr);
-void mono_metadata_encode_value (uint32_t value, char *bug, char **endbuf);
+MONO_API void mono_metadata_encode_value (uint32_t value, char *bug, char **endbuf);
#define MONO_OFFSET_IN_CLAUSE(clause,offset) \
((clause)->try_offset <= (offset) && (offset) < ((clause)->try_offset + (clause)->try_len))
@@ -329,133 +329,136 @@ typedef enum {
MONO_PARSE_FIELD
} MonoParseTypeMode;
-mono_bool
+MONO_API mono_bool
mono_type_is_byref (MonoType *type);
-int
+MONO_API int
mono_type_get_type (MonoType *type);
/* For MONO_TYPE_FNPTR */
-MonoMethodSignature*
+MONO_API MonoMethodSignature*
mono_type_get_signature (MonoType *type);
/* For MONO_TYPE_CLASS, VALUETYPE */
-MonoClass*
+MONO_API MonoClass*
mono_type_get_class (MonoType *type);
-MonoArrayType*
+MONO_API MonoArrayType*
mono_type_get_array_type (MonoType *type);
/* For MONO_TYPE_PTR */
-MonoType*
+MONO_API MonoType*
mono_type_get_ptr_type (MonoType *type);
-MonoClass*
+MONO_API MonoClass*
mono_type_get_modifiers (MonoType *type, mono_bool *is_required, void **iter);
-mono_bool mono_type_is_struct (MonoType *type);
-mono_bool mono_type_is_void (MonoType *type);
-mono_bool mono_type_is_pointer (MonoType *type);
-mono_bool mono_type_is_reference (MonoType *type);
+MONO_API mono_bool mono_type_is_struct (MonoType *type);
+MONO_API mono_bool mono_type_is_void (MonoType *type);
+MONO_API mono_bool mono_type_is_pointer (MonoType *type);
+MONO_API mono_bool mono_type_is_reference (MonoType *type);
-MonoType*
+MONO_API MonoType*
mono_signature_get_return_type (MonoMethodSignature *sig);
-MonoType*
+MONO_API MonoType*
mono_signature_get_params (MonoMethodSignature *sig, void **iter);
-uint32_t
+MONO_API uint32_t
mono_signature_get_param_count (MonoMethodSignature *sig);
-uint32_t
+MONO_API uint32_t
mono_signature_get_call_conv (MonoMethodSignature *sig);
-int
+MONO_API int
mono_signature_vararg_start (MonoMethodSignature *sig);
-mono_bool
+MONO_API mono_bool
mono_signature_is_instance (MonoMethodSignature *sig);
-mono_bool
+MONO_API mono_bool
mono_signature_explicit_this (MonoMethodSignature *sig);
-uint32_t mono_metadata_parse_typedef_or_ref (MonoImage *m,
+MONO_API mono_bool
+mono_signature_param_is_out (MonoMethodSignature *sig, int param_num);
+
+MONO_API uint32_t mono_metadata_parse_typedef_or_ref (MonoImage *m,
const char *ptr,
const char **rptr);
-int mono_metadata_parse_custom_mod (MonoImage *m,
+MONO_API int mono_metadata_parse_custom_mod (MonoImage *m,
MonoCustomMod *dest,
const char *ptr,
const char **rptr);
-MonoArrayType *mono_metadata_parse_array (MonoImage *m,
+MONO_API MonoArrayType *mono_metadata_parse_array (MonoImage *m,
const char *ptr,
const char **rptr);
-void mono_metadata_free_array (MonoArrayType *array);
-MonoType *mono_metadata_parse_type (MonoImage *m,
+MONO_API void mono_metadata_free_array (MonoArrayType *array);
+MONO_API MonoType *mono_metadata_parse_type (MonoImage *m,
MonoParseTypeMode mode,
short opt_attrs,
const char *ptr,
const char **rptr);
-MonoType *mono_metadata_parse_param (MonoImage *m,
+MONO_API MonoType *mono_metadata_parse_param (MonoImage *m,
const char *ptr,
const char **rptr);
-MonoType *mono_metadata_parse_ret_type (MonoImage *m,
+MONO_API MonoType *mono_metadata_parse_ret_type (MonoImage *m,
const char *ptr,
const char **rptr);
-MonoType *mono_metadata_parse_field_type (MonoImage *m,
+MONO_API MonoType *mono_metadata_parse_field_type (MonoImage *m,
short field_flags,
const char *ptr,
const char **rptr);
-MonoType *mono_type_create_from_typespec (MonoImage *image,
+MONO_API MonoType *mono_type_create_from_typespec (MonoImage *image,
uint32_t type_spec);
-void mono_metadata_free_type (MonoType *type);
-int mono_type_size (MonoType *type,
+MONO_API void mono_metadata_free_type (MonoType *type);
+MONO_API int mono_type_size (MonoType *type,
int *alignment);
-int mono_type_stack_size (MonoType *type,
+MONO_API int mono_type_stack_size (MonoType *type,
int *alignment);
-mono_bool mono_type_generic_inst_is_valuetype (MonoType *type);
-mono_bool mono_metadata_generic_class_is_valuetype (MonoGenericClass *gclass);
-unsigned int mono_metadata_generic_class_hash (MonoGenericClass *gclass);
-mono_bool mono_metadata_generic_class_equal (MonoGenericClass *g1, MonoGenericClass *g2);
+MONO_API mono_bool mono_type_generic_inst_is_valuetype (MonoType *type);
+MONO_API mono_bool mono_metadata_generic_class_is_valuetype (MonoGenericClass *gclass);
+MONO_API unsigned int mono_metadata_generic_class_hash (MonoGenericClass *gclass);
+MONO_API mono_bool mono_metadata_generic_class_equal (MonoGenericClass *g1, MonoGenericClass *g2);
-unsigned int mono_metadata_type_hash (MonoType *t1);
-mono_bool mono_metadata_type_equal (MonoType *t1, MonoType *t2);
+MONO_API unsigned int mono_metadata_type_hash (MonoType *t1);
+MONO_API mono_bool mono_metadata_type_equal (MonoType *t1, MonoType *t2);
-MonoMethodSignature *mono_metadata_signature_alloc (MonoImage *image, uint32_t nparams);
+MONO_API MonoMethodSignature *mono_metadata_signature_alloc (MonoImage *image, uint32_t nparams);
-MonoMethodSignature *mono_metadata_signature_dup (MonoMethodSignature *sig);
+MONO_API MonoMethodSignature *mono_metadata_signature_dup (MonoMethodSignature *sig);
-MonoMethodSignature *mono_metadata_parse_signature (MonoImage *image,
+MONO_API MonoMethodSignature *mono_metadata_parse_signature (MonoImage *image,
uint32_t token);
-MonoMethodSignature *mono_metadata_parse_method_signature (MonoImage *m,
+MONO_API MonoMethodSignature *mono_metadata_parse_method_signature (MonoImage *m,
int def,
const char *ptr,
const char **rptr);
-void mono_metadata_free_method_signature (MonoMethodSignature *method);
+MONO_API void mono_metadata_free_method_signature (MonoMethodSignature *method);
-mono_bool mono_metadata_signature_equal (MonoMethodSignature *sig1,
+MONO_API mono_bool mono_metadata_signature_equal (MonoMethodSignature *sig1,
MonoMethodSignature *sig2);
-unsigned int mono_signature_hash (MonoMethodSignature *sig);
+MONO_API unsigned int mono_signature_hash (MonoMethodSignature *sig);
-MonoMethodHeader *mono_metadata_parse_mh (MonoImage *m, const char *ptr);
-void mono_metadata_free_mh (MonoMethodHeader *mh);
+MONO_API MonoMethodHeader *mono_metadata_parse_mh (MonoImage *m, const char *ptr);
+MONO_API void mono_metadata_free_mh (MonoMethodHeader *mh);
/* MonoMethodHeader acccessors */
-const unsigned char*
+MONO_API const unsigned char*
mono_method_header_get_code (MonoMethodHeader *header, uint32_t* code_size, uint32_t* max_stack);
-MonoType**
+MONO_API MonoType**
mono_method_header_get_locals (MonoMethodHeader *header, uint32_t* num_locals, mono_bool *init_locals);
-int
+MONO_API int
mono_method_header_get_num_clauses (MonoMethodHeader *header);
-int
+MONO_API int
mono_method_header_get_clauses (MonoMethodHeader *header, MonoMethod *method, void **iter, MonoExceptionClause *clause);
-uint32_t
+MONO_API uint32_t
mono_type_to_unmanaged (MonoType *type, MonoMarshalSpec *mspec,
mono_bool as_field, mono_bool unicode, MonoMarshalConv *conv);
@@ -477,20 +480,20 @@ mono_type_to_unmanaged (MonoType *type, MonoMarshalSpec *mspec,
#define mono_metadata_token_code(token) ((token & 0xff000000))
-uint32_t mono_metadata_token_from_dor (uint32_t dor_index);
+MONO_API uint32_t mono_metadata_token_from_dor (uint32_t dor_index);
-char *mono_guid_to_string (const uint8_t *guid);
+MONO_API char *mono_guid_to_string (const uint8_t *guid);
-uint32_t mono_metadata_declsec_from_index (MonoImage *meta, uint32_t idx);
+MONO_API uint32_t mono_metadata_declsec_from_index (MonoImage *meta, uint32_t idx);
-uint32_t mono_metadata_translate_token_index (MonoImage *image, int table, uint32_t idx);
+MONO_API uint32_t mono_metadata_translate_token_index (MonoImage *image, int table, uint32_t idx);
-void mono_metadata_decode_table_row (MonoImage *image, int table,
+MONO_API void mono_metadata_decode_table_row (MonoImage *image, int table,
int idx,
uint32_t *res,
int res_size);
-uint32_t mono_metadata_decode_table_row_col (MonoImage *image, int table,
+MONO_API uint32_t mono_metadata_decode_table_row_col (MonoImage *image, int table,
int idx,
unsigned int col);
diff --git a/mono/metadata/method-builder.c b/mono/metadata/method-builder.c
index 5a1edeb210f..43a5e83933c 100644
--- a/mono/metadata/method-builder.c
+++ b/mono/metadata/method-builder.c
@@ -179,6 +179,8 @@ mono_mb_create_method (MonoMethodBuilder *mb, MonoMethodSignature *signature, in
}
method->signature = signature;
+ if (!signature->hasthis)
+ method->flags |= METHOD_ATTRIBUTE_STATIC;
#ifndef DISABLE_JIT
if (max_stack < 8)
diff --git a/mono/metadata/monitor.c b/mono/metadata/monitor.c
index 9933f1dd487..9784437db46 100644
--- a/mono/metadata/monitor.c
+++ b/mono/metadata/monitor.c
@@ -161,7 +161,7 @@ void
mono_monitor_init_tls (void)
{
#if !defined(HOST_WIN32) && defined(HAVE_KW_THREAD)
- tls_pthread_self = pthread_self ();
+ tls_pthread_self = (gsize) pthread_self ();
#endif
}
@@ -947,7 +947,7 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method)
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
mono_mb_emit_byte (mb, CEE_MONO_TLS);
- mono_mb_emit_i4 (mb, thread_tls_offset);
+ mono_mb_emit_i4 (mb, TLS_KEY_THREAD);
mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoInternalThread, tid));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I);
@@ -1109,7 +1109,7 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method)
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
mono_mb_emit_byte (mb, CEE_MONO_TLS);
- mono_mb_emit_i4 (mb, thread_tls_offset);
+ mono_mb_emit_i4 (mb, TLS_KEY_THREAD);
mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoInternalThread, tid));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I);
diff --git a/mono/metadata/monitor.h b/mono/metadata/monitor.h
index a034cfb3ddd..183c2ec0b52 100644
--- a/mono/metadata/monitor.h
+++ b/mono/metadata/monitor.h
@@ -16,7 +16,7 @@
G_BEGIN_DECLS
-void mono_locks_dump (gboolean include_untaken);
+MONO_API void mono_locks_dump (gboolean include_untaken);
void mono_monitor_init (void) MONO_INTERNAL;
void mono_monitor_cleanup (void) MONO_INTERNAL;
diff --git a/mono/metadata/mono-config.c b/mono/metadata/mono-config.c
index 1ae1ea53f11..d0af8b07f61 100644
--- a/mono/metadata/mono-config.c
+++ b/mono/metadata/mono-config.c
@@ -790,3 +790,17 @@ mono_config_parse_assembly_bindings (const char *filename, int amajor, int amino
mono_config_parse_file_with_context (&state, filename);
}
+static mono_bool mono_server_mode = FALSE;
+
+void
+mono_config_set_server_mode (mono_bool server_mode)
+{
+ mono_server_mode = server_mode;
+}
+
+mono_bool
+mono_config_is_server_mode (void)
+{
+ return mono_server_mode;
+}
+
diff --git a/mono/metadata/mono-config.h b/mono/metadata/mono-config.h
index 0b46425cdb5..4e68b8a15d8 100644
--- a/mono/metadata/mono-config.h
+++ b/mono/metadata/mono-config.h
@@ -13,17 +13,20 @@
MONO_BEGIN_DECLS
-const char* mono_get_config_dir (void);
-void mono_set_config_dir (const char *dir);
+MONO_API const char* mono_get_config_dir (void);
+MONO_API void mono_set_config_dir (const char *dir);
-const char* mono_get_machine_config (void);
+MONO_API const char* mono_get_machine_config (void);
-void mono_config_cleanup (void);
-void mono_config_parse (const char *filename);
-void mono_config_for_assembly (MonoImage *assembly);
-void mono_config_parse_memory (const char *buffer);
+MONO_API void mono_config_cleanup (void);
+MONO_API void mono_config_parse (const char *filename);
+MONO_API void mono_config_for_assembly (MonoImage *assembly);
+MONO_API void mono_config_parse_memory (const char *buffer);
-const char* mono_config_string_for_assembly_file (const char *filename);
+MONO_API const char* mono_config_string_for_assembly_file (const char *filename);
+
+MONO_API void mono_config_set_server_mode (mono_bool server_mode);
+MONO_API mono_bool mono_config_is_server_mode (void);
MONO_END_DECLS
diff --git a/mono/metadata/mono-cq.c b/mono/metadata/mono-cq.c
index 3ab5bf6ffe5..3023930e456 100644
--- a/mono/metadata/mono-cq.c
+++ b/mono/metadata/mono-cq.c
@@ -132,9 +132,9 @@ mono_cqitem_try_enqueue (MonoCQ *cq, MonoObject *obj)
}
if (InterlockedCompareExchange (&queue->last, pos + 1, pos) == pos) {
- mono_array_setref (queue->array, pos, obj);
+ mono_array_setref_fast (queue->array, pos, obj);
STORE_STORE_FENCE;
- mono_array_set (queue->array_state, char, pos, TRUE);
+ mono_array_set_fast (queue->array_state, char, pos, TRUE);
if ((pos + 1) == CQ_ARRAY_SIZE) {
CQ_DEBUG ("enqueue(): pos + 1 == CQ_ARRAY_SIZE, %d. Adding node.", CQ_ARRAY_SIZE);
mono_cq_add_node (cq);
diff --git a/mono/metadata/mono-debug-debugger.h b/mono/metadata/mono-debug-debugger.h
index 450302a443d..838b7ef4fa7 100644
--- a/mono/metadata/mono-debug-debugger.h
+++ b/mono/metadata/mono-debug-debugger.h
@@ -50,42 +50,42 @@ extern volatile gint32 _mono_debugger_interruption_request;
extern void (*mono_debugger_event_handler) (MonoDebuggerEvent event, guint64 data, guint64 arg);
-void mono_debugger_initialize (gboolean use_debugger);
-void mono_debugger_cleanup (void);
+MONO_API void mono_debugger_initialize (gboolean use_debugger);
+MONO_API void mono_debugger_cleanup (void);
-void mono_debugger_lock (void);
-void mono_debugger_unlock (void);
-void mono_debugger_event (MonoDebuggerEvent event, guint64 data, guint64 arg);
+MONO_API void mono_debugger_lock (void);
+MONO_API void mono_debugger_unlock (void);
+MONO_API void mono_debugger_event (MonoDebuggerEvent event, guint64 data, guint64 arg);
-gchar *
+MONO_API gchar *
mono_debugger_check_runtime_version (const char *filename);
-void
+MONO_API void
mono_debugger_class_initialized (MonoClass *klass);
-void
+MONO_API void
mono_debugger_check_interruption (void);
-void
+MONO_API void
mono_debugger_event_create_appdomain (MonoDomain *domain, gchar *shadow_path);
-void
+MONO_API void
mono_debugger_event_unload_appdomain (MonoDomain *domain);
-MonoDebugMethodAddressList *
+MONO_API MonoDebugMethodAddressList *
mono_debugger_insert_method_breakpoint (MonoMethod *method, guint64 idx);
-int
+MONO_API int
mono_debugger_remove_method_breakpoint (guint64 index);
-void
+MONO_API void
mono_debugger_check_breakpoints (MonoMethod *method, MonoDebugMethodAddress *debug_info);
-MonoClass *
+MONO_API MonoClass *
mono_debugger_register_class_init_callback (MonoImage *image, const gchar *full_name,
guint32 token, guint32 index);
-void
+MONO_API void
mono_debugger_remove_class_init_callback (int index);
#endif /* __MONO_DEBUG_DEBUGGER_H__ */
diff --git a/mono/metadata/mono-debug.h b/mono/metadata/mono-debug.h
index daba9e2ee1c..5f8b0258143 100644
--- a/mono/metadata/mono-debug.h
+++ b/mono/metadata/mono-debug.h
@@ -130,6 +130,9 @@ struct _MonoDebugSourceLocation {
/* gsharedvt local */
#define MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL 0x50000000
+/* variable is a vt address */
+#define MONO_DEBUG_VAR_ADDRESS_MODE_VTADDR 0x60000000
+
struct _MonoDebugVarInfo {
uint32_t index;
uint32_t offset;
@@ -148,59 +151,59 @@ extern MonoDebugFormat mono_debug_format;
extern int32_t mono_debug_debugger_version;
extern int32_t _mono_debug_using_mono_debugger;
-void mono_debug_list_add (MonoDebugList **list, const void* data);
-void mono_debug_list_remove (MonoDebugList **list, const void* data);
+MONO_API void mono_debug_list_add (MonoDebugList **list, const void* data);
+MONO_API void mono_debug_list_remove (MonoDebugList **list, const void* data);
-void mono_debug_init (MonoDebugFormat format);
-void mono_debug_open_image_from_memory (MonoImage *image, const mono_byte *raw_contents, int size);
-void mono_debug_cleanup (void);
+MONO_API void mono_debug_init (MonoDebugFormat format);
+MONO_API void mono_debug_open_image_from_memory (MonoImage *image, const mono_byte *raw_contents, int size);
+MONO_API void mono_debug_cleanup (void);
-void mono_debug_close_image (MonoImage *image);
+MONO_API void mono_debug_close_image (MonoImage *image);
-void mono_debug_domain_unload (MonoDomain *domain);
-void mono_debug_domain_create (MonoDomain *domain);
+MONO_API void mono_debug_domain_unload (MonoDomain *domain);
+MONO_API void mono_debug_domain_create (MonoDomain *domain);
-mono_bool mono_debug_using_mono_debugger (void);
+MONO_API mono_bool mono_debug_using_mono_debugger (void);
-MonoDebugMethodAddress *
+MONO_API MonoDebugMethodAddress *
mono_debug_add_method (MonoMethod *method, MonoDebugMethodJitInfo *jit, MonoDomain *domain);
-void
+MONO_API void
mono_debug_remove_method (MonoMethod *method, MonoDomain *domain);
-MonoDebugMethodInfo *
+MONO_API MonoDebugMethodInfo *
mono_debug_lookup_method (MonoMethod *method);
-MonoDebugMethodAddressList *
+MONO_API MonoDebugMethodAddressList *
mono_debug_lookup_method_addresses (MonoMethod *method);
-MonoDebugMethodJitInfo*
+MONO_API MonoDebugMethodJitInfo*
mono_debug_find_method (MonoMethod *method, MonoDomain *domain);
-void
+MONO_API void
mono_debug_free_method_jit_info (MonoDebugMethodJitInfo *jit);
-void
+MONO_API void
mono_debug_add_delegate_trampoline (void* code, int size);
-MonoDebugLocalsInfo*
+MONO_API MonoDebugLocalsInfo*
mono_debug_lookup_locals (MonoMethod *method);
/*
* Line number support.
*/
-MonoDebugSourceLocation *
+MONO_API MonoDebugSourceLocation *
mono_debug_lookup_source_location (MonoMethod *method, uint32_t address, MonoDomain *domain);
-int32_t
+MONO_API int32_t
mono_debug_il_offset_from_address (MonoMethod *method, MonoDomain *domain, uint32_t native_offset);
-void
+MONO_API void
mono_debug_free_source_location (MonoDebugSourceLocation *location);
-char *
+MONO_API char *
mono_debug_print_stack_frame (MonoMethod *method, uint32_t native_offset, MonoDomain *domain);
/*
@@ -209,11 +212,11 @@ mono_debug_print_stack_frame (MonoMethod *method, uint32_t native_offset, MonoDo
* These methods are used by the JIT while running inside the Mono Debugger.
*/
-int mono_debugger_method_has_breakpoint (MonoMethod *method);
-int mono_debugger_insert_breakpoint (const char *method_name, mono_bool include_namespace);
+MONO_API int mono_debugger_method_has_breakpoint (MonoMethod *method);
+MONO_API int mono_debugger_insert_breakpoint (const char *method_name, mono_bool include_namespace);
-void mono_set_is_debugger_attached (mono_bool attached);
-mono_bool mono_is_debugger_attached (void);
+MONO_API void mono_set_is_debugger_attached (mono_bool attached);
+MONO_API mono_bool mono_is_debugger_attached (void);
MONO_END_DECLS
diff --git a/mono/metadata/mono-gc.h b/mono/metadata/mono-gc.h
index f2ff92b53b8..689cad28a88 100644
--- a/mono/metadata/mono-gc.h
+++ b/mono/metadata/mono-gc.h
@@ -11,15 +11,15 @@ MONO_BEGIN_DECLS
typedef int (*MonoGCReferences) (MonoObject *obj, MonoClass *klass, uintptr_t size, uintptr_t num, MonoObject **refs, uintptr_t *offsets, void *data);
-void mono_gc_collect (int generation);
-int mono_gc_max_generation (void);
-int mono_gc_get_generation (MonoObject *object);
-int mono_gc_collection_count (int generation);
-int64_t mono_gc_get_used_size (void);
-int64_t mono_gc_get_heap_size (void);
-int mono_gc_invoke_finalizers (void);
+MONO_API void mono_gc_collect (int generation);
+MONO_API int mono_gc_max_generation (void);
+MONO_API int mono_gc_get_generation (MonoObject *object);
+MONO_API int mono_gc_collection_count (int generation);
+MONO_API int64_t mono_gc_get_used_size (void);
+MONO_API int64_t mono_gc_get_heap_size (void);
+MONO_API int mono_gc_invoke_finalizers (void);
/* heap walking is only valid in the pre-stop-world event callback */
-int mono_gc_walk_heap (int flags, MonoGCReferences callback, void *data);
+MONO_API int mono_gc_walk_heap (int flags, MonoGCReferences callback, void *data);
MONO_END_DECLS
diff --git a/mono/metadata/mono-hash.h b/mono/metadata/mono-hash.h
index 79c80b78d8d..9d382f15476 100644
--- a/mono/metadata/mono-hash.h
+++ b/mono/metadata/mono-hash.h
@@ -1,47 +1,17 @@
-/* GLIB - Library of useful routines for C programming
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+/*
+ * mono-hash.c: GC-aware hashtable, based on Eglib's Hashtable
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * Authors:
+ * Paolo Molaro (lupus@xamarin.com)
*
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*
- * Modified by the GLib Team and others 1997-2000. See the AUTHORS
- * file for a list of people on the GLib Team. See the ChangeLog
- * files for a list of changes. These files are distributed with
- * GLib at ftp://ftp.gtk.org/pub/gtk/.
+ * Copyright 2013 Xamarin Inc (http://www.xamarin.com)
*/
-
+#include <glib.h>
+#include <mono/utils/mono-publib.h>
#ifndef __MONO_G_HASH_H__
#define __MONO_G_HASH_H__
-/*
- * Imported in mono cvs from version 1.7 of gnome cvs.
- * This hash table is GC friendly and the pointers stored in it
- * are tracked by the garbage collector.
- */
-
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-typedef struct _MonoGHashTable MonoGHashTable;
-
-typedef gpointer (*MonoGRemapperFunc) (gpointer key, gpointer value,
- gpointer user_data);
-
+MONO_BEGIN_DECLS
/* do not change the values of this enum */
typedef enum {
MONO_HASH_CONSERVATIVE_GC,
@@ -50,55 +20,23 @@ typedef enum {
MONO_HASH_KEY_VALUE_GC /* note this is the OR of the other two values */
} MonoGHashGCType;
-/* Hash tables
- */
-MonoGHashTable* mono_g_hash_table_new (GHashFunc hash_func,
- GEqualFunc key_equal_func);
-MonoGHashTable* mono_g_hash_table_new_type (GHashFunc hash_func,
- GEqualFunc key_equal_func,
- MonoGHashGCType type);
-MonoGHashTable* mono_g_hash_table_new_full (GHashFunc hash_func,
- GEqualFunc key_equal_func,
- GDestroyNotify key_destroy_func,
- GDestroyNotify value_destroy_func);
-void mono_g_hash_table_destroy (MonoGHashTable *hash_table);
-void mono_g_hash_table_insert (MonoGHashTable *hash_table,
- gpointer key,
- gpointer value);
-void mono_g_hash_table_replace (MonoGHashTable *hash_table,
- gpointer key,
- gpointer value);
-gboolean mono_g_hash_table_remove (MonoGHashTable *hash_table,
- gconstpointer key);
-gboolean mono_g_hash_table_steal (MonoGHashTable *hash_table,
- gconstpointer key);
-gpointer mono_g_hash_table_lookup (MonoGHashTable *hash_table,
- gconstpointer key);
-gboolean mono_g_hash_table_lookup_extended (MonoGHashTable *hash_table,
- gconstpointer lookup_key,
- gpointer *orig_key,
- gpointer *value);
-void mono_g_hash_table_foreach (MonoGHashTable *hash_table,
- GHFunc func,
- gpointer user_data);
-guint mono_g_hash_table_foreach_remove (MonoGHashTable *hash_table,
- GHRFunc func,
- gpointer user_data);
-guint mono_g_hash_table_foreach_steal (MonoGHashTable *hash_table,
- GHRFunc func,
- gpointer user_data);
-gpointer mono_g_hash_table_find (MonoGHashTable *hash_table,
- GHRFunc predicate,
- gpointer user_data);
-guint mono_g_hash_table_size (MonoGHashTable *hash_table);
-
-void mono_g_hash_table_remap (MonoGHashTable *hash_table,
- MonoGRemapperFunc func,
- gpointer user_data);
-
-void mono_g_hash_table_print_stats (MonoGHashTable *table);
-
-G_END_DECLS
-
+typedef struct _MonoGHashTable MonoGHashTable;
+
+MONO_API MonoGHashTable *mono_g_hash_table_new_type (GHashFunc hash_func, GEqualFunc key_equal_func, MonoGHashGCType type);
+MONO_API MonoGHashTable *mono_g_hash_table_new (GHashFunc hash_func, GEqualFunc key_equal_func);
+MONO_API MonoGHashTable *mono_g_hash_table_new_full (GHashFunc hash_func, GEqualFunc key_equal_func,
+ GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func);
+MONO_API guint mono_g_hash_table_size (MonoGHashTable *hash);
+MONO_API gpointer mono_g_hash_table_lookup (MonoGHashTable *hash, gconstpointer key);
+MONO_API gboolean mono_g_hash_table_lookup_extended (MonoGHashTable *hash, gconstpointer key, gpointer *orig_key, gpointer *value);
+MONO_API void mono_g_hash_table_foreach (MonoGHashTable *hash, GHFunc func, gpointer user_data);
+MONO_API gpointer mono_g_hash_table_find (MonoGHashTable *hash, GHRFunc predicate, gpointer user_data);
+MONO_API gboolean mono_g_hash_table_remove (MonoGHashTable *hash, gconstpointer key);
+MONO_API guint mono_g_hash_table_foreach_remove (MonoGHashTable *hash, GHRFunc func, gpointer user_data);
+MONO_API void mono_g_hash_table_destroy (MonoGHashTable *hash);
+MONO_API void mono_g_hash_table_insert (MonoGHashTable *h, gpointer k, gpointer v);
+MONO_API void mono_g_hash_table_replace (MonoGHashTable *h, gpointer k, gpointer v);
+MONO_API void mono_g_hash_table_print_stats (MonoGHashTable *table);
+
+MONO_END_DECLS
#endif /* __MONO_G_HASH_H__ */
-
diff --git a/mono/metadata/mono-mlist.h b/mono/metadata/mono-mlist.h
index 0dc0b4b5d58..199496a42ee 100644
--- a/mono/metadata/mono-mlist.h
+++ b/mono/metadata/mono-mlist.h
@@ -8,16 +8,16 @@
#include <mono/metadata/object.h>
typedef struct _MonoMList MonoMList;
-MonoMList* mono_mlist_alloc (MonoObject *data);
-MonoObject* mono_mlist_get_data (MonoMList* list);
-void mono_mlist_set_data (MonoMList* list, MonoObject *data);
-MonoMList* mono_mlist_set_next (MonoMList* list, MonoMList *next);
-int mono_mlist_length (MonoMList* list);
-MonoMList* mono_mlist_next (MonoMList* list);
-MonoMList* mono_mlist_last (MonoMList* list);
-MonoMList* mono_mlist_prepend (MonoMList* list, MonoObject *data);
-MonoMList* mono_mlist_append (MonoMList* list, MonoObject *data);
-MonoMList* mono_mlist_remove_item (MonoMList* list, MonoMList *item);
+MONO_API MonoMList* mono_mlist_alloc (MonoObject *data);
+MONO_API MonoObject* mono_mlist_get_data (MonoMList* list);
+MONO_API void mono_mlist_set_data (MonoMList* list, MonoObject *data);
+MONO_API MonoMList* mono_mlist_set_next (MonoMList* list, MonoMList *next);
+MONO_API int mono_mlist_length (MonoMList* list);
+MONO_API MonoMList* mono_mlist_next (MonoMList* list);
+MONO_API MonoMList* mono_mlist_last (MonoMList* list);
+MONO_API MonoMList* mono_mlist_prepend (MonoMList* list, MonoObject *data);
+MONO_API MonoMList* mono_mlist_append (MonoMList* list, MonoObject *data);
+MONO_API MonoMList* mono_mlist_remove_item (MonoMList* list, MonoMList *item);
#endif /* __MONO_METADATA_MONO_MLIST_H__ */
diff --git a/mono/metadata/null-gc.c b/mono/metadata/null-gc.c
index 13446ee0ecd..86a2528b09f 100644
--- a/mono/metadata/null-gc.c
+++ b/mono/metadata/null-gc.c
@@ -193,6 +193,12 @@ mono_gc_wbarrier_generic_store (gpointer ptr, MonoObject* value)
}
void
+mono_gc_wbarrier_generic_store_atomic (gpointer ptr, MonoObject *value)
+{
+ InterlockedWritePointer (ptr, value);
+}
+
+void
mono_gc_wbarrier_generic_nostore (gpointer ptr)
{
}
diff --git a/mono/metadata/object-internals.h b/mono/metadata/object-internals.h
index f66d147a88e..d969533904f 100644
--- a/mono/metadata/object-internals.h
+++ b/mono/metadata/object-internals.h
@@ -194,6 +194,27 @@ struct _MonoString {
#define mono_array_length_fast(array) ((array)->max_length)
#define mono_array_addr_with_size_fast(array,size,index) ( ((char*)(array)->vector) + (size) * (index) )
+#define mono_array_addr_fast(array,type,index) ((type*)(void*) mono_array_addr_with_size_fast (array, sizeof (type), index))
+#define mono_array_get_fast(array,type,index) ( *(type*)mono_array_addr_fast ((array), type, (index)) )
+#define mono_array_set_fast(array,type,index,value) \
+ do { \
+ type *__p = (type *) mono_array_addr_fast ((array), type, (index)); \
+ *__p = (value); \
+ } while (0)
+#define mono_array_setref_fast(array,index,value) \
+ do { \
+ void **__p = (void **) mono_array_addr_fast ((array), void*, (index)); \
+ mono_gc_wbarrier_set_arrayref ((array), __p, (MonoObject*)(value)); \
+ /* *__p = (value);*/ \
+ } while (0)
+#define mono_array_memcpy_refs_fast(dest,destidx,src,srcidx,count) \
+ do { \
+ void **__p = (void **) mono_array_addr_fast ((dest), void*, (destidx)); \
+ void **__s = mono_array_addr_fast ((src), void*, (srcidx)); \
+ mono_gc_wbarrier_arrayref_copy (__p, __s, (count)); \
+ } while (0)
+
+
typedef struct {
MonoObject obj;
MonoObject *identity;
@@ -1391,7 +1412,7 @@ void mono_reflection_initialize_generic_parameter (MonoReflectionGenericP
void mono_reflection_create_unmanaged_type (MonoReflectionType *type) MONO_INTERNAL;
void mono_reflection_register_with_runtime (MonoReflectionType *type) MONO_INTERNAL;
-void mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *method, const guchar *data, guint32 len, MonoArray **typed_args, MonoArray **named_args, CattrNamedArg **named_arg_info) MONO_INTERNAL;
+void mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *method, const guchar *data, guint32 len, MonoArray **typed_args, MonoArray **named_args, CattrNamedArg **named_arg_info, MonoError *error) MONO_INTERNAL;
MonoMethodSignature * mono_reflection_lookup_signature (MonoImage *image, MonoMethod *method, guint32 token) MONO_INTERNAL;
MonoArray* mono_param_get_objects_internal (MonoDomain *domain, MonoMethod *method, MonoClass *refclass) MONO_INTERNAL;
@@ -1584,7 +1605,7 @@ void
mono_field_static_get_value_for_thread (MonoInternalThread *thread, MonoVTable *vt, MonoClassField *field, void *value) MONO_INTERNAL;
/* exported, used by the debugger */
-void *
+MONO_API void *
mono_vtable_get_static_field_data (MonoVTable *vt);
char *
diff --git a/mono/metadata/object.c b/mono/metadata/object.c
index dec04e059cf..1b7afbd70f1 100644
--- a/mono/metadata/object.c
+++ b/mono/metadata/object.c
@@ -2013,7 +2013,7 @@ mono_class_create_runtime_vtable (MonoDomain *domain, MonoClass *class, gboolean
bitmap = default_bitmap;
} else if (mono_type_is_struct (field->type)) {
fclass = mono_class_from_mono_type (field->type);
- bitmap = compute_class_bitmap (fclass, default_bitmap, sizeof (default_bitmap) * 8, 0, &max_set, FALSE);
+ bitmap = compute_class_bitmap (fclass, default_bitmap, sizeof (default_bitmap) * 8, - (int)(sizeof (MonoObject) / sizeof (gpointer)), &max_set, FALSE);
numbits = max_set + 1;
} else {
default_bitmap [0] = 0;
@@ -2626,7 +2626,7 @@ mono_remote_class_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, Mon
MonoClass *klass;
type = ((MonoReflectionType *)rp->class_to_proxy)->type;
klass = mono_class_from_mono_type (type);
-#ifndef DISABLE_COMf
+#ifndef DISABLE_COM
if ((mono_class_is_com_object (klass) || (mono_class_get_com_object_class () && klass == mono_class_get_com_object_class ())) && !mono_vtable_is_remote (mono_class_vtable (mono_domain_get (), klass)))
remote_class->default_vtable = mono_class_proxy_vtable (domain, remote_class, MONO_REMOTING_TARGET_COMINTEROP);
else
@@ -4627,7 +4627,7 @@ mono_array_full_copy (MonoArray *src, MonoArray *dest)
#ifdef HAVE_SGEN_GC
if (klass->element_class->valuetype) {
if (klass->element_class->has_references)
- mono_value_copy_array (dest, 0, mono_array_addr_with_size (src, 0, 0), mono_array_length (src));
+ mono_value_copy_array (dest, 0, mono_array_addr_with_size_fast (src, 0, 0), mono_array_length (src));
else
mono_gc_memmove (&dest->vector, &src->vector, size);
} else {
@@ -4664,7 +4664,7 @@ mono_array_clone_in_domain (MonoDomain *domain, MonoArray *array)
#ifdef HAVE_SGEN_GC
if (klass->element_class->valuetype) {
if (klass->element_class->has_references)
- mono_value_copy_array (o, 0, mono_array_addr_with_size (array, 0, 0), mono_array_length (array));
+ mono_value_copy_array (o, 0, mono_array_addr_with_size_fast (array, 0, 0), mono_array_length (array));
else
mono_gc_memmove (&o->vector, &array->vector, size);
} else {
@@ -4687,7 +4687,7 @@ mono_array_clone_in_domain (MonoDomain *domain, MonoArray *array)
#ifdef HAVE_SGEN_GC
if (klass->element_class->valuetype) {
if (klass->element_class->has_references)
- mono_value_copy_array (o, 0, mono_array_addr_with_size (array, 0, 0), mono_array_length (array));
+ mono_value_copy_array (o, 0, mono_array_addr_with_size_fast (array, 0, 0), mono_array_length (array));
else
mono_gc_memmove (&o->vector, &array->vector, size);
} else {
@@ -5166,7 +5166,7 @@ void
mono_value_copy_array (MonoArray *dest, int dest_idx, gpointer src, int count)
{
int size = mono_array_element_size (dest->obj.vtable->klass);
- char *d = mono_array_addr_with_size (dest, size, dest_idx);
+ char *d = mono_array_addr_with_size_fast (dest, size, dest_idx);
g_assert (size == mono_class_value_size (mono_object_class (dest)->element_class, NULL));
mono_gc_wbarrier_value_copy (d, src, count, mono_object_class (dest)->element_class);
}
@@ -6050,6 +6050,7 @@ mono_object_to_string (MonoObject *obj, MonoObject **exc)
{
static MonoMethod *to_string = NULL;
MonoMethod *method;
+ void *target = obj;
g_assert (obj);
@@ -6058,7 +6059,12 @@ mono_object_to_string (MonoObject *obj, MonoObject **exc)
method = mono_object_get_virtual_method (obj, to_string);
- return (MonoString *) mono_runtime_invoke (method, obj, NULL, exc);
+ // Unbox value type if needed
+ if (mono_class_is_valuetype (mono_method_get_class (method))) {
+ target = mono_object_unbox (obj);
+ }
+
+ return (MonoString *) mono_runtime_invoke (method, target, NULL, exc);
}
/**
@@ -6183,7 +6189,7 @@ mono_delegate_ctor (MonoObject *this, MonoObject *target, gpointer addr)
if (!ji && domain != mono_get_root_domain ())
ji = mono_jit_info_table_find (mono_get_root_domain (), mono_get_addr_from_ftnptr (addr));
if (ji) {
- method = ji->method;
+ method = mono_jit_info_get_method (ji);
g_assert (!method->klass->generic_container);
}
diff --git a/mono/metadata/object.h b/mono/metadata/object.h
index e975298e881..3015159d7fb 100644
--- a/mono/metadata/object.h
+++ b/mono/metadata/object.h
@@ -65,231 +65,231 @@ typedef void (*MonoMainThreadFunc) (void* user_data);
mono_gc_wbarrier_arrayref_copy (__p, __s, (count)); \
} while (0)
-mono_unichar2 *mono_string_chars (MonoString *s);
-int mono_string_length (MonoString *s);
+MONO_API mono_unichar2 *mono_string_chars (MonoString *s);
+MONO_API int mono_string_length (MonoString *s);
-MonoObject *
+MONO_API MonoObject *
mono_object_new (MonoDomain *domain, MonoClass *klass);
-MonoObject *
+MONO_API MonoObject *
mono_object_new_specific (MonoVTable *vtable);
/* can be used for classes without finalizer in non-profiling mode */
-MonoObject *
+MONO_API MonoObject *
mono_object_new_fast (MonoVTable *vtable);
-MonoObject *
+MONO_API MonoObject *
mono_object_new_alloc_specific (MonoVTable *vtable);
-MonoObject *
+MONO_API MonoObject *
mono_object_new_from_token (MonoDomain *domain, MonoImage *image, uint32_t token);
-MonoArray*
+MONO_API MonoArray*
mono_array_new (MonoDomain *domain, MonoClass *eclass, uintptr_t n);
-MonoArray*
+MONO_API MonoArray*
mono_array_new_full (MonoDomain *domain, MonoClass *array_class,
uintptr_t *lengths, intptr_t *lower_bounds);
-MonoArray *
+MONO_API MonoArray *
mono_array_new_specific (MonoVTable *vtable, uintptr_t n);
-MonoArray*
+MONO_API MonoArray*
mono_array_clone (MonoArray *array);
-char*
+MONO_API char*
mono_array_addr_with_size (MonoArray *array, int size, uintptr_t idx);
-uintptr_t
+MONO_API uintptr_t
mono_array_length (MonoArray *array);
-MonoString*
+MONO_API MonoString*
mono_string_new_utf16 (MonoDomain *domain, const mono_unichar2 *text, int32_t len);
-MonoString*
+MONO_API MonoString*
mono_string_new_size (MonoDomain *domain, int32_t len);
-MonoString*
+MONO_API MonoString*
mono_ldstr (MonoDomain *domain, MonoImage *image, uint32_t str_index);
-MonoString*
+MONO_API MonoString*
mono_string_is_interned (MonoString *str);
-MonoString*
+MONO_API MonoString*
mono_string_intern (MonoString *str);
-MonoString*
+MONO_API MonoString*
mono_string_new (MonoDomain *domain, const char *text);
-MonoString*
+MONO_API MonoString*
mono_string_new_wrapper (const char *text);
-MonoString*
+MONO_API MonoString*
mono_string_new_len (MonoDomain *domain, const char *text, unsigned int length);
-char *
+MONO_API char *
mono_string_to_utf8 (MonoString *string_obj);
-char *
+MONO_API char *
mono_string_to_utf8_checked (MonoString *string_obj, MonoError *error);
-mono_unichar2 *
+MONO_API mono_unichar2 *
mono_string_to_utf16 (MonoString *string_obj);
-MonoString *
+MONO_API MonoString *
mono_string_from_utf16 (mono_unichar2 *data);
-mono_bool
+MONO_API mono_bool
mono_string_equal (MonoString *s1, MonoString *s2);
-unsigned int
+MONO_API unsigned int
mono_string_hash (MonoString *s);
-int
+MONO_API int
mono_object_hash (MonoObject* obj);
-MonoString *
+MONO_API MonoString *
mono_object_to_string (MonoObject *obj, MonoObject **exc);
-MonoObject *
+MONO_API MonoObject *
mono_value_box (MonoDomain *domain, MonoClass *klass, void* val);
-void
+MONO_API void
mono_value_copy (void* dest, void* src, MonoClass *klass);
-void
+MONO_API void
mono_value_copy_array (MonoArray *dest, int dest_idx, void* src, int count);
-MonoDomain*
+MONO_API MonoDomain*
mono_object_get_domain (MonoObject *obj);
-MonoClass*
+MONO_API MonoClass*
mono_object_get_class (MonoObject *obj);
-void*
+MONO_API void*
mono_object_unbox (MonoObject *obj);
-MonoObject *
+MONO_API MonoObject *
mono_object_clone (MonoObject *obj);
-MonoObject *
+MONO_API MonoObject *
mono_object_isinst (MonoObject *obj, MonoClass *klass);
-MonoObject *
+MONO_API MonoObject *
mono_object_isinst_mbyref (MonoObject *obj, MonoClass *klass);
-MonoObject *
+MONO_API MonoObject *
mono_object_castclass_mbyref (MonoObject *obj, MonoClass *klass);
-mono_bool
+MONO_API mono_bool
mono_monitor_try_enter (MonoObject *obj, uint32_t ms);
-mono_bool
+MONO_API mono_bool
mono_monitor_enter (MonoObject *obj);
-unsigned int
+MONO_API unsigned int
mono_object_get_size (MonoObject *o);
-void
+MONO_API void
mono_monitor_exit (MonoObject *obj);
-void
+MONO_API void
mono_raise_exception (MonoException *ex);
-void
+MONO_API void
mono_runtime_object_init (MonoObject *this_obj);
-void
+MONO_API void
mono_runtime_class_init (MonoVTable *vtable);
-MonoMethod*
+MONO_API MonoMethod*
mono_object_get_virtual_method (MonoObject *obj, MonoMethod *method);
-MonoObject*
+MONO_API MonoObject*
mono_runtime_invoke (MonoMethod *method, void *obj, void **params,
MonoObject **exc);
-MonoMethod *
+MONO_API MonoMethod *
mono_get_delegate_invoke (MonoClass *klass);
-MonoMethod *
+MONO_API MonoMethod *
mono_get_delegate_begin_invoke (MonoClass *klass);
-MonoMethod *
+MONO_API MonoMethod *
mono_get_delegate_end_invoke (MonoClass *klass);
-MonoObject*
+MONO_API MonoObject*
mono_runtime_delegate_invoke (MonoObject *delegate, void **params,
MonoObject **exc);
-MonoObject*
+MONO_API MonoObject*
mono_runtime_invoke_array (MonoMethod *method, void *obj, MonoArray *params,
MonoObject **exc);
-void*
+MONO_API void*
mono_method_get_unmanaged_thunk (MonoMethod *method);
-MonoArray*
+MONO_API MonoArray*
mono_runtime_get_main_args (void);
-void
+MONO_API void
mono_runtime_exec_managed_code (MonoDomain *domain,
MonoMainThreadFunc main_func,
void* main_args);
-int
+MONO_API int
mono_runtime_run_main (MonoMethod *method, int argc, char* argv[],
MonoObject **exc);
-int
+MONO_API int
mono_runtime_exec_main (MonoMethod *method, MonoArray *args,
MonoObject **exc);
/* The following functions won't be available with mono was configured with remoting disabled. */
/*#ifndef DISABLE_REMOTING */
-void*
+MONO_API void*
mono_load_remote_field (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, void **res);
-MonoObject *
+MONO_API MonoObject *
mono_load_remote_field_new (MonoObject *this_obj, MonoClass *klass, MonoClassField *field);
-void
+MONO_API void
mono_store_remote_field (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, void* val);
-void
+MONO_API void
mono_store_remote_field_new (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, MonoObject *arg);
/* #endif */
-void
+MONO_API void
mono_unhandled_exception (MonoObject *exc);
-void
+MONO_API void
mono_print_unhandled_exception (MonoObject *exc);
-void*
+MONO_API void*
mono_compile_method (MonoMethod *method);
/* accessors for fields and properties */
-void
+MONO_API void
mono_field_set_value (MonoObject *obj, MonoClassField *field, void *value);
-void
+MONO_API void
mono_field_static_set_value (MonoVTable *vt, MonoClassField *field, void *value);
-void
+MONO_API void
mono_field_get_value (MonoObject *obj, MonoClassField *field, void *value);
-void
+MONO_API void
mono_field_static_get_value (MonoVTable *vt, MonoClassField *field, void *value);
-MonoObject *
+MONO_API MonoObject *
mono_field_get_value_object (MonoDomain *domain, MonoClassField *field, MonoObject *obj);
-void
+MONO_API void
mono_property_set_value (MonoProperty *prop, void *obj, void **params, MonoObject **exc);
-MonoObject*
+MONO_API MonoObject*
mono_property_get_value (MonoProperty *prop, void *obj, void **params, MonoObject **exc);
/* GC handles support
@@ -306,19 +306,38 @@ mono_property_get_value (MonoProperty *prop, void *obj, void **params, MonoObjec
* mono_gchandle_get_target () can be used to get the object referenced by both kinds
* of handle: for a weakref handle, if an object has been collected, it will return NULL.
*/
-uint32_t mono_gchandle_new (MonoObject *obj, mono_bool pinned);
-uint32_t mono_gchandle_new_weakref (MonoObject *obj, mono_bool track_resurrection);
-MonoObject* mono_gchandle_get_target (uint32_t gchandle);
-void mono_gchandle_free (uint32_t gchandle);
+MONO_API uint32_t mono_gchandle_new (MonoObject *obj, mono_bool pinned);
+MONO_API uint32_t mono_gchandle_new_weakref (MonoObject *obj, mono_bool track_resurrection);
+MONO_API MonoObject* mono_gchandle_get_target (uint32_t gchandle);
+MONO_API void mono_gchandle_free (uint32_t gchandle);
+
+/* Reference queue support
+ *
+ * A reference queue is used to get notifications of when objects are collected.
+ * Call mono_gc_reference_queue_new to create a new queue and pass the callback that
+ * will be invoked when registered objects are collected.
+ * Call mono_gc_reference_queue_add to register a pair of objects and data within a queue.
+ * The callback will be triggered once an object is both unreachable and finalized.
+ */
+
+typedef void (*mono_reference_queue_callback) (void *user_data);
+typedef struct _MonoReferenceQueue MonoReferenceQueue;
+
+MONO_API MonoReferenceQueue* mono_gc_reference_queue_new (mono_reference_queue_callback callback);
+MONO_API void mono_gc_reference_queue_free (MonoReferenceQueue *queue);
+MONO_API mono_bool mono_gc_reference_queue_add (MonoReferenceQueue *queue, MonoObject *obj, void *user_data);
+
+
/* GC write barriers support */
-void mono_gc_wbarrier_set_field (MonoObject *obj, void* field_ptr, MonoObject* value);
-void mono_gc_wbarrier_set_arrayref (MonoArray *arr, void* slot_ptr, MonoObject* value);
-void mono_gc_wbarrier_arrayref_copy (void* dest_ptr, void* src_ptr, int count);
-void mono_gc_wbarrier_generic_store (void* ptr, MonoObject* value);
-void mono_gc_wbarrier_generic_nostore (void* ptr);
-void mono_gc_wbarrier_value_copy (void* dest, void* src, int count, MonoClass *klass);
-void mono_gc_wbarrier_object_copy (MonoObject* obj, MonoObject *src);
+MONO_API void mono_gc_wbarrier_set_field (MonoObject *obj, void* field_ptr, MonoObject* value);
+MONO_API void mono_gc_wbarrier_set_arrayref (MonoArray *arr, void* slot_ptr, MonoObject* value);
+MONO_API void mono_gc_wbarrier_arrayref_copy (void* dest_ptr, void* src_ptr, int count);
+MONO_API void mono_gc_wbarrier_generic_store (void* ptr, MonoObject* value);
+MONO_API void mono_gc_wbarrier_generic_store_atomic (void *ptr, MonoObject *value);
+MONO_API void mono_gc_wbarrier_generic_nostore (void* ptr);
+MONO_API void mono_gc_wbarrier_value_copy (void* dest, void* src, int count, MonoClass *klass);
+MONO_API void mono_gc_wbarrier_object_copy (MonoObject* obj, MonoObject *src);
MONO_END_DECLS
diff --git a/mono/metadata/opcodes.h b/mono/metadata/opcodes.h
index 1c553f15b1d..71b4cb49586 100644
--- a/mono/metadata/opcodes.h
+++ b/mono/metadata/opcodes.h
@@ -64,10 +64,10 @@ typedef struct {
extern const MonoOpcode mono_opcodes [];
-const char*
+MONO_API const char*
mono_opcode_name (int opcode);
-MonoOpcodeEnum
+MONO_API MonoOpcodeEnum
mono_opcode_value (const mono_byte **ip, const mono_byte *end);
MONO_END_DECLS
diff --git a/mono/metadata/process.c b/mono/metadata/process.c
index 0820433da78..0820433da78 100644..100755
--- a/mono/metadata/process.c
+++ b/mono/metadata/process.c
diff --git a/mono/metadata/profiler.h b/mono/metadata/profiler.h
index 09299a7cfd7..c7b8f6d8a88 100644
--- a/mono/metadata/profiler.h
+++ b/mono/metadata/profiler.h
@@ -151,47 +151,47 @@ typedef void (*MonoProfilerCodeBufferNew) (MonoProfiler *prof, void* buffer, int
/*
* Function the profiler may call.
*/
-void mono_profiler_install (MonoProfiler *prof, MonoProfileFunc shutdown_callback);
-void mono_profiler_set_events (MonoProfileFlags events);
+MONO_API void mono_profiler_install (MonoProfiler *prof, MonoProfileFunc shutdown_callback);
+MONO_API void mono_profiler_set_events (MonoProfileFlags events);
-MonoProfileFlags mono_profiler_get_events (void);
+MONO_API MonoProfileFlags mono_profiler_get_events (void);
-void mono_profiler_install_appdomain (MonoProfileAppDomainFunc start_load, MonoProfileAppDomainResult end_load,
+MONO_API void mono_profiler_install_appdomain (MonoProfileAppDomainFunc start_load, MonoProfileAppDomainResult end_load,
MonoProfileAppDomainFunc start_unload, MonoProfileAppDomainFunc end_unload);
-void mono_profiler_install_assembly (MonoProfileAssemblyFunc start_load, MonoProfileAssemblyResult end_load,
+MONO_API void mono_profiler_install_assembly (MonoProfileAssemblyFunc start_load, MonoProfileAssemblyResult end_load,
MonoProfileAssemblyFunc start_unload, MonoProfileAssemblyFunc end_unload);
-void mono_profiler_install_module (MonoProfileModuleFunc start_load, MonoProfileModuleResult end_load,
+MONO_API void mono_profiler_install_module (MonoProfileModuleFunc start_load, MonoProfileModuleResult end_load,
MonoProfileModuleFunc start_unload, MonoProfileModuleFunc end_unload);
-void mono_profiler_install_class (MonoProfileClassFunc start_load, MonoProfileClassResult end_load,
+MONO_API void mono_profiler_install_class (MonoProfileClassFunc start_load, MonoProfileClassResult end_load,
MonoProfileClassFunc start_unload, MonoProfileClassFunc end_unload);
-void mono_profiler_install_jit_compile (MonoProfileMethodFunc start, MonoProfileMethodResult end);
-void mono_profiler_install_jit_end (MonoProfileJitResult end);
-void mono_profiler_install_method_free (MonoProfileMethodFunc callback);
-void mono_profiler_install_method_invoke (MonoProfileMethodFunc start, MonoProfileMethodFunc end);
-void mono_profiler_install_enter_leave (MonoProfileMethodFunc enter, MonoProfileMethodFunc fleave);
-void mono_profiler_install_thread (MonoProfileThreadFunc start, MonoProfileThreadFunc end);
-void mono_profiler_install_thread_name (MonoProfileThreadNameFunc thread_name_cb);
-void mono_profiler_install_transition (MonoProfileMethodResult callback);
-void mono_profiler_install_allocation (MonoProfileAllocFunc callback);
-void mono_profiler_install_monitor (MonoProfileMonitorFunc callback);
-void mono_profiler_install_statistical (MonoProfileStatFunc callback);
-void mono_profiler_install_statistical_call_chain (MonoProfileStatCallChainFunc callback, int call_chain_depth, MonoProfilerCallChainStrategy call_chain_strategy);
-void mono_profiler_install_exception (MonoProfileExceptionFunc throw_callback, MonoProfileMethodFunc exc_method_leave, MonoProfileExceptionClauseFunc clause_callback);
-void mono_profiler_install_coverage_filter (MonoProfileCoverageFilterFunc callback);
-void mono_profiler_coverage_get (MonoProfiler *prof, MonoMethod *method, MonoProfileCoverageFunc func);
-void mono_profiler_install_gc (MonoProfileGCFunc callback, MonoProfileGCResizeFunc heap_resize_callback);
-void mono_profiler_install_gc_moves (MonoProfileGCMoveFunc callback);
-void mono_profiler_install_gc_roots (MonoProfileGCHandleFunc handle_callback, MonoProfileGCRootFunc roots_callback);
-void mono_profiler_install_runtime_initialized (MonoProfileFunc runtime_initialized_callback);
-
-void mono_profiler_install_code_chunk_new (MonoProfilerCodeChunkNew callback);
-void mono_profiler_install_code_chunk_destroy (MonoProfilerCodeChunkDestroy callback);
-void mono_profiler_install_code_buffer_new (MonoProfilerCodeBufferNew callback);
-
-void mono_profiler_install_iomap (MonoProfileIomapFunc callback);
-
-void mono_profiler_load (const char *desc);
+MONO_API void mono_profiler_install_jit_compile (MonoProfileMethodFunc start, MonoProfileMethodResult end);
+MONO_API void mono_profiler_install_jit_end (MonoProfileJitResult end);
+MONO_API void mono_profiler_install_method_free (MonoProfileMethodFunc callback);
+MONO_API void mono_profiler_install_method_invoke (MonoProfileMethodFunc start, MonoProfileMethodFunc end);
+MONO_API void mono_profiler_install_enter_leave (MonoProfileMethodFunc enter, MonoProfileMethodFunc fleave);
+MONO_API void mono_profiler_install_thread (MonoProfileThreadFunc start, MonoProfileThreadFunc end);
+MONO_API void mono_profiler_install_thread_name (MonoProfileThreadNameFunc thread_name_cb);
+MONO_API void mono_profiler_install_transition (MonoProfileMethodResult callback);
+MONO_API void mono_profiler_install_allocation (MonoProfileAllocFunc callback);
+MONO_API void mono_profiler_install_monitor (MonoProfileMonitorFunc callback);
+MONO_API void mono_profiler_install_statistical (MonoProfileStatFunc callback);
+MONO_API void mono_profiler_install_statistical_call_chain (MonoProfileStatCallChainFunc callback, int call_chain_depth, MonoProfilerCallChainStrategy call_chain_strategy);
+MONO_API void mono_profiler_install_exception (MonoProfileExceptionFunc throw_callback, MonoProfileMethodFunc exc_method_leave, MonoProfileExceptionClauseFunc clause_callback);
+MONO_API void mono_profiler_install_coverage_filter (MonoProfileCoverageFilterFunc callback);
+MONO_API void mono_profiler_coverage_get (MonoProfiler *prof, MonoMethod *method, MonoProfileCoverageFunc func);
+MONO_API void mono_profiler_install_gc (MonoProfileGCFunc callback, MonoProfileGCResizeFunc heap_resize_callback);
+MONO_API void mono_profiler_install_gc_moves (MonoProfileGCMoveFunc callback);
+MONO_API void mono_profiler_install_gc_roots (MonoProfileGCHandleFunc handle_callback, MonoProfileGCRootFunc roots_callback);
+MONO_API void mono_profiler_install_runtime_initialized (MonoProfileFunc runtime_initialized_callback);
+
+MONO_API void mono_profiler_install_code_chunk_new (MonoProfilerCodeChunkNew callback);
+MONO_API void mono_profiler_install_code_chunk_destroy (MonoProfilerCodeChunkDestroy callback);
+MONO_API void mono_profiler_install_code_buffer_new (MonoProfilerCodeBufferNew callback);
+
+MONO_API void mono_profiler_install_iomap (MonoProfileIomapFunc callback);
+
+MONO_API void mono_profiler_load (const char *desc);
MONO_END_DECLS
diff --git a/mono/metadata/reflection.c b/mono/metadata/reflection.c
index c2ff521e3b0..4605e587f78 100644
--- a/mono/metadata/reflection.c
+++ b/mono/metadata/reflection.c
@@ -202,6 +202,19 @@ static void init_type_builder_generics (MonoObject *type);
#define mono_type_array_get_and_resolve(array, index) mono_reflection_type_get_handle ((MonoReflectionType*)mono_array_get (array, gpointer, index))
+#define CHECK_ADD4_OVERFLOW_UN(a, b) ((guint32)(0xFFFFFFFFU) - (guint32)(b) < (guint32)(a))
+#define CHECK_ADD8_OVERFLOW_UN(a, b) ((guint64)(0xFFFFFFFFFFFFFFFFUL) - (guint64)(b) < (guint64)(a))
+
+#if SIZEOF_VOID_P == 4
+#define CHECK_ADDP_OVERFLOW_UN(a,b) CHECK_ADD4_OVERFLOW_UN(a, b)
+#else
+#define CHECK_ADDP_OVERFLOW_UN(a,b) CHECK_ADD8_OVERFLOW_UN(a, b)
+#endif
+
+#define ADDP_IS_GREATER_OR_OVF(a, b, c) (((a) + (b) > (c)) || CHECK_ADDP_OVERFLOW_UN (a, b))
+#define ADD_IS_GREATER_OR_OVF(a, b, c) (((a) + (b) > (c)) || CHECK_ADD4_OVERFLOW_UN (a, b))
+
+
void
mono_reflection_init (void)
{
@@ -4791,7 +4804,7 @@ mono_image_create_method_token (MonoDynamicImage *assembly, MonoObject *obj, Mon
MonoMethodSignature *sig;
klass = obj->vtable->klass;
- if (strcmp (klass->name, "MonoMethod") == 0) {
+ if (strcmp (klass->name, "MonoMethod") == 0 || strcmp (klass->name, "MonoCMethod") == 0) {
MonoMethod *method = ((MonoReflectionMethod *)obj)->method;
MonoMethodSignature *old;
guint32 sig_token, parent;
@@ -6769,9 +6782,13 @@ mono_param_get_objects_internal (MonoDomain *domain, MonoMethod *method, MonoCla
if (!System_Reflection_ParameterInfo_array) {
MonoClass *klass;
- klass = mono_class_from_name (mono_defaults.corlib, "System.Reflection", "ParameterInfo");
+ klass = mono_class_from_name (mono_defaults.corlib, "System.Reflection", "MonoParameterInfo");
+ if (!klass)
+ klass = mono_class_from_name (mono_defaults.corlib, "System.Reflection", "ParameterInfo");
+
mono_memory_barrier ();
System_Reflection_ParameterInfo = klass;
+
klass = mono_array_class_get (klass, 1);
mono_memory_barrier ();
@@ -7752,7 +7769,7 @@ mono_reflection_get_token (MonoObject *obj)
MonoReflectionMonoEvent *p = (MonoReflectionMonoEvent*)obj;
token = mono_class_get_event_token (p->event);
- } else if (strcmp (klass->name, "ParameterInfo") == 0) {
+ } else if (strcmp (klass->name, "ParameterInfo") == 0 || strcmp (klass->name, "MonoParameterInfo") == 0) {
MonoReflectionParameter *p = (MonoReflectionParameter*)obj;
MonoClass *member_class = mono_object_class (p->MemberImpl);
g_assert (mono_class_is_reflection_method_or_constructor (member_class));
@@ -7774,6 +7791,23 @@ mono_reflection_get_token (MonoObject *obj)
return token;
}
+static MonoClass*
+load_cattr_enum_type (MonoImage *image, const char *p, const char **end)
+{
+ char *n;
+ MonoType *t;
+ int slen = mono_metadata_decode_value (p, &p);
+ n = g_memdup (p, slen + 1);
+ n [slen] = 0;
+ t = mono_reflection_type_from_name (n, image);
+ if (!t)
+ g_error ("Cannot load type '%s'", n);
+ g_free (n);
+ p += slen;
+ *end = p;
+ return mono_class_from_mono_type (t);
+}
+
static void*
load_cattr_value (MonoImage *image, MonoType *t, const char *p, const char **end)
{
@@ -7892,6 +7926,8 @@ handle_type:
type = MONO_TYPE_SZARRAY;
if (etype == 0x50) {
tklass = mono_defaults.systemtype_class;
+ } else if (etype == 0x55) {
+ tklass = load_cattr_enum_type (image, p, &p);
} else {
if (etype == 0x51)
/* See Partition II, Appendix B3 */
@@ -8233,7 +8269,7 @@ create_custom_attr (MonoImage *image, MonoMethod *method, const guchar *data, gu
* NAMED_ARG_INFO will contain information about the named arguments.
*/
void
-mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *method, const guchar *data, guint32 len, MonoArray **typed_args, MonoArray **named_args, CattrNamedArg **named_arg_info)
+mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *method, const guchar *data, guint32 len, MonoArray **typed_args, MonoArray **named_args, CattrNamedArg **named_arg_info, MonoError *error)
{
MonoArray *typedargs, *namedargs;
MonoClass *attrklass;
@@ -8243,14 +8279,18 @@ mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *meth
guint32 i, j, num_named;
CattrNamedArg *arginfo = NULL;
- if (!mono_verifier_verify_cattr_content (image, method, data, len, NULL))
- return;
-
- mono_class_init (method->klass);
-
*typed_args = NULL;
*named_args = NULL;
*named_arg_info = NULL;
+
+ mono_error_init (error);
+
+ if (!mono_verifier_verify_cattr_content (image, method, data, len, NULL)) {
+ mono_error_set_generic_error (error, "System.Reflection", "CustomAttributeFormatException", "Binary format of the specified custom attribute was invalid.");
+ return;
+ }
+
+ mono_class_init (method->klass);
domain = mono_domain_get ();
@@ -8294,6 +8334,9 @@ mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *meth
gint type_len;
char *type_name;
type_len = mono_metadata_decode_blob_size (named, &named);
+ if (ADDP_IS_GREATER_OR_OVF ((const guchar*)named, type_len, data + len))
+ goto fail;
+
type_name = g_malloc (type_len + 1);
memcpy (type_name, named, type_len);
type_name [type_len] = 0;
@@ -8302,6 +8345,8 @@ mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *meth
g_free (type_name);
}
name_len = mono_metadata_decode_blob_size (named, &named);
+ if (ADDP_IS_GREATER_OR_OVF ((const guchar*)named, name_len, data + len))
+ goto fail;
name = g_malloc (name_len + 1);
memcpy (name, named, name_len);
name [name_len] = 0;
@@ -8342,6 +8387,11 @@ mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *meth
*typed_args = typedargs;
*named_args = namedargs;
+ return;
+fail:
+ mono_error_set_generic_error (error, "System.Reflection", "CustomAttributeFormatException", "Binary format of the specified custom attribute was invalid.");
+ g_free (arginfo);
+ *named_arg_info = NULL;
}
void
@@ -8351,7 +8401,8 @@ mono_reflection_resolve_custom_attribute_data (MonoReflectionMethod *ref_method,
MonoArray *typedargs, *namedargs;
MonoImage *image;
MonoMethod *method;
- CattrNamedArg *arginfo;
+ CattrNamedArg *arginfo = NULL;
+ MonoError error;
int i;
*ctor_args = NULL;
@@ -8367,12 +8418,16 @@ mono_reflection_resolve_custom_attribute_data (MonoReflectionMethod *ref_method,
if (!mono_class_init (method->klass))
mono_raise_exception (mono_class_get_exception_for_failure (method->klass));
- mono_reflection_create_custom_attr_data_args (image, method, data, len, &typedargs, &namedargs, &arginfo);
+ mono_reflection_create_custom_attr_data_args (image, method, data, len, &typedargs, &namedargs, &arginfo, &error);
+ if (!mono_error_ok (&error))
+ mono_error_raise_exception (&error);
if (mono_loader_get_last_error ())
mono_raise_exception (mono_loader_error_prepare_exception (mono_loader_get_last_error ()));
- if (!typedargs || !namedargs)
+ if (!typedargs || !namedargs) {
+ g_free (arginfo);
return;
+ }
for (i = 0; i < mono_method_signature (method)->param_count; ++i) {
MonoObject *obj = mono_array_get (typedargs, MonoObject*, i);
@@ -8399,6 +8454,7 @@ mono_reflection_resolve_custom_attribute_data (MonoReflectionMethod *ref_method,
*ctor_args = typedargs;
*named_args = namedargs;
+ g_free (arginfo);
}
static MonoObject*
@@ -8671,6 +8727,15 @@ mono_custom_attrs_from_field (MonoClass *klass, MonoClassField *field)
return mono_custom_attrs_from_index (klass->image, idx);
}
+/**
+ * mono_custom_attrs_from_param:
+ * @method: handle to the method that we want to retrieve custom parameter information from
+ * @param: parameter number, where zero represent the return value, and one is the first parameter in the method
+ *
+ * The result must be released with mono_custom_attrs_free().
+ *
+ * Returns: the custom attribute object for the specified parameter, or NULL if there are none.
+ */
MonoCustomAttrInfo*
mono_custom_attrs_from_param (MonoMethod *method, guint32 param)
{
@@ -8817,7 +8882,7 @@ mono_reflection_get_custom_attrs_info (MonoObject *obj)
} else if ((strcmp ("MonoGenericMethod", klass->name) == 0) || (strcmp ("MonoGenericCMethod", klass->name) == 0)) {
MonoReflectionMethod *rmethod = (MonoReflectionMethod*)obj;
cinfo = mono_custom_attrs_from_method (rmethod->method);
- } else if (strcmp ("ParameterInfo", klass->name) == 0) {
+ } else if (strcmp ("ParameterInfo", klass->name) == 0 || strcmp ("MonoParameterInfo", klass->name) == 0) {
MonoReflectionParameter *param = (MonoReflectionParameter*)obj;
MonoClass *member_class = mono_object_class (param->MemberImpl);
if (mono_class_is_reflection_method_or_constructor (member_class)) {
diff --git a/mono/metadata/reflection.h b/mono/metadata/reflection.h
index 494a9a76216..0301342806f 100644
--- a/mono/metadata/reflection.h
+++ b/mono/metadata/reflection.h
@@ -41,44 +41,44 @@ typedef enum {
ResolveTokenError_Other
} MonoResolveTokenError;
-int mono_reflection_parse_type (char *name, MonoTypeNameParse *info);
-MonoType* mono_reflection_get_type (MonoImage* image, MonoTypeNameParse *info, mono_bool ignorecase, mono_bool *type_resolve);
-void mono_reflection_free_type_info (MonoTypeNameParse *info);
-MonoType* mono_reflection_type_from_name (char *name, MonoImage *image);
-uint32_t mono_reflection_get_token (MonoObject *obj);
-
-MonoReflectionAssembly* mono_assembly_get_object (MonoDomain *domain, MonoAssembly *assembly);
-MonoReflectionModule* mono_module_get_object (MonoDomain *domain, MonoImage *image);
-MonoReflectionModule* mono_module_file_get_object (MonoDomain *domain, MonoImage *image, int table_index);
-MonoReflectionType* mono_type_get_object (MonoDomain *domain, MonoType *type);
-MonoReflectionMethod* mono_method_get_object (MonoDomain *domain, MonoMethod *method, MonoClass *refclass);
-MonoReflectionField* mono_field_get_object (MonoDomain *domain, MonoClass *klass, MonoClassField *field);
-MonoReflectionProperty* mono_property_get_object (MonoDomain *domain, MonoClass *klass, MonoProperty *property);
-MonoReflectionEvent* mono_event_get_object (MonoDomain *domain, MonoClass *klass, MonoEvent *event);
+MONO_API int mono_reflection_parse_type (char *name, MonoTypeNameParse *info);
+MONO_API MonoType* mono_reflection_get_type (MonoImage* image, MonoTypeNameParse *info, mono_bool ignorecase, mono_bool *type_resolve);
+MONO_API void mono_reflection_free_type_info (MonoTypeNameParse *info);
+MONO_API MonoType* mono_reflection_type_from_name (char *name, MonoImage *image);
+MONO_API uint32_t mono_reflection_get_token (MonoObject *obj);
+
+MONO_API MonoReflectionAssembly* mono_assembly_get_object (MonoDomain *domain, MonoAssembly *assembly);
+MONO_API MonoReflectionModule* mono_module_get_object (MonoDomain *domain, MonoImage *image);
+MONO_API MonoReflectionModule* mono_module_file_get_object (MonoDomain *domain, MonoImage *image, int table_index);
+MONO_API MonoReflectionType* mono_type_get_object (MonoDomain *domain, MonoType *type);
+MONO_API MonoReflectionMethod* mono_method_get_object (MonoDomain *domain, MonoMethod *method, MonoClass *refclass);
+MONO_API MonoReflectionField* mono_field_get_object (MonoDomain *domain, MonoClass *klass, MonoClassField *field);
+MONO_API MonoReflectionProperty* mono_property_get_object (MonoDomain *domain, MonoClass *klass, MonoProperty *property);
+MONO_API MonoReflectionEvent* mono_event_get_object (MonoDomain *domain, MonoClass *klass, MonoEvent *event);
/* note: this one is slightly different: we keep the whole array of params in the cache */
-MonoArray* mono_param_get_objects (MonoDomain *domain, MonoMethod *method);
-MonoReflectionMethodBody* mono_method_body_get_object (MonoDomain *domain, MonoMethod *method);
-
-MonoObject *mono_get_dbnull_object (MonoDomain *domain);
-
-MonoArray* mono_reflection_get_custom_attrs_by_type (MonoObject *obj, MonoClass *attr_klass, MonoError *error);
-MonoArray* mono_reflection_get_custom_attrs (MonoObject *obj);
-MonoArray* mono_reflection_get_custom_attrs_data (MonoObject *obj);
-MonoArray* mono_reflection_get_custom_attrs_blob (MonoReflectionAssembly *assembly, MonoObject *ctor, MonoArray *ctorArgs, MonoArray *properties, MonoArray *porpValues, MonoArray *fields, MonoArray* fieldValues);
-
-MonoCustomAttrInfo* mono_reflection_get_custom_attrs_info (MonoObject *obj);
-MonoArray* mono_custom_attrs_construct (MonoCustomAttrInfo *cinfo);
-MonoCustomAttrInfo* mono_custom_attrs_from_index (MonoImage *image, uint32_t idx);
-MonoCustomAttrInfo* mono_custom_attrs_from_method (MonoMethod *method);
-MonoCustomAttrInfo* mono_custom_attrs_from_class (MonoClass *klass);
-MonoCustomAttrInfo* mono_custom_attrs_from_assembly (MonoAssembly *assembly);
-MonoCustomAttrInfo* mono_custom_attrs_from_property (MonoClass *klass, MonoProperty *property);
-MonoCustomAttrInfo* mono_custom_attrs_from_event (MonoClass *klass, MonoEvent *event);
-MonoCustomAttrInfo* mono_custom_attrs_from_field (MonoClass *klass, MonoClassField *field);
-MonoCustomAttrInfo* mono_custom_attrs_from_param (MonoMethod *method, uint32_t param);
-mono_bool mono_custom_attrs_has_attr (MonoCustomAttrInfo *ainfo, MonoClass *attr_klass);
-MonoObject* mono_custom_attrs_get_attr (MonoCustomAttrInfo *ainfo, MonoClass *attr_klass);
-void mono_custom_attrs_free (MonoCustomAttrInfo *ainfo);
+MONO_API MonoArray* mono_param_get_objects (MonoDomain *domain, MonoMethod *method);
+MONO_API MonoReflectionMethodBody* mono_method_body_get_object (MonoDomain *domain, MonoMethod *method);
+
+MONO_API MonoObject *mono_get_dbnull_object (MonoDomain *domain);
+
+MONO_API MonoArray* mono_reflection_get_custom_attrs_by_type (MonoObject *obj, MonoClass *attr_klass, MonoError *error);
+MONO_API MonoArray* mono_reflection_get_custom_attrs (MonoObject *obj);
+MONO_API MonoArray* mono_reflection_get_custom_attrs_data (MonoObject *obj);
+MONO_API MonoArray* mono_reflection_get_custom_attrs_blob (MonoReflectionAssembly *assembly, MonoObject *ctor, MonoArray *ctorArgs, MonoArray *properties, MonoArray *porpValues, MonoArray *fields, MonoArray* fieldValues);
+
+MONO_API MonoCustomAttrInfo* mono_reflection_get_custom_attrs_info (MonoObject *obj);
+MONO_API MonoArray* mono_custom_attrs_construct (MonoCustomAttrInfo *cinfo);
+MONO_API MonoCustomAttrInfo* mono_custom_attrs_from_index (MonoImage *image, uint32_t idx);
+MONO_API MonoCustomAttrInfo* mono_custom_attrs_from_method (MonoMethod *method);
+MONO_API MonoCustomAttrInfo* mono_custom_attrs_from_class (MonoClass *klass);
+MONO_API MonoCustomAttrInfo* mono_custom_attrs_from_assembly (MonoAssembly *assembly);
+MONO_API MonoCustomAttrInfo* mono_custom_attrs_from_property (MonoClass *klass, MonoProperty *property);
+MONO_API MonoCustomAttrInfo* mono_custom_attrs_from_event (MonoClass *klass, MonoEvent *event);
+MONO_API MonoCustomAttrInfo* mono_custom_attrs_from_field (MonoClass *klass, MonoClassField *field);
+MONO_API MonoCustomAttrInfo* mono_custom_attrs_from_param (MonoMethod *method, uint32_t param);
+MONO_API mono_bool mono_custom_attrs_has_attr (MonoCustomAttrInfo *ainfo, MonoClass *attr_klass);
+MONO_API MonoObject* mono_custom_attrs_get_attr (MonoCustomAttrInfo *ainfo, MonoClass *attr_klass);
+MONO_API void mono_custom_attrs_free (MonoCustomAttrInfo *ainfo);
#define MONO_DECLSEC_ACTION_MIN 0x1
@@ -105,9 +105,9 @@ enum {
MONO_DECLSEC_FLAG_DEMAND_CHOICE = 0x00020000
};
-uint32_t mono_declsec_flags_from_method (MonoMethod *method);
-uint32_t mono_declsec_flags_from_class (MonoClass *klass);
-uint32_t mono_declsec_flags_from_assembly (MonoAssembly *assembly);
+MONO_API uint32_t mono_declsec_flags_from_method (MonoMethod *method);
+MONO_API uint32_t mono_declsec_flags_from_class (MonoClass *klass);
+MONO_API uint32_t mono_declsec_flags_from_assembly (MonoAssembly *assembly);
/* this structure MUST be kept in synch with RuntimeDeclSecurityEntry
* located in /mcs/class/corlib/System.Security/SecurityFrame.cs */
@@ -123,16 +123,16 @@ typedef struct {
MonoDeclSecurityEntry demandchoice;
} MonoDeclSecurityActions;
-MonoBoolean mono_declsec_get_demands (MonoMethod *callee, MonoDeclSecurityActions* demands);
-MonoBoolean mono_declsec_get_linkdemands (MonoMethod *callee, MonoDeclSecurityActions* klass, MonoDeclSecurityActions* cmethod);
-MonoBoolean mono_declsec_get_inheritdemands_class (MonoClass *klass, MonoDeclSecurityActions* demands);
-MonoBoolean mono_declsec_get_inheritdemands_method (MonoMethod *callee, MonoDeclSecurityActions* demands);
+MONO_API MonoBoolean mono_declsec_get_demands (MonoMethod *callee, MonoDeclSecurityActions* demands);
+MONO_API MonoBoolean mono_declsec_get_linkdemands (MonoMethod *callee, MonoDeclSecurityActions* klass, MonoDeclSecurityActions* cmethod);
+MONO_API MonoBoolean mono_declsec_get_inheritdemands_class (MonoClass *klass, MonoDeclSecurityActions* demands);
+MONO_API MonoBoolean mono_declsec_get_inheritdemands_method (MonoMethod *callee, MonoDeclSecurityActions* demands);
-MonoBoolean mono_declsec_get_method_action (MonoMethod *method, uint32_t action, MonoDeclSecurityEntry *entry);
-MonoBoolean mono_declsec_get_class_action (MonoClass *klass, uint32_t action, MonoDeclSecurityEntry *entry);
-MonoBoolean mono_declsec_get_assembly_action (MonoAssembly *assembly, uint32_t action, MonoDeclSecurityEntry *entry);
+MONO_API MonoBoolean mono_declsec_get_method_action (MonoMethod *method, uint32_t action, MonoDeclSecurityEntry *entry);
+MONO_API MonoBoolean mono_declsec_get_class_action (MonoClass *klass, uint32_t action, MonoDeclSecurityEntry *entry);
+MONO_API MonoBoolean mono_declsec_get_assembly_action (MonoAssembly *assembly, uint32_t action, MonoDeclSecurityEntry *entry);
-MonoType* mono_reflection_type_get_type (MonoReflectionType *reftype);
+MONO_API MonoType* mono_reflection_type_get_type (MonoReflectionType *reftype);
MONO_END_DECLS
diff --git a/mono/metadata/security-core-clr.h b/mono/metadata/security-core-clr.h
index 96407dadf28..126a48da2c7 100644
--- a/mono/metadata/security-core-clr.h
+++ b/mono/metadata/security-core-clr.h
@@ -56,9 +56,9 @@ extern MonoSecurityCoreCLRLevel mono_security_core_clr_method_level (MonoMethod
extern gboolean mono_security_core_clr_is_platform_image (MonoImage *image) MONO_INTERNAL;
extern gboolean mono_security_core_clr_determine_platform_image (MonoImage *image) MONO_INTERNAL;
-extern gboolean mono_security_core_clr_require_elevated_permissions (void);
+extern MONO_API gboolean mono_security_core_clr_require_elevated_permissions (void);
-extern void mono_security_core_clr_set_options (MonoSecurityCoreCLROptions options);
-extern MonoSecurityCoreCLROptions mono_security_core_clr_get_options (void);
+extern MONO_API void mono_security_core_clr_set_options (MonoSecurityCoreCLROptions options);
+extern MONO_API MonoSecurityCoreCLROptions mono_security_core_clr_get_options (void);
#endif /* _MONO_METADATA_SECURITY_CORE_CLR_H_ */
diff --git a/mono/metadata/sgen-alloc.c b/mono/metadata/sgen-alloc.c
index 61222e2d57e..c208638850d 100644
--- a/mono/metadata/sgen-alloc.c
+++ b/mono/metadata/sgen-alloc.c
@@ -347,6 +347,7 @@ mono_gc_try_alloc_obj_nolock (MonoVTable *vtable, size_t size)
TLAB_ACCESS_INIT;
size = ALIGN_UP (size);
+ SGEN_ASSERT (9, size >= sizeof (MonoObject), "Object too small");
g_assert (vtable->gc_descr);
if (size > SGEN_MAX_SMALL_OBJ_SIZE)
@@ -434,6 +435,24 @@ mono_gc_alloc_obj (MonoVTable *vtable, size_t size)
void *res;
#ifndef DISABLE_CRITICAL_REGION
TLAB_ACCESS_INIT;
+
+ if (G_UNLIKELY (has_per_allocation_action)) {
+ static int alloc_count;
+ int current_alloc = InterlockedIncrement (&alloc_count);
+
+ if (verify_before_allocs) {
+ if ((current_alloc % verify_before_allocs) == 0)
+ sgen_check_whole_heap_stw ();
+ }
+ if (collect_before_allocs) {
+ if (((current_alloc % collect_before_allocs) == 0) && nursery_section) {
+ LOCK_GC;
+ sgen_perform_collection (0, GENERATION_NURSERY, "collect-before-alloc-triggered", TRUE);
+ UNLOCK_GC;
+ }
+ }
+ }
+
ENTER_CRITICAL_REGION;
res = mono_gc_try_alloc_obj_nolock (vtable, size);
if (res) {
@@ -685,6 +704,9 @@ create_allocator (int atype)
MONO_THREAD_VAR_OFFSET (tlab_next_addr, tlab_next_addr_offset);
MONO_THREAD_VAR_OFFSET (tlab_temp_end, tlab_temp_end_offset);
+ mono_tls_key_set_offset (TLS_KEY_SGEN_TLAB_NEXT_ADDR, tlab_next_addr_offset);
+ mono_tls_key_set_offset (TLS_KEY_SGEN_TLAB_TEMP_END, tlab_temp_end_offset);
+
g_assert (tlab_next_addr_offset != -1);
g_assert (tlab_temp_end_offset != -1);
#endif
@@ -832,7 +854,7 @@ create_allocator (int atype)
/* tlab_next_addr (local) = tlab_next_addr (TLS var) */
tlab_next_addr_var = mono_mb_add_local (mb, &mono_defaults.int_class->byval_arg);
- EMIT_TLS_ACCESS (mb, tlab_next_addr, tlab_next_addr_offset);
+ EMIT_TLS_ACCESS (mb, tlab_next_addr, TLS_KEY_SGEN_TLAB_NEXT_ADDR);
mono_mb_emit_stloc (mb, tlab_next_addr_var);
/* p = (void**)tlab_next; */
@@ -851,7 +873,7 @@ create_allocator (int atype)
/* if (G_LIKELY (new_next < tlab_temp_end)) */
mono_mb_emit_ldloc (mb, new_next_var);
- EMIT_TLS_ACCESS (mb, tlab_temp_end, tlab_temp_end_offset);
+ EMIT_TLS_ACCESS (mb, tlab_temp_end, TLS_KEY_SGEN_TLAB_TEMP_END);
slowpath_branch = mono_mb_emit_short_branch (mb, MONO_CEE_BLT_UN_S);
/* Slowpath */
@@ -967,7 +989,8 @@ mono_gc_get_managed_allocator (MonoClass *klass, gboolean for_box)
if (tlab_next_offset == -1 || tlab_temp_end_offset == -1)
return NULL;
#endif
-
+ if (collect_before_allocs)
+ return NULL;
if (!mono_runtime_has_tls_get ())
return NULL;
if (klass->instance_size > tlab_size)
@@ -979,8 +1002,6 @@ mono_gc_get_managed_allocator (MonoClass *klass, gboolean for_box)
return NULL;
if (klass->byval_arg.type == MONO_TYPE_STRING)
return mono_gc_get_managed_allocator_by_type (ATYPE_STRING);
- if (collect_before_allocs)
- return NULL;
/* Generic classes have dynamic field and can go above MAX_SMALL_OBJ_SIZE. */
if (ALIGN_TO (klass->instance_size, ALLOC_ALIGN) < MAX_SMALL_OBJ_SIZE && !mono_class_is_open_constructed_type (&klass->byval_arg))
return mono_gc_get_managed_allocator_by_type (ATYPE_SMALL);
diff --git a/mono/metadata/sgen-archdep.h b/mono/metadata/sgen-archdep.h
index 8a2fa737c95..e400d7cc6c8 100644..100755
--- a/mono/metadata/sgen-archdep.h
+++ b/mono/metadata/sgen-archdep.h
@@ -44,32 +44,7 @@
#ifdef MONO_ARCH_HAS_MONO_CONTEXT
#define USE_MONO_CTX
#else
-#ifdef _MSC_VER
-#define ARCH_STORE_REGS(ptr) __asm { \
- __asm mov [ptr], edi \
- __asm mov [ptr+4], esi \
- __asm mov [ptr+8], ebx \
- __asm mov [ptr+12], edx \
- __asm mov [ptr+16], ecx \
- __asm mov [ptr+20], eax \
- __asm mov [ptr+24], ebp \
- __asm mov [ptr+28], esp \
- }
-#else
-#define ARCH_STORE_REGS(ptr) \
- __asm__ __volatile__( \
- "mov %%edi,0(%0)\n" \
- "mov %%esi,4(%0)\n" \
- "mov %%ebx,8(%0)\n" \
- "mov %%edx,12(%0)\n" \
- "mov %%ecx,16(%0)\n" \
- "mov %%eax,20(%0)\n" \
- "mov %%ebp,24(%0)\n" \
- "mov %%esp,28(%0)\n" \
- : \
- : "r" (ptr) \
- )
-#endif
+#error 0
#endif
/*FIXME, move this to mono-sigcontext as this is generaly useful.*/
@@ -226,6 +201,10 @@
)
#endif
+#ifndef REG_SP
+#define REG_SP REG_O6
+#endif
+
#define ARCH_SIGCTX_SP(ctx) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_SP])
#define ARCH_SIGCTX_IP(ctx) (((ucontext_t *)(ctx))->uc_mcontext.gregs [REG_PC])
#define ARCH_COPY_SIGCTX_REGS(a,ctx) do { \
diff --git a/mono/metadata/sgen-bridge.c b/mono/metadata/sgen-bridge.c
index 40448b28696..391fcee27b1 100644
--- a/mono/metadata/sgen-bridge.c
+++ b/mono/metadata/sgen-bridge.c
@@ -558,7 +558,6 @@ sgen_bridge_processing_stw_step (void)
* bridge_processing_in_progress must be set with the world
* stopped. If not there would be race conditions.
*/
- g_assert (!bridge_processing_in_progress);
bridge_processing_in_progress = TRUE;
SGEN_TV_GETTIME (btv);
@@ -841,7 +840,7 @@ bridge_test_cross_reference (int num_sccs, MonoGCBridgeSCC **sccs, int num_xrefs
for (j = 0; j < sccs [i]->num_objs; ++j) {
// g_print (" %s\n", sgen_safe_name (sccs [i]->objs [j]));
if (i & 1) /*retain half of the bridged objects */
- sccs [i]->objs [0] = NULL;
+ sccs [i]->is_alive = TRUE;
}
}
for (i = 0; i < num_xrefs; ++i) {
@@ -851,6 +850,84 @@ bridge_test_cross_reference (int num_sccs, MonoGCBridgeSCC **sccs, int num_xrefs
}
}
+static MonoClassField *mono_bridge_test_field;
+
+enum {
+ BRIDGE_DEAD,
+ BRIDGE_ROOT,
+ BRIDGE_SAME_SCC,
+ BRIDGE_XREF,
+};
+
+static gboolean
+test_scc (MonoGCBridgeSCC *scc, int i)
+{
+ int status = BRIDGE_DEAD;
+ mono_field_get_value (scc->objs [i], mono_bridge_test_field, &status);
+ return status > 0;
+}
+
+static void
+mark_scc (MonoGCBridgeSCC *scc, int value)
+{
+ int i;
+ for (i = 0; i < scc->num_objs; ++i) {
+ if (!test_scc (scc, i)) {
+ int status = value;
+ mono_field_set_value (scc->objs [i], mono_bridge_test_field, &status);
+ }
+ }
+}
+
+static void
+bridge_test_cross_reference2 (int num_sccs, MonoGCBridgeSCC **sccs, int num_xrefs, MonoGCBridgeXRef *xrefs)
+{
+ int i;
+ gboolean modified;
+
+ if (!mono_bridge_test_field) {
+ mono_bridge_test_field = mono_class_get_field_from_name (mono_object_get_class (sccs[0]->objs [0]), "__test");
+ g_assert (mono_bridge_test_field);
+ }
+
+ /*We mark all objects in a scc with live objects as reachable by scc*/
+ for (i = 0; i < num_sccs; ++i) {
+ int j;
+ gboolean live = FALSE;
+ for (j = 0; j < sccs [i]->num_objs; ++j) {
+ if (test_scc (sccs [i], j)) {
+ live = TRUE;
+ break;
+ }
+ }
+ if (!live)
+ continue;
+ for (j = 0; j < sccs [i]->num_objs; ++j) {
+ if (!test_scc (sccs [i], j)) {
+ int status = BRIDGE_SAME_SCC;
+ mono_field_set_value (sccs [i]->objs [j], mono_bridge_test_field, &status);
+ }
+ }
+ }
+
+ /*Now we mark the transitive closure of reachable objects from the xrefs*/
+ modified = TRUE;
+ while (modified) {
+ modified = FALSE;
+ /* Mark all objects that are brought to life due to xrefs*/
+ for (i = 0; i < num_xrefs; ++i) {
+ MonoGCBridgeXRef ref = xrefs [i];
+ if (test_scc (sccs [ref.src_scc_index], 0) && !test_scc (sccs [ref.dst_scc_index], 0)) {
+ modified = TRUE;
+ mark_scc (sccs [ref.dst_scc_index], BRIDGE_XREF);
+ }
+ }
+ }
+
+ /* keep everything in memory, all we want to do is test persistence */
+ for (i = 0; i < num_sccs; ++i)
+ sccs [i]->is_alive = TRUE;
+}
void
sgen_register_test_bridge_callbacks (const char *bridge_class_name)
@@ -859,9 +936,9 @@ sgen_register_test_bridge_callbacks (const char *bridge_class_name)
callbacks.bridge_version = SGEN_BRIDGE_VERSION;
callbacks.is_bridge_class = bridge_test_is_bridge_class;
callbacks.is_bridge_object = bridge_test_is_bridge_object;
- callbacks.cross_references = bridge_test_cross_reference;
+ callbacks.cross_references = bridge_class_name[0] == '2' ? bridge_test_cross_reference2 : bridge_test_cross_reference;
mono_gc_register_bridge_callbacks (&callbacks);
- bridge_class = bridge_class_name;
+ bridge_class = bridge_class_name + (bridge_class_name[0] == '2' ? 1 : 0);
}
#endif
diff --git a/mono/metadata/sgen-cardtable.c b/mono/metadata/sgen-cardtable.c
index 4ce7384f1cd..24dc86fdadd 100644
--- a/mono/metadata/sgen-cardtable.c
+++ b/mono/metadata/sgen-cardtable.c
@@ -629,7 +629,7 @@ LOOP_HEAD:
else
index = ARRAY_OBJ_INDEX (start, obj, elem_size);
- elem = first_elem = (char*)mono_array_addr_with_size ((MonoArray*)obj, elem_size, index);
+ elem = first_elem = (char*)mono_array_addr_with_size_fast ((MonoArray*)obj, elem_size, index);
if (klass->element_class->valuetype) {
ScanVTypeFunc scan_vtype_func = sgen_get_current_object_ops ()->scan_vtype;
diff --git a/mono/metadata/sgen-descriptor.h b/mono/metadata/sgen-descriptor.h
index cd53a862c3d..573f3c6486e 100644
--- a/mono/metadata/sgen-descriptor.h
+++ b/mono/metadata/sgen-descriptor.h
@@ -153,6 +153,12 @@ sgen_gc_descr_has_references (mword desc)
#define PREFETCH(addr)
#endif
+#if defined(__GNUC__) && SIZEOF_VOID_P==4
+#define GNUC_BUILTIN_CTZ(bmap) __builtin_ctz(bmap)
+#elif defined(__GNUC__) && SIZEOF_VOID_P==8
+#define GNUC_BUILTIN_CTZ(bmap) __builtin_ctzl(bmap)
+#endif
+
/* code using these macros must define a HANDLE_PTR(ptr) macro that does the work */
#define OBJ_RUN_LEN_FOREACH_PTR(desc,obj) do { \
if ((desc) & 0xffff0000) { \
@@ -170,21 +176,21 @@ sgen_gc_descr_has_references (mword desc)
} \
} while (0)
-#ifdef __GNUC__
+#if defined(__GNUC__)
#define OBJ_BITMAP_FOREACH_PTR(desc,obj) do { \
/* there are pointers */ \
void **_objptr = (void**)(obj); \
gsize _bmap = (desc) >> 16; \
_objptr += OBJECT_HEADER_WORDS; \
{ \
- int _index = __builtin_ctz (_bmap); \
+ int _index = GNUC_BUILTIN_CTZ (_bmap); \
_objptr += _index; \
_bmap >>= (_index + 1); \
HANDLE_PTR (_objptr, (obj)); \
_objptr ++; \
} \
while (_bmap) { \
- int _index = __builtin_ctz (_bmap); \
+ int _index = GNUC_BUILTIN_CTZ (_bmap); \
_objptr += _index; \
_bmap >>= (_index + 1); \
HANDLE_PTR (_objptr, (obj)); \
diff --git a/mono/metadata/sgen-fin-weak-hash.c b/mono/metadata/sgen-fin-weak-hash.c
index b6983fb908f..bb350a9e91f 100644
--- a/mono/metadata/sgen-fin-weak-hash.c
+++ b/mono/metadata/sgen-fin-weak-hash.c
@@ -31,6 +31,7 @@
#include "metadata/sgen-gray.h"
#include "metadata/sgen-protocol.h"
#include "utils/dtrace.h"
+#include "utils/mono-counters.h"
#define ptr_in_nursery sgen_ptr_in_nursery
@@ -230,12 +231,66 @@ register_for_finalization (MonoObject *obj, void *user_data, int generation)
}
}
+/*
+ * We're using (mostly) non-locking staging queues for finalizers and weak links to speed
+ * up registering them. Otherwise we'd have to take the GC lock.
+ *
+ * The queues are arrays of `StageEntry`, plus a `next_entry` index. Threads add entries to
+ * the queue via `add_stage_entry()` in a linear fashion until it fills up, in which case
+ * `process_stage_entries()` is called to drain it. A garbage collection will also drain
+ * the queues via the same function. That implies that `add_stage_entry()`, since it
+ * doesn't take a lock, must be able to run concurrently with `process_stage_entries()`,
+ * though it doesn't have to make progress while the queue is drained. In fact, once it
+ * detects that the queue is being drained, it blocks until the draining is done.
+ *
+ * The protocol must guarantee that entries in the queue are causally ordered, otherwise two
+ * entries for the same location might get switched, resulting in the earlier one being
+ * committed and the later one ignored.
+ *
+ * `next_entry` is the index of the next entry to be filled, or `-1` if the queue is
+ * currently being drained. Each entry has a state:
+ *
+ * `STAGE_ENTRY_FREE`: The entry is free. Its data fields must be `NULL`.
+ *
+ * `STAGE_ENTRY_BUSY`: The entry is currently being filled in.
+ *
+ * `STAGE_ENTRY_USED`: The entry is completely filled in and must be processed in the next
+ * draining round.
+ *
+ * `STAGE_ENTRY_INVALID`: The entry was busy during queue draining and therefore
+ * invalidated. Entries that are `BUSY` can obviously not be processed during a drain, but
+ * we can't leave them in place because new entries might be inserted before them, including
+ * from the same thread, violating causality. An alternative would be not to reset
+ * `next_entry` to `0` after a drain, but to the index of the last `BUSY` entry plus one,
+ * but that can potentially waste the whole queue.
+ *
+ * State transitions:
+ *
+ * | from | to | filler? | drainer? |
+ * +---------+---------+---------+----------+
+ * | FREE | BUSY | X | |
+ * | BUSY | FREE | X | |
+ * | BUSY | USED | X | |
+ * | BUSY | INVALID | | X |
+ * | USED | FREE | | X |
+ * | INVALID | FREE | X | |
+ *
+ * `next_entry` can be incremented either by the filler thread that set the corresponding
+ * entry to `BUSY`, or by another filler thread that's trying to get a `FREE` slot. If that
+ * other thread wasn't allowed to increment, it would block on the first filler thread.
+ *
+ * An entry's state, once it's set from `FREE` to `BUSY` by a filler thread, can only be
+ * changed by that same thread or by the drained. The drainer can only set a `BUSY` thread
+ * to `INVALID`, so it needs to be set to `FREE` again by the original filler thread.
+ */
+
#define STAGE_ENTRY_FREE 0
#define STAGE_ENTRY_BUSY 1
#define STAGE_ENTRY_USED 2
+#define STAGE_ENTRY_INVALID 3
typedef struct {
- gint32 state;
+ volatile gint32 state;
MonoObject *obj;
void *user_data;
} StageEntry;
@@ -245,75 +300,217 @@ typedef struct {
static volatile gint32 next_fin_stage_entry = 0;
static StageEntry fin_stage_entries [NUM_FIN_STAGE_ENTRIES];
+/*
+ * This is used to lock the stage when processing is forced, i.e. when it's triggered by a
+ * garbage collection. In that case, the world is already stopped and there's only one
+ * thread operating on the queue.
+ */
+static void
+lock_stage_for_processing (volatile gint32 *next_entry)
+{
+ *next_entry = -1;
+}
+
+/*
+ * When processing is triggered by an overflow, we don't want to take the GC lock
+ * immediately, and then set `next_index` to `-1`, because another thread might have drained
+ * the queue in the mean time. Instead, we make sure the overflow is still there, we
+ * atomically set `next_index`, and only once that happened do we take the GC lock.
+ */
+static gboolean
+try_lock_stage_for_processing (int num_entries, volatile gint32 *next_entry)
+{
+ gint32 old = *next_entry;
+ if (old < num_entries)
+ return FALSE;
+ return InterlockedCompareExchange (next_entry, -1, old) == old;
+}
+
/* LOCKING: requires that the GC lock is held */
static void
-process_stage_entries (int num_entries, volatile gint32 *next_entry, StageEntry *entries, void (*process_func) (MonoObject*, void*))
+process_stage_entries (int num_entries, volatile gint32 *next_entry, StageEntry *entries, void (*process_func) (MonoObject*, void*, int))
{
int i;
- int num_registered = 0;
- int num_busy = 0;
+
+ /*
+ * This can happen if after setting `next_index` to `-1` in
+ * `try_lock_stage_for_processing()`, a GC was triggered, which then drained the
+ * queue and reset `next_entry`.
+ *
+ * We have the GC lock now, so if it's still `-1`, we can't be interrupted by a GC.
+ */
+ if (*next_entry != -1)
+ return;
for (i = 0; i < num_entries; ++i) {
- gint32 state = entries [i].state;
+ gint32 state;
- if (state == STAGE_ENTRY_BUSY)
- ++num_busy;
+ retry:
+ state = entries [i].state;
- if (state != STAGE_ENTRY_USED ||
- InterlockedCompareExchange (&entries [i].state, STAGE_ENTRY_BUSY, STAGE_ENTRY_USED) != STAGE_ENTRY_USED) {
+ switch (state) {
+ case STAGE_ENTRY_FREE:
+ case STAGE_ENTRY_INVALID:
+ continue;
+ case STAGE_ENTRY_BUSY:
+ /* BUSY -> INVALID */
+ /*
+ * This must be done atomically, because the filler thread can set
+ * the entry to `USED`, in which case we must process it, so we must
+ * detect that eventuality.
+ */
+ if (InterlockedCompareExchange (&entries [i].state, STAGE_ENTRY_INVALID, STAGE_ENTRY_BUSY) != STAGE_ENTRY_BUSY)
+ goto retry;
continue;
+ case STAGE_ENTRY_USED:
+ break;
+ default:
+ SGEN_ASSERT (0, FALSE, "Invalid stage entry state");
+ break;
}
- process_func (entries [i].obj, entries [i].user_data);
+ /* state is USED */
+
+ process_func (entries [i].obj, entries [i].user_data, i);
entries [i].obj = NULL;
entries [i].user_data = NULL;
mono_memory_write_barrier ();
+ /* USED -> FREE */
+ /*
+ * This transition only happens here, so we don't have to do it atomically.
+ */
entries [i].state = STAGE_ENTRY_FREE;
-
- ++num_registered;
}
- *next_entry = 0;
+ mono_memory_write_barrier ();
- /* g_print ("stage busy %d reg %d\n", num_busy, num_registered); */
+ *next_entry = 0;
}
-static gboolean
+#ifdef HEAVY_STATISTICS
+static long long stat_overflow_abort = 0;
+static long long stat_wait_for_processing = 0;
+static long long stat_increment_other_thread = 0;
+static long long stat_index_decremented = 0;
+static long long stat_entry_invalidated = 0;
+static long long stat_success = 0;
+#endif
+
+static int
add_stage_entry (int num_entries, volatile gint32 *next_entry, StageEntry *entries, MonoObject *obj, void *user_data)
{
- gint32 index;
-
- do {
- do {
- index = *next_entry;
- if (index >= num_entries)
- return FALSE;
- } while (InterlockedCompareExchange (next_entry, index + 1, index) != index);
-
+ gint32 index, new_next_entry, old_next_entry;
+ gint32 previous_state;
+
+ retry:
+ for (;;) {
+ index = *next_entry;
+ if (index >= num_entries) {
+ HEAVY_STAT (++stat_overflow_abort);
+ return -1;
+ }
+ if (index < 0) {
+ /*
+ * Backed-off waiting is way more efficient than even using a
+ * dedicated lock for this.
+ */
+ while ((index = *next_entry) < 0) {
+ /*
+ * This seems like a good value. Determined by timing
+ * sgen-weakref-stress.exe.
+ */
+ g_usleep (200);
+ HEAVY_STAT (++stat_wait_for_processing);
+ }
+ continue;
+ }
+ /* FREE -> BUSY */
+ if (entries [index].state != STAGE_ENTRY_FREE ||
+ InterlockedCompareExchange (&entries [index].state, STAGE_ENTRY_BUSY, STAGE_ENTRY_FREE) != STAGE_ENTRY_FREE) {
+ /*
+ * If we can't get the entry it must be because another thread got
+ * it first. We don't want to wait for that thread to increment
+ * `next_entry`, so we try to do it ourselves. Whether we succeed
+ * or not, we start over.
+ */
+ if (*next_entry == index) {
+ InterlockedCompareExchange (next_entry, index + 1, index);
+ //g_print ("tried increment for other thread\n");
+ HEAVY_STAT (++stat_increment_other_thread);
+ }
+ continue;
+ }
+ /* state is BUSY now */
+ mono_memory_write_barrier ();
/*
- * We don't need a write barrier here. *next_entry is just a
- * help for finding an index, its value is irrelevant for
- * correctness.
+ * Incrementing `next_entry` must happen after setting the state to `BUSY`.
+ * If it were the other way around, it would be possible that after a filler
+ * incremented the index, other threads fill up the queue, the queue is
+ * drained, the original filler finally fills in the slot, but `next_entry`
+ * ends up at the start of the queue, and new entries are written in the
+ * queue in front of, not behind, the original filler's entry.
+ *
+ * We don't actually require that the CAS succeeds, but we do require that
+ * the value of `next_entry` is not lower than our index. Since the drainer
+ * sets it to `-1`, that also takes care of the case that the drainer is
+ * currently running.
*/
- } while (entries [index].state != STAGE_ENTRY_FREE ||
- InterlockedCompareExchange (&entries [index].state, STAGE_ENTRY_BUSY, STAGE_ENTRY_FREE) != STAGE_ENTRY_FREE);
+ old_next_entry = InterlockedCompareExchange (next_entry, index + 1, index);
+ if (old_next_entry < index) {
+ /* BUSY -> FREE */
+ /* INVALID -> FREE */
+ /*
+ * The state might still be `BUSY`, or the drainer could have set it
+ * to `INVALID`. In either case, there's no point in CASing. Set
+ * it to `FREE` and start over.
+ */
+ entries [index].state = STAGE_ENTRY_FREE;
+ HEAVY_STAT (++stat_index_decremented);
+ continue;
+ }
+ break;
+ }
+
+ SGEN_ASSERT (0, index >= 0 && index < num_entries, "Invalid index");
entries [index].obj = obj;
entries [index].user_data = user_data;
mono_memory_write_barrier ();
- entries [index].state = STAGE_ENTRY_USED;
+ new_next_entry = *next_entry;
+ mono_memory_read_barrier ();
+ /* BUSY -> USED */
+ /*
+ * A `BUSY` entry will either still be `BUSY` or the drainer will have set it to
+ * `INVALID`. In the former case, we set it to `USED` and we're finished. In the
+ * latter case, we reset it to `FREE` and start over.
+ */
+ previous_state = InterlockedCompareExchange (&entries [index].state, STAGE_ENTRY_USED, STAGE_ENTRY_BUSY);
+ if (previous_state == STAGE_ENTRY_BUSY) {
+ SGEN_ASSERT (0, new_next_entry >= index || new_next_entry < 0, "Invalid next entry index - as long as we're busy, other thread can only increment or invalidate it");
+ HEAVY_STAT (++stat_success);
+ return index;
+ }
+
+ SGEN_ASSERT (0, previous_state == STAGE_ENTRY_INVALID, "Invalid state transition - other thread can only make busy state invalid");
+ entries [index].obj = NULL;
+ entries [index].user_data = NULL;
+ mono_memory_write_barrier ();
+ /* INVALID -> FREE */
+ entries [index].state = STAGE_ENTRY_FREE;
- return TRUE;
+ HEAVY_STAT (++stat_entry_invalidated);
+
+ goto retry;
}
/* LOCKING: requires that the GC lock is held */
static void
-process_fin_stage_entry (MonoObject *obj, void *user_data)
+process_fin_stage_entry (MonoObject *obj, void *user_data, int index)
{
if (ptr_in_nursery (obj))
register_for_finalization (obj, user_data, GENERATION_NURSERY);
@@ -325,16 +522,19 @@ process_fin_stage_entry (MonoObject *obj, void *user_data)
void
sgen_process_fin_stage_entries (void)
{
+ lock_stage_for_processing (&next_fin_stage_entry);
process_stage_entries (NUM_FIN_STAGE_ENTRIES, &next_fin_stage_entry, fin_stage_entries, process_fin_stage_entry);
}
void
mono_gc_register_for_finalization (MonoObject *obj, void *user_data)
{
- while (!add_stage_entry (NUM_FIN_STAGE_ENTRIES, &next_fin_stage_entry, fin_stage_entries, obj, user_data)) {
- LOCK_GC;
- sgen_process_fin_stage_entries ();
- UNLOCK_GC;
+ while (add_stage_entry (NUM_FIN_STAGE_ENTRIES, &next_fin_stage_entry, fin_stage_entries, obj, user_data) == -1) {
+ if (try_lock_stage_for_processing (NUM_FIN_STAGE_ENTRIES, &next_fin_stage_entry)) {
+ LOCK_GC;
+ process_stage_entries (NUM_FIN_STAGE_ENTRIES, &next_fin_stage_entry, fin_stage_entries, process_fin_stage_entry);
+ UNLOCK_GC;
+ }
}
}
@@ -478,7 +678,7 @@ sgen_null_link_in_range (int generation, gboolean before_finalization, ScanCopyC
if (!major_collector.is_object_live (object)) {
if (sgen_gc_is_object_ready_for_finalization (object)) {
*link = NULL;
- binary_protocol_dislink_update (link, NULL, 0);
+ binary_protocol_dislink_update (link, NULL, 0, 0);
SGEN_LOG (5, "Dislink nullified at %p to GCed object %p", link, object);
SGEN_HASH_TABLE_FOREACH_REMOVE (TRUE);
continue;
@@ -500,14 +700,14 @@ sgen_null_link_in_range (int generation, gboolean before_finalization, ScanCopyC
g_assert (copy);
*link = HIDE_POINTER (copy, track);
add_or_remove_disappearing_link ((MonoObject*)copy, link, GENERATION_OLD);
- binary_protocol_dislink_update (link, copy, track);
+ binary_protocol_dislink_update (link, copy, track, 0);
SGEN_LOG (5, "Upgraded dislink at %p to major because object %p moved to %p", link, object, copy);
continue;
} else {
*link = HIDE_POINTER (copy, track);
- binary_protocol_dislink_update (link, copy, track);
+ binary_protocol_dislink_update (link, copy, track, 0);
SGEN_LOG (5, "Updated dislink at %p to %p", link, DISLINK_OBJECT (link));
}
}
@@ -530,7 +730,7 @@ sgen_null_links_for_domain (MonoDomain *domain, int generation)
if (*link) {
*link = NULL;
- binary_protocol_dislink_update (link, NULL, 0);
+ binary_protocol_dislink_update (link, NULL, 0, 0);
free = FALSE;
/*
* This can happen if finalizers are not ran, i.e. Environment.Exit ()
@@ -563,7 +763,7 @@ sgen_null_links_with_predicate (int generation, WeakLinkAlivePredicateFunc predi
if (!is_alive) {
*link = NULL;
- binary_protocol_dislink_update (link, NULL, 0);
+ binary_protocol_dislink_update (link, NULL, 0, 0);
SGEN_LOG (5, "Dislink nullified by predicate at %p to GCed object %p", link, object);
SGEN_HASH_TABLE_FOREACH_REMOVE (TRUE);
continue;
@@ -592,10 +792,13 @@ sgen_remove_finalizers_for_domain (MonoDomain *domain, int generation)
/* LOCKING: requires that the GC lock is held */
static void
-process_dislink_stage_entry (MonoObject *obj, void *_link)
+process_dislink_stage_entry (MonoObject *obj, void *_link, int index)
{
void **link = _link;
+ if (index >= 0)
+ binary_protocol_dislink_process_staged (link, obj, index);
+
add_or_remove_disappearing_link (NULL, link, GENERATION_NURSERY);
add_or_remove_disappearing_link (NULL, link, GENERATION_OLD);
if (obj) {
@@ -615,6 +818,7 @@ static StageEntry dislink_stage_entries [NUM_DISLINK_STAGE_ENTRIES];
void
sgen_process_dislink_stage_entries (void)
{
+ lock_stage_for_processing (&next_dislink_stage_entry);
process_stage_entries (NUM_DISLINK_STAGE_ENTRIES, &next_dislink_stage_entry, dislink_stage_entries, process_dislink_stage_entry);
}
@@ -640,25 +844,43 @@ sgen_register_disappearing_link (MonoObject *obj, void **link, gboolean track, g
else
*link = NULL;
- binary_protocol_dislink_update (link, obj, track);
-
#if 1
if (in_gc) {
- process_dislink_stage_entry (obj, link);
+ binary_protocol_dislink_update (link, obj, track, 0);
+ process_dislink_stage_entry (obj, link, -1);
} else {
- while (!add_stage_entry (NUM_DISLINK_STAGE_ENTRIES, &next_dislink_stage_entry, dislink_stage_entries, obj, link)) {
- LOCK_GC;
- sgen_process_dislink_stage_entries ();
- UNLOCK_GC;
+ int index;
+ binary_protocol_dislink_update (link, obj, track, 1);
+ while ((index = add_stage_entry (NUM_DISLINK_STAGE_ENTRIES, &next_dislink_stage_entry, dislink_stage_entries, obj, link)) == -1) {
+ if (try_lock_stage_for_processing (NUM_DISLINK_STAGE_ENTRIES, &next_dislink_stage_entry)) {
+ LOCK_GC;
+ process_stage_entries (NUM_DISLINK_STAGE_ENTRIES, &next_dislink_stage_entry, dislink_stage_entries, process_dislink_stage_entry);
+ UNLOCK_GC;
+ }
}
+ binary_protocol_dislink_update_staged (link, obj, track, index);
}
#else
if (!in_gc)
LOCK_GC;
- process_dislink_stage_entry (obj, link);
+ binary_protocol_dislink_update (link, obj, track, 0);
+ process_dislink_stage_entry (obj, link, -1);
if (!in_gc)
UNLOCK_GC;
#endif
}
+void
+sgen_init_fin_weak_hash (void)
+{
+#ifdef HEAVY_STATISTICS
+ mono_counters_register ("FinWeak Successes", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_success);
+ mono_counters_register ("FinWeak Overflow aborts", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_overflow_abort);
+ mono_counters_register ("FinWeak Wait for processing", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_wait_for_processing);
+ mono_counters_register ("FinWeak Increment other thread", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_increment_other_thread);
+ mono_counters_register ("FinWeak Index decremented", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_index_decremented);
+ mono_counters_register ("FinWeak Entry invalidated", MONO_COUNTER_GC | MONO_COUNTER_LONG, &stat_entry_invalidated);
+#endif
+}
+
#endif /* HAVE_SGEN_GC */
diff --git a/mono/metadata/sgen-gc.c b/mono/metadata/sgen-gc.c
index 6012b347132..283d61bdb51 100644
--- a/mono/metadata/sgen-gc.c
+++ b/mono/metadata/sgen-gc.c
@@ -317,6 +317,7 @@ static int stat_wbarrier_set_field = 0;
static int stat_wbarrier_set_arrayref = 0;
static int stat_wbarrier_arrayref_copy = 0;
static int stat_wbarrier_generic_store = 0;
+static int stat_wbarrier_generic_store_atomic = 0;
static int stat_wbarrier_set_root = 0;
static int stat_wbarrier_value_copy = 0;
static int stat_wbarrier_object_copy = 0;
@@ -1048,6 +1049,8 @@ mono_gc_clear_domain (MonoDomain * domain)
LOCK_GC;
+ binary_protocol_domain_unload_begin (domain);
+
sgen_stop_world (0);
if (concurrent_collection_in_progress)
@@ -1116,6 +1119,8 @@ mono_gc_clear_domain (MonoDomain * domain)
sgen_restart_world (0, NULL);
+ binary_protocol_domain_unload_end (domain);
+
UNLOCK_GC;
}
@@ -1912,7 +1917,8 @@ finish_gray_stack (int generation, GrayQueue *queue)
We must reset the gathered bridges since their original block might be evacuated due to major
fragmentation in the meanwhile and the bridge code should not have to deal with that.
*/
- sgen_bridge_reset_data ();
+ if (sgen_need_bridge_processing ())
+ sgen_bridge_reset_data ();
/*
* Walk the ephemeron tables marking all values with reachable keys. This must be completely done
@@ -1929,9 +1935,25 @@ finish_gray_stack (int generation, GrayQueue *queue)
sgen_scan_togglerefs (start_addr, end_addr, ctx);
if (sgen_need_bridge_processing ()) {
+ /*Make sure the gray stack is empty before we process bridge objects so we get liveness right*/
+ sgen_drain_gray_stack (-1, ctx);
sgen_collect_bridge_objects (generation, ctx);
if (generation == GENERATION_OLD)
sgen_collect_bridge_objects (GENERATION_NURSERY, ctx);
+
+ /*
+ Do the first bridge step here, as the collector liveness state will become useless after that.
+
+ An important optimization is to only proccess the possibly dead part of the object graph and skip
+ over all live objects as we transitively know everything they point must be alive too.
+
+ The above invariant is completely wrong if we let the gray queue be drained and mark/copy everything.
+
+ This has the unfortunate side effect of making overflow collections perform the first step twice, but
+ given we now have heuristics that perform major GC in anticipation of minor overflows this should not
+ be a big deal.
+ */
+ sgen_bridge_processing_stw_step ();
}
/*
@@ -2213,6 +2235,7 @@ init_stats (void)
mono_counters_register ("WBarrier set arrayref", MONO_COUNTER_GC | MONO_COUNTER_INT, &stat_wbarrier_set_arrayref);
mono_counters_register ("WBarrier arrayref copy", MONO_COUNTER_GC | MONO_COUNTER_INT, &stat_wbarrier_arrayref_copy);
mono_counters_register ("WBarrier generic store called", MONO_COUNTER_GC | MONO_COUNTER_INT, &stat_wbarrier_generic_store);
+ mono_counters_register ("WBarrier generic atomic store called", MONO_COUNTER_GC | MONO_COUNTER_INT, &stat_wbarrier_generic_store_atomic);
mono_counters_register ("WBarrier set root", MONO_COUNTER_GC | MONO_COUNTER_INT, &stat_wbarrier_set_root);
mono_counters_register ("WBarrier value copy", MONO_COUNTER_GC | MONO_COUNTER_INT, &stat_wbarrier_value_copy);
mono_counters_register ("WBarrier object copy", MONO_COUNTER_GC | MONO_COUNTER_INT, &stat_wbarrier_object_copy);
@@ -3259,6 +3282,9 @@ major_do_collection (const char *reason)
TV_DECLARE (all_btv);
int old_next_pin_slot;
+ if (disable_major_collections)
+ return FALSE;
+
if (major_collector.get_and_reset_num_major_objects_marked) {
long long num_marked = major_collector.get_and_reset_num_major_objects_marked ();
g_assert (!num_marked);
@@ -3280,13 +3306,15 @@ major_do_collection (const char *reason)
return bytes_pinned_from_failed_allocation > 0;
}
-static gboolean major_do_collection (const char *reason);
-
static void
major_start_concurrent_collection (const char *reason)
{
- long long num_objects_marked = major_collector.get_and_reset_num_major_objects_marked ();
+ long long num_objects_marked;
+ if (disable_major_collections)
+ return;
+
+ num_objects_marked = major_collector.get_and_reset_num_major_objects_marked ();
g_assert (num_objects_marked == 0);
MONO_GC_CONCURRENT_START_BEGIN (GENERATION_OLD);
@@ -3386,6 +3414,9 @@ sgen_ensure_free_space (size_t size)
sgen_perform_collection (size, generation_to_collect, reason, FALSE);
}
+/*
+ * LOCKING: Assumes the GC lock is held.
+ */
void
sgen_perform_collection (size_t requested_size, int generation_to_collect, const char *reason, gboolean wait_to_finish)
{
@@ -3989,34 +4020,30 @@ scan_thread_data (void *start_nursery, void *end_nursery, gboolean precise, Gray
SGEN_LOG (3, "GC disabled for thread %p, range: %p-%p, size: %td", info, info->stack_start, info->stack_end, (char*)info->stack_end - (char*)info->stack_start);
continue;
}
-
- if (!info->joined_stw) {
- SGEN_LOG (3, "Skipping thread not seen in STW %p, range: %p-%p, size: %td", info, info->stack_start, info->stack_end, (char*)info->stack_end - (char*)info->stack_start);
+ if (mono_thread_info_run_state (info) != STATE_RUNNING) {
+ SGEN_LOG (3, "Skipping non-running thread %p, range: %p-%p, size: %td (state %d)", info, info->stack_start, info->stack_end, (char*)info->stack_end - (char*)info->stack_start, mono_thread_info_run_state (info));
continue;
}
-
SGEN_LOG (3, "Scanning thread %p, range: %p-%p, size: %td, pinned=%d", info, info->stack_start, info->stack_end, (char*)info->stack_end - (char*)info->stack_start, sgen_get_pinned_count ());
- if (!info->thread_is_dying) {
- if (gc_callbacks.thread_mark_func && !conservative_stack_mark) {
- UserCopyOrMarkData data = { NULL, queue };
- set_user_copy_or_mark_data (&data);
- gc_callbacks.thread_mark_func (info->runtime_data, info->stack_start, info->stack_end, precise);
- set_user_copy_or_mark_data (NULL);
- } else if (!precise) {
- if (!conservative_stack_mark) {
- fprintf (stderr, "Precise stack mark not supported - disabling.\n");
- conservative_stack_mark = TRUE;
- }
- conservatively_pin_objects_from (info->stack_start, info->stack_end, start_nursery, end_nursery, PIN_TYPE_STACK);
+ if (gc_callbacks.thread_mark_func && !conservative_stack_mark) {
+ UserCopyOrMarkData data = { NULL, queue };
+ set_user_copy_or_mark_data (&data);
+ gc_callbacks.thread_mark_func (info->runtime_data, info->stack_start, info->stack_end, precise);
+ set_user_copy_or_mark_data (NULL);
+ } else if (!precise) {
+ if (!conservative_stack_mark) {
+ fprintf (stderr, "Precise stack mark not supported - disabling.\n");
+ conservative_stack_mark = TRUE;
}
+ conservatively_pin_objects_from (info->stack_start, info->stack_end, start_nursery, end_nursery, PIN_TYPE_STACK);
}
- if (!info->thread_is_dying && !precise) {
+ if (!precise) {
#ifdef USE_MONO_CTX
conservatively_pin_objects_from ((void**)&info->ctx, (void**)&info->ctx + ARCH_NUM_REGS,
start_nursery, end_nursery, PIN_TYPE_STACK);
#else
- conservatively_pin_objects_from (&info->regs, &info->regs + ARCH_NUM_REGS,
+ conservatively_pin_objects_from ((void**)&info->regs, (void**)&info->regs + ARCH_NUM_REGS,
start_nursery, end_nursery, PIN_TYPE_STACK);
#endif
}
@@ -4037,7 +4064,6 @@ ptr_on_stack (void *ptr)
static void*
sgen_thread_register (SgenThreadInfo* info, void *addr)
{
- LOCK_GC;
#ifndef HAVE_KW_THREAD
info->tlab_start = info->tlab_next = info->tlab_temp_end = info->tlab_real_end = NULL;
@@ -4047,14 +4073,11 @@ sgen_thread_register (SgenThreadInfo* info, void *addr)
sgen_thread_info = info;
#endif
-#if !defined(__MACH__)
+#ifdef SGEN_POSIX_STW
info->stop_count = -1;
info->signal = 0;
#endif
info->skip = 0;
- info->joined_stw = FALSE;
- info->doing_handshake = FALSE;
- info->thread_is_dying = FALSE;
info->stack_start = NULL;
info->stopped_ip = NULL;
info->stopped_domain = NULL;
@@ -4112,8 +4135,6 @@ sgen_thread_register (SgenThreadInfo* info, void *addr)
if (gc_callbacks.thread_attach_func)
info->runtime_data = gc_callbacks.thread_attach_func ();
-
- UNLOCK_GC;
return info;
}
@@ -4129,38 +4150,6 @@ sgen_thread_unregister (SgenThreadInfo *p)
if (mono_domain_get ())
mono_thread_detach (mono_thread_current ());
- p->thread_is_dying = TRUE;
-
- /*
- There is a race condition between a thread finishing executing and been removed
- from the GC thread set.
- This happens on posix systems when TLS data is been cleaned-up, libpthread will
- set the thread_info slot to NULL before calling the cleanup function. This
- opens a window in which the thread is registered but has a NULL TLS.
-
- The suspend signal handler needs TLS data to know where to store thread state
- data or otherwise it will simply ignore the thread.
-
- This solution works because the thread doing STW will wait until all threads been
- suspended handshake back, so there is no race between the doing_hankshake test
- and the suspend_thread call.
-
- This is not required on systems that do synchronous STW as those can deal with
- the above race at suspend time.
-
- FIXME: I believe we could avoid this by using mono_thread_info_lookup when
- mono_thread_info_current returns NULL. Or fix mono_thread_info_lookup to do so.
- */
-#if (defined(__MACH__) && MONO_MACH_ARCH_SUPPORTED) || !defined(HAVE_PTHREAD_KILL)
- LOCK_GC;
-#else
- while (!TRYLOCK_GC) {
- if (!sgen_park_current_thread_if_doing_handshake (p))
- g_usleep (50);
- }
- MONO_GC_LOCKED ();
-#endif
-
binary_protocol_thread_unregister ((gpointer)mono_thread_info_get_tid (p));
SGEN_LOG (3, "unregister thread %p (%p)", p, (gpointer)mono_thread_info_get_tid (p));
@@ -4168,9 +4157,6 @@ sgen_thread_unregister (SgenThreadInfo *p)
gc_callbacks.thread_detach_func (p->runtime_data);
p->runtime_data = NULL;
}
-
- mono_threads_unregister_current_thread (p);
- UNLOCK_GC;
}
@@ -4404,6 +4390,24 @@ mono_gc_wbarrier_generic_store (gpointer ptr, MonoObject* value)
sgen_dummy_use (value);
}
+/* Same as mono_gc_wbarrier_generic_store () but performs the store
+ * as an atomic operation with release semantics.
+ */
+void
+mono_gc_wbarrier_generic_store_atomic (gpointer ptr, MonoObject *value)
+{
+ HEAVY_STAT (++stat_wbarrier_generic_store_atomic);
+
+ SGEN_LOG (8, "Wbarrier atomic store at %p to %p (%s)", ptr, value, value ? safe_name (value) : "null");
+
+ InterlockedWritePointer (ptr, value);
+
+ if (ptr_in_nursery (value))
+ mono_gc_wbarrier_generic_nostore (ptr);
+
+ sgen_dummy_use (value);
+}
+
void mono_gc_wbarrier_value_copy_bitmap (gpointer _dest, gpointer _src, int size, unsigned bitmap)
{
mword *dest = _dest;
@@ -4798,7 +4802,7 @@ void
mono_gc_base_init (void)
{
MonoThreadInfoCallbacks cb;
- char *env;
+ const char *env;
char **opts, **ptr;
char *major_collector_opt = NULL;
char *minor_collector_opt = NULL;
@@ -4850,7 +4854,7 @@ mono_gc_base_init (void)
init_user_copy_or_mark_key ();
- if ((env = getenv (MONO_GC_PARAMS_NAME))) {
+ if ((env = g_getenv (MONO_GC_PARAMS_NAME))) {
opts = g_strsplit (env, ",", -1);
for (ptr = opts; *ptr; ++ptr) {
char *opt = *ptr;
@@ -4869,6 +4873,7 @@ mono_gc_base_init (void)
init_stats ();
sgen_init_internal_allocator ();
sgen_init_nursery_allocator ();
+ sgen_init_fin_weak_hash ();
sgen_register_fixed_internal_mem_type (INTERNAL_MEM_SECTION, SGEN_SIZEOF_GC_MEM_SECTION);
sgen_register_fixed_internal_mem_type (INTERNAL_MEM_FINALIZE_READY_ENTRY, sizeof (FinalizeReadyEntry));
@@ -4877,6 +4882,19 @@ mono_gc_base_init (void)
#ifndef HAVE_KW_THREAD
mono_native_tls_alloc (&thread_info_key, NULL);
+#if defined(__APPLE__) || defined (HOST_WIN32)
+ /*
+ * CEE_MONO_TLS requires the tls offset, not the key, so the code below only works on darwin,
+ * where the two are the same.
+ */
+ mono_tls_key_set_offset (TLS_KEY_SGEN_THREAD_INFO, thread_info_key);
+#endif
+#else
+ {
+ int tls_offset = -1;
+ MONO_THREAD_VAR_OFFSET (sgen_thread_info, tls_offset);
+ mono_tls_key_set_offset (TLS_KEY_SGEN_THREAD_INFO, tls_offset);
+ }
#endif
/*
@@ -5075,6 +5093,10 @@ mono_gc_base_init (void)
}
if (!strcmp (opt, "cementing")) {
+ if (major_collector.is_parallel) {
+ sgen_env_var_error (MONO_GC_PARAMS_NAME, "Ignoring.", "`cementing` is not supported for the parallel major collector.");
+ continue;
+ }
cement_enabled = TRUE;
continue;
}
@@ -5119,10 +5141,12 @@ mono_gc_base_init (void)
g_strfreev (opts);
}
- if (major_collector.is_parallel)
+ if (major_collector.is_parallel) {
+ cement_enabled = FALSE;
sgen_workers_init (num_workers);
- else if (major_collector.is_concurrent)
+ } else if (major_collector.is_concurrent) {
sgen_workers_init (1);
+ }
if (major_collector_opt)
g_free (major_collector_opt);
@@ -5134,7 +5158,7 @@ mono_gc_base_init (void)
sgen_cement_init (cement_enabled);
- if ((env = getenv (MONO_GC_DEBUG_NAME))) {
+ if ((env = g_getenv (MONO_GC_DEBUG_NAME))) {
gboolean usage_printed = FALSE;
opts = g_strsplit (env, ",", -1);
diff --git a/mono/metadata/sgen-gc.h b/mono/metadata/sgen-gc.h
index 8628764ac38..18948819cdb 100644
--- a/mono/metadata/sgen-gc.h
+++ b/mono/metadata/sgen-gc.h
@@ -66,17 +66,30 @@ NurseryClearPolicy sgen_get_nursery_clear_policy (void) MONO_INTERNAL;
#define SGEN_TV_ELAPSED(start,end) (int)((end-start) / 10)
#define SGEN_TV_ELAPSED_MS(start,end) ((SGEN_TV_ELAPSED((start),(end)) + 500) / 1000)
+#if !defined(__MACH__) && !MONO_MACH_ARCH_SUPPORTED && defined(HAVE_PTHREAD_KILL)
+#define SGEN_POSIX_STW 1
+#endif
+
/* eventually share with MonoThread? */
/*
* This structure extends the MonoThreadInfo structure.
*/
struct _SgenThreadInfo {
MonoThreadInfo info;
+ /*
+ This is set to TRUE when STW fails to suspend a thread, most probably because the
+ underlying thread is dead.
+ */
int skip;
volatile int in_critical_region;
- gboolean joined_stw;
- gboolean doing_handshake;
- gboolean thread_is_dying;
+
+ /*
+ This is set the argument of mono_gc_set_skip_thread.
+
+ A thread that knowingly holds no managed state can call this
+ function around blocking loops to reduce the GC burden by not
+ been scanned.
+ */
gboolean gc_disabled;
void *stack_end;
void *stack_start;
@@ -87,14 +100,17 @@ struct _SgenThreadInfo {
char **tlab_real_end_addr;
gpointer runtime_data;
- /* Only used on POSIX platforms */
+#ifdef SGEN_POSIX_STW
+ /* This is -1 until the first suspend. */
int signal;
- /* Ditto */
- unsigned int stop_count; /* to catch duplicate signals */
+ /* FIXME: kill this, we only use signals on systems that have rt-posix, which doesn't have issues with duplicates. */
+ unsigned int stop_count; /* to catch duplicate signals. */
+#endif
gpointer stopped_ip; /* only valid if the thread is stopped */
- MonoDomain *stopped_domain; /* ditto */
+ MonoDomain *stopped_domain; /* dsto */
+ /*FIXME pretty please finish killing ARCH_NUM_REGS */
#ifdef USE_MONO_CTX
MonoContext ctx; /* ditto */
#else
@@ -127,7 +143,7 @@ struct _GCMemSection {
/* in major collections indexes in the pin_queue for objects that pin this section */
void **pin_queue_start;
int pin_queue_num_entries;
- unsigned short num_scan_start;
+ unsigned int num_scan_start;
};
/*
@@ -263,19 +279,19 @@ extern int sgen_nursery_bits MONO_INTERNAL;
extern char *sgen_nursery_start MONO_INTERNAL;
extern char *sgen_nursery_end MONO_INTERNAL;
-static inline gboolean
+static MONO_ALWAYS_INLINE gboolean
sgen_ptr_in_nursery (void *p)
{
return SGEN_PTR_IN_NURSERY ((p), DEFAULT_NURSERY_BITS, sgen_nursery_start, sgen_nursery_end);
}
-static inline char*
+static MONO_ALWAYS_INLINE char*
sgen_get_nursery_start (void)
{
return sgen_nursery_start;
}
-static inline char*
+static MONO_ALWAYS_INLINE char*
sgen_get_nursery_end (void)
{
return sgen_nursery_end;
@@ -376,7 +392,6 @@ int sgen_thread_handshake (BOOL suspend) MONO_INTERNAL;
gboolean sgen_suspend_thread (SgenThreadInfo *info) MONO_INTERNAL;
gboolean sgen_resume_thread (SgenThreadInfo *info) MONO_INTERNAL;
void sgen_wait_for_suspend_ack (int count) MONO_INTERNAL;
-gboolean sgen_park_current_thread_if_doing_handshake (SgenThreadInfo *p) MONO_INTERNAL;
void sgen_os_init (void) MONO_INTERNAL;
gboolean sgen_is_worker_thread (MonoNativeThreadId thread) MONO_INTERNAL;
@@ -417,6 +432,7 @@ enum {
INTERNAL_MEM_JOB_QUEUE_ENTRY,
INTERNAL_MEM_TOGGLEREF_DATA,
INTERNAL_MEM_CARDTABLE_MOD_UNION,
+ INTERNAL_MEM_BINARY_PROTOCOL,
INTERNAL_MEM_MAX
};
@@ -768,6 +784,8 @@ const char* sgen_safe_name (void* obj) MONO_INTERNAL;
gboolean sgen_object_is_live (void *obj) MONO_INTERNAL;
+void sgen_init_fin_weak_hash (void) MONO_INTERNAL;
+
gboolean sgen_need_bridge_processing (void) MONO_INTERNAL;
void sgen_bridge_reset_data (void) MONO_INTERNAL;
void sgen_bridge_processing_stw_step (void) MONO_INTERNAL;
@@ -927,28 +945,24 @@ extern __thread char *stack_end;
#endif
#ifdef HAVE_KW_THREAD
-#define EMIT_TLS_ACCESS(mb,dummy,offset) do { \
+#define EMIT_TLS_ACCESS(mb,member,key) do { \
mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX); \
mono_mb_emit_byte ((mb), CEE_MONO_TLS); \
- mono_mb_emit_i4 ((mb), (offset)); \
+ mono_mb_emit_i4 ((mb), (key)); \
} while (0)
#else
-/*
- * CEE_MONO_TLS requires the tls offset, not the key, so the code below only works on darwin,
- * where the two are the same.
- */
#if defined(__APPLE__) || defined (HOST_WIN32)
-#define EMIT_TLS_ACCESS(mb,member,dummy) do { \
+#define EMIT_TLS_ACCESS(mb,member,key) do { \
mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX); \
mono_mb_emit_byte ((mb), CEE_MONO_TLS); \
- mono_mb_emit_i4 ((mb), thread_info_key); \
+ mono_mb_emit_i4 ((mb), TLS_KEY_SGEN_THREAD_INFO); \
mono_mb_emit_icon ((mb), G_STRUCT_OFFSET (SgenThreadInfo, member)); \
mono_mb_emit_byte ((mb), CEE_ADD); \
mono_mb_emit_byte ((mb), CEE_LDIND_I); \
} while (0)
#else
-#define EMIT_TLS_ACCESS(mb,member,dummy) do { g_error ("sgen is not supported when using --with-tls=pthread.\n"); } while (0)
+#define EMIT_TLS_ACCESS(mb,member,key) do { g_error ("sgen is not supported when using --with-tls=pthread.\n"); } while (0)
#endif
#endif
diff --git a/mono/metadata/sgen-internal.c b/mono/metadata/sgen-internal.c
index 6be8b0d285d..8bf1c112345 100644
--- a/mono/metadata/sgen-internal.c
+++ b/mono/metadata/sgen-internal.c
@@ -110,6 +110,7 @@ description_for_type (int type)
case INTERNAL_MEM_JOB_QUEUE_ENTRY: return "job-queue-entry";
case INTERNAL_MEM_TOGGLEREF_DATA: return "toggleref-data";
case INTERNAL_MEM_CARDTABLE_MOD_UNION: return "cardtable-mod-union";
+ case INTERNAL_MEM_BINARY_PROTOCOL: return "binary-protocol";
default:
g_assert_not_reached ();
}
diff --git a/mono/metadata/sgen-los.c b/mono/metadata/sgen-los.c
index b273a5ab822..5d51db7d867 100644
--- a/mono/metadata/sgen-los.c
+++ b/mono/metadata/sgen-los.c
@@ -568,7 +568,11 @@ sgen_los_object_size (LOSObject *obj)
LOSObject*
sgen_los_header_for_object (char *data)
{
+#if _MSC_VER
+ return (LOSObject*)(data - (int)(&(((LOSObject*)0)->data)));
+#else
return (LOSObject*)(data - sizeof (LOSObject));
+#endif
}
void
diff --git a/mono/metadata/sgen-marksweep.c b/mono/metadata/sgen-marksweep.c
index 69e0d5603c1..98b4b7ac1d8 100644..100755
--- a/mono/metadata/sgen-marksweep.c
+++ b/mono/metadata/sgen-marksweep.c
@@ -1574,22 +1574,20 @@ sweep_block (MSBlockInfo *block, gboolean during_major_collection)
static inline int
bitcount (mword d)
{
-#if SIZEOF_VOID_P == 8
- /* http://www.jjj.de/bitwizardry/bitwizardrypage.html */
- d -= (d>>1) & 0x5555555555555555;
- d = ((d>>2) & 0x3333333333333333) + (d & 0x3333333333333333);
- d = ((d>>4) + d) & 0x0f0f0f0f0f0f0f0f;
- d *= 0x0101010101010101;
- return d >> 56;
+ int count = 0;
+
+#ifdef __GNUC__
+ if (sizeof (mword) == sizeof (unsigned long))
+ count += __builtin_popcountl (d);
+ else
+ count += __builtin_popcount (d);
#else
- /* http://aggregate.org/MAGIC/ */
- d -= ((d >> 1) & 0x55555555);
- d = (((d >> 2) & 0x33333333) + (d & 0x33333333));
- d = (((d >> 4) + d) & 0x0f0f0f0f);
- d += (d >> 8);
- d += (d >> 16);
- return (d & 0x0000003f);
+ while (d) {
+ count ++;
+ d &= (d - 1);
+ }
#endif
+ return count;
}
static void
@@ -1893,6 +1891,14 @@ major_have_computer_minor_collection_allowance (void)
void **empty_block_arr;
void **rebuild_next;
+#ifdef TARGET_WIN32
+ /*
+ * sgen_free_os_memory () asserts in mono_vfree () because windows doesn't like freeing the middle of
+ * a VirtualAlloc ()-ed block.
+ */
+ return;
+#endif
+
if (num_empty_blocks <= section_reserve)
return;
SGEN_ASSERT (0, num_empty_blocks > 0, "section reserve can't be negative");
diff --git a/mono/metadata/sgen-memory-governor.c b/mono/metadata/sgen-memory-governor.c
index 7dc35fdbe3e..96cb9050115 100644
--- a/mono/metadata/sgen-memory-governor.c
+++ b/mono/metadata/sgen-memory-governor.c
@@ -215,7 +215,7 @@ log_timming (GGTimingInfo *info)
full_timing_buff [0] = '\0';
if (!info->is_overflow)
- sprintf (full_timing_buff, "total %.2fms, bridge %.2f", info->stw_time / 1000.0f, (int)info->bridge_time / 1000.0f);
+ sprintf (full_timing_buff, "total %.2fms, bridge %.2fms", info->stw_time / 1000.0f, (int)info->bridge_time / 1000.0f);
if (info->generation == GENERATION_OLD)
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC, "GC_MAJOR%s: (%s) pause %.2fms, %s major %dK/%dK los %dK/%dK",
info->is_overflow ? "_OVERFLOW" : "",
diff --git a/mono/metadata/sgen-os-mach.c b/mono/metadata/sgen-os-mach.c
index 14290d373d6..41d068b1e51 100644
--- a/mono/metadata/sgen-os-mach.c
+++ b/mono/metadata/sgen-os-mach.c
@@ -116,25 +116,15 @@ sgen_thread_handshake (BOOL suspend)
int count = 0;
FOREACH_THREAD_SAFE (info) {
- if (info->joined_stw == suspend)
- continue;
- info->joined_stw = suspend;
-
if (info == cur_thread || sgen_is_worker_thread (mono_thread_info_get_tid (info)))
continue;
if (info->gc_disabled)
continue;
if (suspend) {
- g_assert (!info->doing_handshake);
- info->doing_handshake = TRUE;
-
if (!sgen_suspend_thread (info))
continue;
} else {
- g_assert (info->doing_handshake);
- info->doing_handshake = FALSE;
-
ret = thread_resume (info->info.native_handle);
if (ret != KERN_SUCCESS)
continue;
diff --git a/mono/metadata/sgen-os-posix.c b/mono/metadata/sgen-os-posix.c
index 64be03ffa92..b0270c049c3 100644
--- a/mono/metadata/sgen-os-posix.c
+++ b/mono/metadata/sgen-os-posix.c
@@ -34,6 +34,7 @@
#include "metadata/gc-internal.h"
#include "metadata/sgen-archdep.h"
#include "metadata/object-internals.h"
+#include "utils/mono-signal-handler.h"
#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__)
const static int suspend_signal_num = SIGXFSZ;
@@ -57,10 +58,9 @@ suspend_thread (SgenThreadInfo *info, void *context)
#endif
gpointer stack_start;
- g_assert (info->doing_handshake);
-
info->stopped_domain = mono_domain_get ();
info->stopped_ip = context ? (gpointer) ARCH_SIGCTX_IP (context) : NULL;
+ info->signal = 0;
stop_count = sgen_global_stop_count;
/* duplicate signal */
if (0 && info->stop_count == stop_count)
@@ -111,7 +111,7 @@ suspend_thread (SgenThreadInfo *info, void *context)
do {
info->signal = 0;
sigsuspend (&suspend_signal_mask);
- } while (info->signal != restart_signal_num && info->doing_handshake);
+ } while (info->signal != restart_signal_num);
/* Unblock the restart signal. */
pthread_sigmask (SIG_UNBLOCK, &suspend_ack_signal_mask, NULL);
@@ -122,49 +122,25 @@ suspend_thread (SgenThreadInfo *info, void *context)
}
/* LOCKING: assumes the GC lock is held (by the stopping thread) */
-static void
-suspend_handler (int sig, siginfo_t *siginfo, void *context)
+MONO_SIGNAL_HANDLER_FUNC (static, suspend_handler, (int sig, siginfo_t *siginfo, void *context))
{
SgenThreadInfo *info;
int old_errno = errno;
info = mono_thread_info_current ();
-
- if (info) {
- suspend_thread (info, context);
- } else {
- /* This can happen while a thread is dying */
- //g_print ("no thread info in suspend\n");
- }
+ suspend_thread (info, context);
errno = old_errno;
}
-static void
-restart_handler (int sig)
+MONO_SIGNAL_HANDLER_FUNC (static, restart_handler, (int sig))
{
SgenThreadInfo *info;
int old_errno = errno;
info = mono_thread_info_current ();
- /*
- If the thread info is null is means we're currently in the process of cleaning up,
- the pthread destructor has already kicked in and it has explicitly invoked the suspend handler.
-
- This means this thread has been suspended, TLS is dead, so the only option we have is to
- rely on pthread_self () and seatch over the thread list.
- */
- if (!info)
- info = (SgenThreadInfo*)mono_thread_info_lookup (pthread_self ());
-
- /*
- * If a thread is dying there might be no thread info. In
- * that case we rely on info->doing_handshake.
- */
- if (info) {
- info->signal = restart_signal_num;
- SGEN_LOG (4, "Restart handler in %p %p", info, (gpointer)mono_native_thread_id_get ());
- }
+ info->signal = restart_signal_num;
+ SGEN_LOG (4, "Restart handler in %p %p", info, (gpointer)mono_native_thread_id_get ());
errno = old_errno;
}
@@ -194,16 +170,6 @@ sgen_wait_for_suspend_ack (int count)
}
}
-gboolean
-sgen_park_current_thread_if_doing_handshake (SgenThreadInfo *p)
-{
- if (!p->doing_handshake)
- return FALSE;
-
- suspend_thread (p, NULL);
- return TRUE;
-}
-
int
sgen_thread_handshake (BOOL suspend)
{
@@ -215,9 +181,6 @@ sgen_thread_handshake (BOOL suspend)
count = 0;
FOREACH_THREAD_SAFE (info) {
- if (info->joined_stw == suspend)
- continue;
- info->joined_stw = suspend;
if (mono_native_thread_id_equals (mono_thread_info_get_tid (info), me)) {
continue;
}
@@ -225,13 +188,6 @@ sgen_thread_handshake (BOOL suspend)
continue;
/*if (signum == suspend_signal_num && info->stop_count == global_stop_count)
continue;*/
- if (suspend) {
- g_assert (!info->doing_handshake);
- info->doing_handshake = TRUE;
- } else {
- g_assert (info->doing_handshake);
- info->doing_handshake = FALSE;
- }
result = mono_threads_pthread_kill (info, signum);
if (result == 0) {
count++;
@@ -242,6 +198,8 @@ sgen_thread_handshake (BOOL suspend)
sgen_wait_for_suspend_ack (count);
+ SGEN_LOG (4, "%s handshake for %d threads\n", suspend ? "suspend" : "resume", count);
+
return count;
}
@@ -260,7 +218,7 @@ sgen_os_init (void)
g_error ("failed sigaction");
}
- sinfo.sa_handler = restart_handler;
+ sinfo.sa_handler = (void*) restart_handler;
if (sigaction (restart_signal_num, &sinfo, NULL) != 0) {
g_error ("failed sigaction");
}
diff --git a/mono/metadata/sgen-os-win32.c b/mono/metadata/sgen-os-win32.c
index a476c73d3b0..cf3ba9d5519 100644..100755
--- a/mono/metadata/sgen-os-win32.c
+++ b/mono/metadata/sgen-os-win32.c
@@ -60,6 +60,17 @@ sgen_suspend_thread (SgenThreadInfo *info)
info->stopped_ip = (gpointer)context.Eip;
info->stack_start = (char*)context.Esp - REDZONE_SIZE;
+#ifdef USE_MONO_CTX
+ memset (&info->ctx, 0, sizeof (MonoContext));
+ info->ctx.edi = context.Edi;
+ info->ctx.esi = context.Esi;
+ info->ctx.ebx = context.Ebx;
+ info->ctx.edx = context.Edx;
+ info->ctx.ecx = context.Ecx;
+ info->ctx.eax = context.Eax;
+ info->ctx.ebp = context.Ebp;
+ info->ctx.esp = context.Esp;
+#else
info->regs [0] = context.Edi;
info->regs [1] = context.Esi;
info->regs [2] = context.Ebx;
@@ -68,6 +79,7 @@ sgen_suspend_thread (SgenThreadInfo *info)
info->regs [5] = context.Eax;
info->regs [6] = context.Ebp;
info->regs [7] = context.Esp;
+#endif
/* Notify the JIT */
if (mono_gc_get_gc_callbacks ()->thread_suspend_func)
@@ -90,23 +102,14 @@ sgen_thread_handshake (BOOL suspend)
int count = 0;
FOREACH_THREAD_SAFE (info) {
- if (info->joined_stw == suspend)
- continue;
- info->joined_stw = suspend;
if (info == current)
continue;
if (info->gc_disabled)
continue;
if (suspend) {
- g_assert (!info->doing_handshake);
- info->doing_handshake = TRUE;
-
if (!sgen_suspend_thread (info))
continue;
} else {
- g_assert (info->doing_handshake);
- info->doing_handshake = FALSE;
-
if (!sgen_resume_thread (info))
continue;
}
diff --git a/mono/metadata/sgen-protocol.c b/mono/metadata/sgen-protocol.c
index 51a9ccf3c98..60feed2d372 100644
--- a/mono/metadata/sgen-protocol.c
+++ b/mono/metadata/sgen-protocol.c
@@ -107,13 +107,8 @@ unlock_recursive (void)
}
static void
-binary_protocol_flush_buffers_rec (BinaryProtocolBuffer *buffer)
+binary_protocol_flush_buffer (BinaryProtocolBuffer *buffer)
{
- if (!buffer)
- return;
-
- binary_protocol_flush_buffers_rec (buffer->next);
-
g_assert (buffer->index > 0);
fwrite (buffer->buffer, 1, buffer->index, binary_protocol_file);
@@ -123,15 +118,30 @@ binary_protocol_flush_buffers_rec (BinaryProtocolBuffer *buffer)
void
binary_protocol_flush_buffers (gboolean force)
{
+ int num_buffers = 0, i;
+ BinaryProtocolBuffer *buf;
+ BinaryProtocolBuffer **bufs;
+
if (!binary_protocol_file)
return;
if (!force && !try_lock_exclusive ())
return;
- binary_protocol_flush_buffers_rec (binary_protocol_buffers);
+ for (buf = binary_protocol_buffers; buf != NULL; buf = buf->next)
+ ++num_buffers;
+ bufs = sgen_alloc_internal_dynamic (num_buffers * sizeof (BinaryProtocolBuffer*), INTERNAL_MEM_BINARY_PROTOCOL, TRUE);
+ for (buf = binary_protocol_buffers, i = 0; buf != NULL; buf = buf->next, i++)
+ bufs [i] = buf;
+ SGEN_ASSERT (0, i == num_buffers, "Binary protocol buffer count error");
+
binary_protocol_buffers = NULL;
+ for (i = num_buffers - 1; i >= 0; --i)
+ binary_protocol_flush_buffer (bufs [i]);
+
+ sgen_free_internal_dynamic (buf, num_buffers * sizeof (BinaryProtocolBuffer*), INTERNAL_MEM_BINARY_PROTOCOL);
+
if (!force)
unlock_exclusive ();
@@ -368,12 +378,40 @@ binary_protocol_cement_reset (void)
}
void
-binary_protocol_dislink_update (gpointer link, gpointer obj, int track)
+binary_protocol_dislink_update (gpointer link, gpointer obj, int track, int staged)
{
- SGenProtocolDislinkUpdate entry = { link, obj, track };
+ SGenProtocolDislinkUpdate entry = { link, obj, track, staged };
protocol_entry (SGEN_PROTOCOL_DISLINK_UPDATE, &entry, sizeof (SGenProtocolDislinkUpdate));
}
+void
+binary_protocol_dislink_update_staged (gpointer link, gpointer obj, int track, int index)
+{
+ SGenProtocolDislinkUpdateStaged entry = { link, obj, track, index };
+ protocol_entry (SGEN_PROTOCOL_DISLINK_UPDATE_STAGED, &entry, sizeof (SGenProtocolDislinkUpdateStaged));
+}
+
+void
+binary_protocol_dislink_process_staged (gpointer link, gpointer obj, int index)
+{
+ SGenProtocolDislinkProcessStaged entry = { link, obj, index };
+ protocol_entry (SGEN_PROTOCOL_DISLINK_PROCESS_STAGED, &entry, sizeof (SGenProtocolDislinkProcessStaged));
+}
+
+void
+binary_protocol_domain_unload_begin (gpointer domain)
+{
+ SGenProtocolDomainUnload entry = { domain };
+ protocol_entry (SGEN_PROTOCOL_DOMAIN_UNLOAD_BEGIN, &entry, sizeof (SGenProtocolDomainUnload));
+}
+
+void
+binary_protocol_domain_unload_end (gpointer domain)
+{
+ SGenProtocolDomainUnload entry = { domain };
+ protocol_entry (SGEN_PROTOCOL_DOMAIN_UNLOAD_END, &entry, sizeof (SGenProtocolDomainUnload));
+}
+
#endif
#endif /* HAVE_SGEN_GC */
diff --git a/mono/metadata/sgen-protocol.h b/mono/metadata/sgen-protocol.h
index 7b9dff67965..18355075cbf 100644
--- a/mono/metadata/sgen-protocol.h
+++ b/mono/metadata/sgen-protocol.h
@@ -49,7 +49,11 @@ enum {
SGEN_PROTOCOL_CARD_SCAN,
SGEN_PROTOCOL_CEMENT,
SGEN_PROTOCOL_CEMENT_RESET,
- SGEN_PROTOCOL_DISLINK_UPDATE
+ SGEN_PROTOCOL_DISLINK_UPDATE,
+ SGEN_PROTOCOL_DISLINK_UPDATE_STAGED,
+ SGEN_PROTOCOL_DISLINK_PROCESS_STAGED,
+ SGEN_PROTOCOL_DOMAIN_UNLOAD_BEGIN,
+ SGEN_PROTOCOL_DOMAIN_UNLOAD_END
};
typedef struct {
@@ -167,8 +171,26 @@ typedef struct {
gpointer link;
gpointer obj;
int track;
+ int staged;
} SGenProtocolDislinkUpdate;
+typedef struct {
+ gpointer link;
+ gpointer obj;
+ int track;
+ int index;
+} SGenProtocolDislinkUpdateStaged;
+
+typedef struct {
+ gpointer link;
+ gpointer obj;
+ int index;
+} SGenProtocolDislinkProcessStaged;
+
+typedef struct {
+ gpointer domain;
+} SGenProtocolDomainUnload;
+
/* missing: finalizers, dislinks, roots, non-store wbarriers */
void binary_protocol_init (const char *filename) MONO_INTERNAL;
@@ -201,7 +223,11 @@ void binary_protocol_missing_remset (gpointer obj, gpointer obj_vtable, int offs
void binary_protocol_card_scan (gpointer start, int size) MONO_INTERNAL;
void binary_protocol_cement (gpointer ptr, gpointer vtable, int size) MONO_INTERNAL;
void binary_protocol_cement_reset (void) MONO_INTERNAL;
-void binary_protocol_dislink_update (gpointer link, gpointer obj, int track) MONO_INTERNAL;
+void binary_protocol_dislink_update (gpointer link, gpointer obj, int track, int staged) MONO_INTERNAL;
+void binary_protocol_dislink_update_staged (gpointer link, gpointer obj, int track, int index) MONO_INTERNAL;
+void binary_protocol_dislink_process_staged (gpointer link, gpointer obj, int index) MONO_INTERNAL;
+void binary_protocol_domain_unload_begin (gpointer domain) MONO_INTERNAL;
+void binary_protocol_domain_unload_end (gpointer domain) MONO_INTERNAL;
#else
@@ -232,6 +258,10 @@ void binary_protocol_dislink_update (gpointer link, gpointer obj, int track) MON
#define binary_protocol_card_scan(start, size)
#define binary_protocol_cement(ptr, vtable, size)
#define binary_protocol_cement_reset()
-#define binary_protocol_dislink_update(link,obj,track)
+#define binary_protocol_dislink_update(link,obj,track,staged)
+#define binary_protocol_dislink_update_staged(link,obj,track,index)
+#define binary_protocol_dislink_process_staged(link,obj,index)
+#define binary_protocol_domain_unload_begin(domain)
+#define binary_protocol_domain_unload_end(domain)
#endif
diff --git a/mono/metadata/sgen-stw.c b/mono/metadata/sgen-stw.c
index eb24a351a30..0f52505544c 100644..100755
--- a/mono/metadata/sgen-stw.c
+++ b/mono/metadata/sgen-stw.c
@@ -58,7 +58,7 @@ static void
update_current_thread_stack (void *start)
{
int stack_guard = 0;
-#ifndef USE_MONO_CTX
+#if !defined(USE_MONO_CTX)
void *reg_ptr = cur_thread_regs;
#endif
SgenThreadInfo *info = mono_thread_info_current ();
@@ -91,11 +91,17 @@ is_ip_in_managed_allocator (MonoDomain *domain, gpointer ip)
return FALSE;
if (!sgen_has_critical_method ())
return FALSE;
- ji = mono_jit_info_table_find (domain, ip);
+
+ /*
+ * mono_jit_info_table_find is not async safe since it calls into the AOT runtime to load information for
+ * missing methods (#13951). To work around this, we disable the AOT fallback. For this to work, the JIT needs
+ * to register the jit info for all GC critical methods after they are JITted/loaded.
+ */
+ ji = mono_jit_info_table_find_internal (domain, ip, FALSE);
if (!ji)
return FALSE;
- return sgen_is_critical_method (ji->method);
+ return sgen_is_critical_method (mono_jit_info_get_method (ji));
}
static int
@@ -111,9 +117,9 @@ restart_threads_until_none_in_managed_allocator (void)
allocator */
FOREACH_THREAD_SAFE (info) {
gboolean result;
- if (info->skip || info->gc_disabled || !info->joined_stw)
+ if (info->skip || info->gc_disabled)
continue;
- if (!info->thread_is_dying && (!info->stack_start || info->in_critical_region || info->info.inside_critical_region ||
+ if (mono_thread_info_run_state (info) == STATE_RUNNING && (!info->stack_start || info->in_critical_region || info->info.inside_critical_region ||
is_ip_in_managed_allocator (info->stopped_domain, info->stopped_ip))) {
binary_protocol_thread_restart ((gpointer)mono_thread_info_get_tid (info));
SGEN_LOG (3, "thread %p resumed.", (void*) (size_t) info->info.native_handle);
@@ -189,18 +195,6 @@ release_gc_locks (void)
UNLOCK_INTERRUPTION;
}
-static void
-stw_bridge_process (void)
-{
- sgen_bridge_processing_stw_step ();
-}
-
-static void
-bridge_process (int generation)
-{
- sgen_bridge_processing_finish (generation);
-}
-
static TV_DECLARE (stop_world_time);
static unsigned long max_pause_usec = 0;
@@ -263,9 +257,6 @@ sgen_restart_world (int generation, GGTimingInfo *timing)
#endif
} END_FOREACH_THREAD
- stw_bridge_process ();
- release_gc_locks ();
-
count = sgen_thread_handshake (FALSE);
TV_GETTIME (end_sw);
usec = TV_ELAPSED (stop_world_time, end_sw);
@@ -274,9 +265,21 @@ sgen_restart_world (int generation, GGTimingInfo *timing)
mono_profiler_gc_event (MONO_GC_EVENT_POST_START_WORLD, generation);
MONO_GC_WORLD_RESTART_END (generation);
+ /*
+ * We must release the thread info suspend lock after doing
+ * the thread handshake. Otherwise, if the GC stops the world
+ * and a thread is in the process of starting up, but has not
+ * yet registered (it's not in the thread_list), it is
+ * possible that the thread does register while the world is
+ * stopped. When restarting the GC will then try to restart
+ * said thread, but since it never got the suspend signal, it
+ * cannot answer the restart signal, so a deadlock results.
+ */
+ release_gc_locks ();
+
mono_thread_hazardous_try_free_some ();
- bridge_process (generation);
+ sgen_bridge_processing_finish (generation);
TV_GETTIME (end_bridge);
bridge_usec = TV_ELAPSED (end_sw, end_bridge);
diff --git a/mono/metadata/sgen-toggleref.c b/mono/metadata/sgen-toggleref.c
index a05c1776035..7407e9d70e0 100644
--- a/mono/metadata/sgen-toggleref.c
+++ b/mono/metadata/sgen-toggleref.c
@@ -136,7 +136,7 @@ ensure_toggleref_capacity (int capacity)
MonoGCToggleRef *tmp;
int old_capacity = toggleref_array_capacity;
while (toggleref_array_capacity < toggleref_array_size + capacity)
- toggleref_array_size *= 2;
+ toggleref_array_capacity *= 2;
tmp = sgen_alloc_internal_dynamic (
toggleref_array_capacity * sizeof (MonoGCToggleRef),
diff --git a/mono/metadata/socket-io.c b/mono/metadata/socket-io.c
index 750ff2caccc..6509d091a94 100644
--- a/mono/metadata/socket-io.c
+++ b/mono/metadata/socket-io.c
@@ -26,7 +26,9 @@
#include <errno.h>
#include <sys/types.h>
-#ifndef HOST_WIN32
+#ifdef HOST_WIN32
+#include <ws2tcpip.h>
+#else
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
@@ -104,6 +106,15 @@
#define AI_ADDRCONFIG 0
#endif
+#ifdef __APPLE__
+/*
+ * We remove this until we have a Darwin implementation
+ * that can walk the result of struct ifconf. The current
+ * implementation only works for Linux
+ */
+#undef HAVE_SIOCGIFCONF
+#endif
+
static gint32 convert_family(MonoAddressFamily mono_family)
{
gint32 family=-1;
@@ -813,7 +824,8 @@ gint32 ves_icall_System_Net_Sockets_Socket_Available_internal(SOCKET sock,
MONO_ARCH_SAVE_REGS;
*error = 0;
-
+
+ /* FIXME: this might require amount to be unsigned long. */
ret=ioctlsocket(sock, FIONREAD, &amount);
if(ret==SOCKET_ERROR) {
*error = WSAGetLastError ();
@@ -1402,19 +1414,13 @@ extern void ves_icall_System_Net_Sockets_Socket_Disconnect_internal(SOCKET sock,
*/
_wapi_disconnectex = NULL;
- /* Look up the TransmitFile extension function pointer
- * instead of calling TransmitFile() directly, because
- * apparently "Several of the extension functions have
- * been available since WinSock 1.1 and are exported
- * from MSWsock.dll, however it's not advisable to
- * link directly to this dll as this ties you to the
- * Microsoft WinSock provider. A provider neutral way
- * of accessing these extension functions is to load
- * them dynamically via WSAIoctl using the
- * SIO_GET_EXTENSION_FUNCTION_POINTER op code. This
- * should, theoretically, allow you to access these
- * functions from any provider that supports them..."
- * (http://www.codeproject.com/internet/jbsocketserver3.asp)
+ /*
+ * Use the SIO_GET_EXTENSION_FUNCTION_POINTER to
+ * determine the address of the disconnect method without
+ * taking a hard dependency on a single provider
+ *
+ * For an explanation of why this is done, you can read
+ * the article at http://www.codeproject.com/internet/jbsocketserver3.asp
*/
ret = WSAIoctl (sock, SIO_GET_EXTENSION_FUNCTION_POINTER,
(void *)&trans_guid, sizeof(GUID),
@@ -3137,7 +3143,7 @@ extern MonoBoolean ves_icall_System_Net_Dns_GetHostByAddr_internal(MonoString *a
struct sockaddr_in6 saddr6;
struct addrinfo *info = NULL, hints;
gint32 family;
- char hostname[1024] = {0};
+ char hostname[NI_MAXHOST] = {0};
int flags = 0;
#else
struct in_addr inaddr;
diff --git a/mono/metadata/threadpool.c b/mono/metadata/threadpool.c
index 811c2852045..8710dafd661 100644
--- a/mono/metadata/threadpool.c
+++ b/mono/metadata/threadpool.c
@@ -19,6 +19,7 @@
#include <mono/metadata/threadpool-internals.h>
#include <mono/metadata/exception.h>
#include <mono/metadata/environment.h>
+#include <mono/metadata/mono-config.h>
#include <mono/metadata/mono-mlist.h>
#include <mono/metadata/mono-perfcounters.h>
#include <mono/metadata/socket-io.h>
@@ -89,7 +90,7 @@ typedef struct {
gint event_system;
gpointer event_data;
- void (*modify) (gpointer event_data, int fd, int operation, int events, gboolean is_new);
+ void (*modify) (gpointer p, int fd, int operation, int events, gboolean is_new);
void (*wait) (gpointer sock_data);
void (*shutdown) (gpointer event_data);
} SocketIOData;
@@ -152,6 +153,7 @@ static void socket_io_cleanup (SocketIOData *data);
static MonoObject *get_io_event (MonoMList **list, gint event);
static int get_events_from_list (MonoMList *list);
static int get_event_from_state (MonoSocketAsyncResult *state);
+static void check_for_interruption_critical (void);
static MonoClass *async_call_klass;
static MonoClass *socket_async_call_klass;
@@ -557,8 +559,8 @@ socket_io_add (MonoAsyncResult *ares, MonoSocketAsyncResult *state)
mono_g_hash_table_replace (data->sock_to_state, state->handle, list);
ievt = get_events_from_list (list);
- LeaveCriticalSection (&data->io_lock);
- data->modify (data->event_data, fd, state->operation, ievt, is_new);
+ /* The modify function leaves the io_lock critical section. */
+ data->modify (data, fd, state->operation, ievt, is_new);
}
#ifndef DISABLE_SOCKETS
@@ -1070,8 +1072,10 @@ threadpool_append_jobs (ThreadPool *tp, MonoObject **jobs, gint njobs)
}
/* Create on demand up to min_threads to avoid startup penalty for apps that don't use
* the threadpool that much
- * mono_thread_create_internal (mono_get_root_domain (), threadpool_start_idle_threads, tp, TRUE, FALSE, SMALL_STACK);
- */
+ */
+ if (mono_config_is_server_mode ()) {
+ mono_thread_create_internal (mono_get_root_domain (), threadpool_start_idle_threads, tp, TRUE, FALSE, SMALL_STACK);
+ }
}
for (i = 0; i < njobs; i++) {
@@ -1392,25 +1396,62 @@ should_i_die (ThreadPool *tp)
}
static void
+set_tp_thread_info (ThreadPool *tp)
+{
+ const gchar *name;
+ MonoInternalThread *thread = mono_thread_internal_current ();
+
+ mono_profiler_thread_start (thread->tid);
+ name = (tp->is_io) ? "IO Threadpool worker" : "Threadpool worker";
+ mono_thread_set_name_internal (thread, mono_string_new (mono_domain_get (), name), FALSE);
+}
+
+static void
+clear_thread_state (void)
+{
+ MonoInternalThread *thread = mono_thread_internal_current ();
+ /* If the callee changes the background status, set it back to TRUE */
+ mono_thread_clr_state (thread , ~ThreadState_Background);
+ if (!mono_thread_test_state (thread , ThreadState_Background))
+ ves_icall_System_Threading_Thread_SetState (thread, ThreadState_Background);
+}
+
+static void
+check_for_interruption_critical (void)
+{
+ MonoInternalThread *thread;
+ /*RULE NUMBER ONE OF SKIP_THREAD: NEVER POKE MANAGED STATE.*/
+ mono_gc_set_skip_thread (FALSE);
+
+ thread = mono_thread_internal_current ();
+ if (THREAD_WANTS_A_BREAK (thread))
+ mono_thread_interruption_checkpoint ();
+
+ /*RULE NUMBER TWO OF SKIP_THREAD: READ RULE NUMBER ONE.*/
+ mono_gc_set_skip_thread (TRUE);
+}
+
+static void
+fire_profiler_thread_end (void)
+{
+ MonoInternalThread *thread = mono_thread_internal_current ();
+ mono_profiler_thread_end (thread->tid);
+}
+
+static void
async_invoke_thread (gpointer data)
{
MonoDomain *domain;
- MonoInternalThread *thread;
MonoWSQ *wsq;
ThreadPool *tp;
gboolean must_die;
- const gchar *name;
tp = data;
wsq = NULL;
if (!tp->is_io)
wsq = add_wsq ();
- thread = mono_thread_internal_current ();
-
- mono_profiler_thread_start (thread->tid);
- name = (tp->is_io) ? "IO Threadpool worker" : "Threadpool worker";
- mono_thread_set_name_internal (thread, mono_string_new (mono_domain_get (), name), FALSE);
+ set_tp_thread_info (tp);
if (tp_start_func)
tp_start_func (tp_hooks_user_data);
@@ -1492,10 +1533,7 @@ async_invoke_thread (gpointer data)
}
mono_thread_pop_appdomain_ref ();
InterlockedDecrement (&tp->busy_threads);
- /* If the callee changes the background status, set it back to TRUE */
- mono_thread_clr_state (thread , ~ThreadState_Background);
- if (!mono_thread_test_state (thread , ThreadState_Background))
- ves_icall_System_Threading_Thread_SetState (thread, ThreadState_Background);
+ clear_thread_state ();
}
}
@@ -1528,8 +1566,7 @@ async_invoke_thread (gpointer data)
#endif
if (mono_runtime_is_shutting_down ())
break;
- if (THREAD_WANTS_A_BREAK (thread))
- mono_thread_interruption_checkpoint ();
+ check_for_interruption_critical ();
}
InterlockedDecrement (&tp->waiting);
@@ -1566,7 +1603,7 @@ async_invoke_thread (gpointer data)
remove_wsq (wsq);
}
- mono_profiler_thread_end (thread->tid);
+ fire_profiler_thread_end ();
if (tp_finish_func)
tp_finish_func (tp_hooks_user_data);
diff --git a/mono/metadata/threadpool.h b/mono/metadata/threadpool.h
index 811924b97cc..81cea4ce1d4 100644
--- a/mono/metadata/threadpool.h
+++ b/mono/metadata/threadpool.h
@@ -47,10 +47,10 @@ ves_icall_System_Threading_ThreadPool_SetMaxThreads (gint workerThreads,
gint completionPortThreads) MONO_INTERNAL;
typedef void (*MonoThreadPoolFunc) (gpointer user_data);
-void mono_install_threadpool_thread_hooks (MonoThreadPoolFunc start_func, MonoThreadPoolFunc finish_func, gpointer user_data);
+MONO_API void mono_install_threadpool_thread_hooks (MonoThreadPoolFunc start_func, MonoThreadPoolFunc finish_func, gpointer user_data);
typedef void (*MonoThreadPoolItemFunc) (gpointer user_data);
-void mono_install_threadpool_item_hooks (MonoThreadPoolItemFunc begin_func, MonoThreadPoolItemFunc end_func, gpointer user_data);
+MONO_API void mono_install_threadpool_item_hooks (MonoThreadPoolItemFunc begin_func, MonoThreadPoolItemFunc end_func, gpointer user_data);
#endif
diff --git a/mono/metadata/threads-types.h b/mono/metadata/threads-types.h
index 8ebc5391834..cf567afba74 100644
--- a/mono/metadata/threads-types.h
+++ b/mono/metadata/threads-types.h
@@ -140,6 +140,7 @@ gint16 ves_icall_System_Threading_Thread_VolatileRead2 (void *ptr) MONO_INTERNAL
gint32 ves_icall_System_Threading_Thread_VolatileRead4 (void *ptr) MONO_INTERNAL;
gint64 ves_icall_System_Threading_Thread_VolatileRead8 (void *ptr) MONO_INTERNAL;
void * ves_icall_System_Threading_Thread_VolatileReadIntPtr (void *ptr) MONO_INTERNAL;
+void * ves_icall_System_Threading_Thread_VolatileReadObject (void *ptr) MONO_INTERNAL;
double ves_icall_System_Threading_Thread_VolatileReadDouble (void *ptr) MONO_INTERNAL;
float ves_icall_System_Threading_Thread_VolatileReadFloat (void *ptr) MONO_INTERNAL;
@@ -148,11 +149,26 @@ void ves_icall_System_Threading_Thread_VolatileWrite2 (void *ptr, gint16) MONO_I
void ves_icall_System_Threading_Thread_VolatileWrite4 (void *ptr, gint32) MONO_INTERNAL;
void ves_icall_System_Threading_Thread_VolatileWrite8 (void *ptr, gint64) MONO_INTERNAL;
void ves_icall_System_Threading_Thread_VolatileWriteIntPtr (void *ptr, void *) MONO_INTERNAL;
-void ves_icall_System_Threading_Thread_VolatileWriteObject (void *ptr, void *) MONO_INTERNAL;
+void ves_icall_System_Threading_Thread_VolatileWriteObject (void *ptr, MonoObject *) MONO_INTERNAL;
void ves_icall_System_Threading_Thread_VolatileWriteFloat (void *ptr, float) MONO_INTERNAL;
void ves_icall_System_Threading_Thread_VolatileWriteDouble (void *ptr, double) MONO_INTERNAL;
+gint8 ves_icall_System_Threading_Volatile_Read1 (void *ptr) MONO_INTERNAL;
+gint16 ves_icall_System_Threading_Volatile_Read2 (void *ptr) MONO_INTERNAL;
+gint32 ves_icall_System_Threading_Volatile_Read4 (void *ptr) MONO_INTERNAL;
+gint64 ves_icall_System_Threading_Volatile_Read8 (void *ptr) MONO_INTERNAL;
+void * ves_icall_System_Threading_Volatile_ReadIntPtr (void *ptr) MONO_INTERNAL;
+double ves_icall_System_Threading_Volatile_ReadDouble (void *ptr) MONO_INTERNAL;
+float ves_icall_System_Threading_Volatile_ReadFloat (void *ptr) MONO_INTERNAL;
MonoObject* ves_icall_System_Threading_Volatile_Read_T (void *ptr) MONO_INTERNAL;
+
+void ves_icall_System_Threading_Volatile_Write1 (void *ptr, gint8) MONO_INTERNAL;
+void ves_icall_System_Threading_Volatile_Write2 (void *ptr, gint16) MONO_INTERNAL;
+void ves_icall_System_Threading_Volatile_Write4 (void *ptr, gint32) MONO_INTERNAL;
+void ves_icall_System_Threading_Volatile_Write8 (void *ptr, gint64) MONO_INTERNAL;
+void ves_icall_System_Threading_Volatile_WriteIntPtr (void *ptr, void *) MONO_INTERNAL;
+void ves_icall_System_Threading_Volatile_WriteFloat (void *ptr, float) MONO_INTERNAL;
+void ves_icall_System_Threading_Volatile_WriteDouble (void *ptr, double) MONO_INTERNAL;
void ves_icall_System_Threading_Volatile_Write_T (void *ptr, MonoObject *value) MONO_INTERNAL;
void ves_icall_System_Threading_Thread_MemoryBarrier (void) MONO_INTERNAL;
@@ -187,7 +203,7 @@ void mono_threads_set_shutting_down (void) MONO_INTERNAL;
gunichar2* mono_thread_get_name (MonoInternalThread *this_obj, guint32 *name_len) MONO_INTERNAL;
-MonoException* mono_thread_get_undeniable_exception (void);
+MONO_API MonoException* mono_thread_get_undeniable_exception (void);
MonoException* mono_thread_get_and_clear_pending_exception (void) MONO_INTERNAL;
diff --git a/mono/metadata/threads.c b/mono/metadata/threads.c
index 172b5ddfeac..81f8b5c7b0f 100644..100755
--- a/mono/metadata/threads.c
+++ b/mono/metadata/threads.c
@@ -48,6 +48,7 @@
#include <mono/utils/hazard-pointer.h>
#include <mono/utils/mono-tls.h>
#include <mono/utils/atomic.h>
+#include <mono/utils/mono-memory-model.h>
#include <mono/metadata/gc-internal.h>
@@ -814,10 +815,12 @@ mono_thread_create (MonoDomain *domain, gpointer func, gpointer arg)
static __inline__ __attribute__((always_inline))
/* This is not defined by gcc */
unsigned long long
-__readfsdword (unsigned long long offset)
+__readfsdword (unsigned long offset)
{
- unsigned long long value;
- __asm__("movl %%fs:%a[offset], %k[value]" : [value] "=q" (value) : [offset] "irm" (offset));
+ unsigned long value;
+ // __asm__("movl %%fs:%a[offset], %k[value]" : [value] "=q" (value) : [offset] "irm" (offset));
+ __asm__ volatile ("movl %%fs:%1,%0"
+ : "=r" (value) ,"=m" ((*(volatile long *) offset)));
return value;
}
#endif
@@ -831,16 +834,8 @@ __readfsdword (unsigned long long offset)
void
mono_thread_get_stack_bounds (guint8 **staddr, size_t *stsize)
{
-#if defined(HAVE_PTHREAD_GET_STACKSIZE_NP) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
- *staddr = (guint8*)pthread_get_stackaddr_np (pthread_self ());
- *stsize = pthread_get_stacksize_np (pthread_self ());
-
- /* staddr points to the start of the stack, not the end */
- *staddr -= *stsize;
- *staddr = (guint8*)((gssize)*staddr & ~(mono_pagesize () - 1));
- return;
- /* FIXME: simplify the mess below */
-#elif defined(HOST_WIN32)
+#if defined(HOST_WIN32)
+ /* Windows */
/* http://en.wikipedia.org/wiki/Win32_Thread_Information_Block */
void* tib = (void*)__readfsdword(0x18);
guint8 *stackTop = (guint8*)*(int*)((char*)tib + 4);
@@ -849,7 +844,22 @@ mono_thread_get_stack_bounds (guint8 **staddr, size_t *stsize)
*staddr = stackBottom;
*stsize = stackTop - stackBottom;
return;
-#else
+
+#elif defined(HAVE_PTHREAD_GET_STACKSIZE_NP) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
+ /* Mac OS X */
+ *staddr = (guint8*)pthread_get_stackaddr_np (pthread_self());
+ *stsize = pthread_get_stacksize_np (pthread_self());
+
+ /* staddr points to the start of the stack, not the end */
+ *staddr -= *stsize;
+
+ /* When running under emacs, sometimes staddr is not aligned to a page size */
+ *staddr = (guint8*)((gssize)*staddr & ~(mono_pagesize() - 1));
+ return;
+
+#elif (defined(HAVE_PTHREAD_GETATTR_NP) || defined(HAVE_PTHREAD_ATTR_GET_NP)) && defined(HAVE_PTHREAD_ATTR_GETSTACK)
+ /* Linux, BSD */
+
pthread_attr_t attr;
guint8 *current = (guint8*)&attr;
@@ -857,15 +867,41 @@ mono_thread_get_stack_bounds (guint8 **staddr, size_t *stsize)
*stsize = (size_t)-1;
pthread_attr_init (&attr);
-# ifdef HAVE_PTHREAD_GETATTR_NP
+
+#if defined(HAVE_PTHREAD_GETATTR_NP)
+ /* Linux */
pthread_getattr_np (pthread_self(), &attr);
-# else
-# ifdef HAVE_PTHREAD_ATTR_GET_NP
+
+#elif defined(HAVE_PTHREAD_ATTR_GET_NP)
+ /* BSD */
pthread_attr_get_np (pthread_self(), &attr);
-# elif defined(sun)
+
+#else
+#error Cannot determine which API is needed to retrieve pthread attributes.
+#endif
+
+ pthread_attr_getstack (&attr, (void**)staddr, stsize);
+ pthread_attr_destroy (&attr);
+
+ if (*staddr)
+ g_assert ((current > *staddr) && (current < *staddr + *stsize));
+
+ /* When running under emacs, sometimes staddr is not aligned to a page size */
+ *staddr = (guint8*)((gssize)*staddr & ~(mono_pagesize () - 1));
+ return;
+
+#elif defined(__OpenBSD__)
+ /* OpenBSD */
+ /* TODO : Determine if this code is actually still needed. It may already be covered by the case above. */
+
+ pthread_attr_t attr;
+ guint8 *current = (guint8*)&attr;
+
*staddr = NULL;
- pthread_attr_getstacksize (&attr, &stsize);
-# elif defined(__OpenBSD__)
+ *stsize = (size_t)-1;
+
+ pthread_attr_init (&attr);
+
stack_t ss;
int rslt;
@@ -874,29 +910,33 @@ mono_thread_get_stack_bounds (guint8 **staddr, size_t *stsize)
*staddr = (guint8*)((size_t)ss.ss_sp - ss.ss_size);
*stsize = ss.ss_size;
-# else
- *staddr = NULL;
- *stsize = 0;
- return;
-# endif
-# endif
-# if !defined(sun)
-# if defined(__native_client__)
- *staddr = NULL;
- pthread_attr_getstacksize (&attr, &stsize);
-# elif !defined(__OpenBSD__)
- pthread_attr_getstack (&attr, (void**)staddr, stsize);
-# endif
+ pthread_attr_destroy (&attr);
+
if (*staddr)
g_assert ((current > *staddr) && (current < *staddr + *stsize));
-# endif
-
- pthread_attr_destroy (&attr);
-#endif
/* When running under emacs, sometimes staddr is not aligned to a page size */
*staddr = (guint8*)((gssize)*staddr & ~(mono_pagesize () - 1));
+ return;
+
+#elif defined(sun) || defined(__native_client__)
+ /* Solaris/Illumos, NaCl */
+ pthread_attr_t attr;
+ pthread_attr_init (&attr);
+ pthread_attr_getstacksize (&attr, &stsize);
+ pthread_attr_destroy (&attr);
+ *staddr = NULL;
+ return;
+
+#else
+ /* FIXME: It'd be better to use the 'error' preprocessor macro here so we know
+ at compile-time if the target platform isn't supported. */
+#warning "Unable to determine how to retrieve a thread's stack-bounds for this platform in 'mono_thread_get_stack_bounds()'."
+ *staddr = NULL;
+ *stsize = 0;
+ return;
+#endif
}
MonoThread *
@@ -1143,8 +1183,6 @@ HANDLE ves_icall_System_Threading_Thread_Thread_internal(MonoThread *this,
void ves_icall_System_Threading_InternalThread_Thread_free_internal (MonoInternalThread *this, HANDLE thread)
{
- MONO_ARCH_SAVE_REGS;
-
THREAD_DEBUG (g_message ("%s: Closing thread %p, handle %p", __func__, this, thread));
if (thread)
@@ -1234,8 +1272,6 @@ void ves_icall_System_Threading_Thread_SpinWait_nop (void)
gint32
ves_icall_System_Threading_Thread_GetDomainID (void)
{
- MONO_ARCH_SAVE_REGS;
-
return mono_domain_get()->domain_id;
}
@@ -1601,8 +1637,6 @@ ves_icall_System_Threading_WaitHandle_SignalAndWait_Internal (HANDLE toSignal, H
guint32 ret;
MonoInternalThread *thread = mono_thread_internal_current ();
- MONO_ARCH_SAVE_REGS;
-
if (ms == -1)
ms = INFINITE;
@@ -1621,8 +1655,6 @@ HANDLE ves_icall_System_Threading_Mutex_CreateMutex_internal (MonoBoolean owned,
{
HANDLE mutex;
- MONO_ARCH_SAVE_REGS;
-
*created = TRUE;
if (name == NULL) {
@@ -1639,8 +1671,6 @@ HANDLE ves_icall_System_Threading_Mutex_CreateMutex_internal (MonoBoolean owned,
}
MonoBoolean ves_icall_System_Threading_Mutex_ReleaseMutex_internal (HANDLE handle ) {
- MONO_ARCH_SAVE_REGS;
-
return(ReleaseMutex (handle));
}
@@ -1650,8 +1680,6 @@ HANDLE ves_icall_System_Threading_Mutex_OpenMutex_internal (MonoString *name,
{
HANDLE ret;
- MONO_ARCH_SAVE_REGS;
-
*error = ERROR_SUCCESS;
ret = OpenMutex (rights, FALSE, mono_string_chars (name));
@@ -1667,8 +1695,6 @@ HANDLE ves_icall_System_Threading_Semaphore_CreateSemaphore_internal (gint32 ini
{
HANDLE sem;
- MONO_ARCH_SAVE_REGS;
-
*created = TRUE;
if (name == NULL) {
@@ -1689,8 +1715,6 @@ gint32 ves_icall_System_Threading_Semaphore_ReleaseSemaphore_internal (HANDLE ha
{
gint32 prevcount;
- MONO_ARCH_SAVE_REGS;
-
*fail = !ReleaseSemaphore (handle, releaseCount, &prevcount);
return (prevcount);
@@ -1700,8 +1724,6 @@ HANDLE ves_icall_System_Threading_Semaphore_OpenSemaphore_internal (MonoString *
{
HANDLE ret;
- MONO_ARCH_SAVE_REGS;
-
*error = ERROR_SUCCESS;
ret = OpenSemaphore (rights, FALSE, mono_string_chars (name));
@@ -1716,8 +1738,6 @@ HANDLE ves_icall_System_Threading_Events_CreateEvent_internal (MonoBoolean manua
{
HANDLE event;
- MONO_ARCH_SAVE_REGS;
-
*created = TRUE;
if (name == NULL) {
@@ -1735,21 +1755,15 @@ HANDLE ves_icall_System_Threading_Events_CreateEvent_internal (MonoBoolean manua
}
gboolean ves_icall_System_Threading_Events_SetEvent_internal (HANDLE handle) {
- MONO_ARCH_SAVE_REGS;
-
return (SetEvent(handle));
}
gboolean ves_icall_System_Threading_Events_ResetEvent_internal (HANDLE handle) {
- MONO_ARCH_SAVE_REGS;
-
return (ResetEvent(handle));
}
void
ves_icall_System_Threading_Events_CloseEvent_internal (HANDLE handle) {
- MONO_ARCH_SAVE_REGS;
-
CloseHandle (handle);
}
@@ -1759,8 +1773,6 @@ HANDLE ves_icall_System_Threading_Events_OpenEvent_internal (MonoString *name,
{
HANDLE ret;
- MONO_ARCH_SAVE_REGS;
-
*error = ERROR_SUCCESS;
ret = OpenEvent (rights, FALSE, mono_string_chars (name));
@@ -1773,53 +1785,26 @@ HANDLE ves_icall_System_Threading_Events_OpenEvent_internal (MonoString *name,
gint32 ves_icall_System_Threading_Interlocked_Increment_Int (gint32 *location)
{
- MONO_ARCH_SAVE_REGS;
-
return InterlockedIncrement (location);
}
gint64 ves_icall_System_Threading_Interlocked_Increment_Long (gint64 *location)
{
- gint64 ret;
-
- MONO_ARCH_SAVE_REGS;
-
- mono_interlocked_lock ();
-
- ret = ++ *location;
-
- mono_interlocked_unlock ();
-
-
- return ret;
+ return InterlockedIncrement64 (location);
}
gint32 ves_icall_System_Threading_Interlocked_Decrement_Int (gint32 *location)
{
- MONO_ARCH_SAVE_REGS;
-
return InterlockedDecrement(location);
}
gint64 ves_icall_System_Threading_Interlocked_Decrement_Long (gint64 * location)
{
- gint64 ret;
-
- MONO_ARCH_SAVE_REGS;
-
- mono_interlocked_lock ();
-
- ret = -- *location;
-
- mono_interlocked_unlock ();
-
- return ret;
+ return InterlockedDecrement64 (location);
}
gint32 ves_icall_System_Threading_Interlocked_Exchange_Int (gint32 *location, gint32 value)
{
- MONO_ARCH_SAVE_REGS;
-
return InterlockedExchange(location, value);
}
@@ -1840,8 +1825,6 @@ gfloat ves_icall_System_Threading_Interlocked_Exchange_Single (gfloat *location,
{
IntFloatUnion val, ret;
- MONO_ARCH_SAVE_REGS;
-
val.fval = value;
ret.ival = InterlockedExchange((gint32 *) location, val.ival);
@@ -1851,54 +1834,22 @@ gfloat ves_icall_System_Threading_Interlocked_Exchange_Single (gfloat *location,
gint64
ves_icall_System_Threading_Interlocked_Exchange_Long (gint64 *location, gint64 value)
{
-#if SIZEOF_VOID_P == 8
- return (gint64) InterlockedExchangePointer((gpointer *) location, (gpointer)value);
-#else
- gint64 res;
-
- /*
- * According to MSDN, this function is only atomic with regards to the
- * other Interlocked functions on 32 bit platforms.
- */
- mono_interlocked_lock ();
- res = *location;
- *location = value;
- mono_interlocked_unlock ();
-
- return res;
-#endif
+ return InterlockedExchange64 (location, value);
}
gdouble
ves_icall_System_Threading_Interlocked_Exchange_Double (gdouble *location, gdouble value)
{
-#if SIZEOF_VOID_P == 8
LongDoubleUnion val, ret;
val.fval = value;
- ret.ival = (gint64)InterlockedExchangePointer((gpointer *) location, (gpointer)val.ival);
+ ret.ival = (gint64)InterlockedExchange64((gint64 *) location, val.ival);
return ret.fval;
-#else
- gdouble res;
-
- /*
- * According to MSDN, this function is only atomic with regards to the
- * other Interlocked functions on 32 bit platforms.
- */
- mono_interlocked_lock ();
- res = *location;
- *location = value;
- mono_interlocked_unlock ();
-
- return res;
-#endif
}
gint32 ves_icall_System_Threading_Interlocked_CompareExchange_Int(gint32 *location, gint32 value, gint32 comparand)
{
- MONO_ARCH_SAVE_REGS;
-
return InterlockedCompareExchange(location, value, comparand);
}
@@ -1919,8 +1870,6 @@ gfloat ves_icall_System_Threading_Interlocked_CompareExchange_Single (gfloat *lo
{
IntFloatUnion val, ret, cmp;
- MONO_ARCH_SAVE_REGS;
-
val.fval = value;
cmp.fval = comparand;
ret.ival = InterlockedCompareExchange((gint32 *) location, val.ival, cmp.ival);
@@ -1955,19 +1904,18 @@ ves_icall_System_Threading_Interlocked_CompareExchange_Double (gdouble *location
gint64
ves_icall_System_Threading_Interlocked_CompareExchange_Long (gint64 *location, gint64 value, gint64 comparand)
{
-#if SIZEOF_VOID_P == 8
- return (gint64)InterlockedCompareExchangePointer((gpointer *) location, (gpointer)value, (gpointer)comparand);
-#else
- gint64 old;
-
- mono_interlocked_lock ();
- old = *location;
- if (old == comparand)
- *location = value;
- mono_interlocked_unlock ();
-
- return old;
+#if SIZEOF_VOID_P == 4
+ if ((size_t)location & 0x7) {
+ gint64 old;
+ mono_interlocked_lock ();
+ old = *location;
+ if (old == comparand)
+ *location = value;
+ mono_interlocked_unlock ();
+ return old;
+ }
#endif
+ return InterlockedCompareExchange64 (location, value, comparand);
}
MonoObject*
@@ -1991,63 +1939,25 @@ ves_icall_System_Threading_Interlocked_Exchange_T (MonoObject **location, MonoOb
gint32
ves_icall_System_Threading_Interlocked_Add_Int (gint32 *location, gint32 value)
{
-#if SIZEOF_VOID_P == 8
- /* Should be implemented as a JIT intrinsic */
- mono_raise_exception (mono_get_exception_not_implemented (NULL));
- return 0;
-#else
- gint32 orig;
-
- mono_interlocked_lock ();
- orig = *location;
- *location = orig + value;
- mono_interlocked_unlock ();
-
- return orig + value;
-#endif
+ return InterlockedAdd (location, value);
}
gint64
ves_icall_System_Threading_Interlocked_Add_Long (gint64 *location, gint64 value)
{
-#if SIZEOF_VOID_P == 8
- /* Should be implemented as a JIT intrinsic */
- mono_raise_exception (mono_get_exception_not_implemented (NULL));
- return 0;
-#else
- gint64 orig;
-
- mono_interlocked_lock ();
- orig = *location;
- *location = orig + value;
- mono_interlocked_unlock ();
-
- return orig + value;
-#endif
+ return InterlockedAdd64 (location, value);
}
gint64
ves_icall_System_Threading_Interlocked_Read_Long (gint64 *location)
{
-#if SIZEOF_VOID_P == 8
- /* 64 bit reads are already atomic */
- return *location;
-#else
- gint64 res;
-
- mono_interlocked_lock ();
- res = *location;
- mono_interlocked_unlock ();
-
- return res;
-#endif
+ return InterlockedRead64 (location);
}
void
ves_icall_System_Threading_Thread_MemoryBarrier (void)
{
- mono_threads_lock ();
- mono_threads_unlock ();
+ mono_memory_barrier ();
}
void
@@ -2474,104 +2384,225 @@ void mono_thread_stop (MonoThread *thread)
gint8
ves_icall_System_Threading_Thread_VolatileRead1 (void *ptr)
{
- return *((volatile gint8 *) (ptr));
+ gint8 tmp;
+ mono_atomic_load_acquire (tmp, gint8, (volatile gint8 *) ptr);
+ return tmp;
}
gint16
ves_icall_System_Threading_Thread_VolatileRead2 (void *ptr)
{
- return *((volatile gint16 *) (ptr));
+ gint16 tmp;
+ mono_atomic_load_acquire (tmp, gint16, (volatile gint16 *) ptr);
+ return tmp;
}
gint32
ves_icall_System_Threading_Thread_VolatileRead4 (void *ptr)
{
- return *((volatile gint32 *) (ptr));
+ gint32 tmp;
+ mono_atomic_load_acquire (tmp, gint32, (volatile gint32 *) ptr);
+ return tmp;
}
gint64
ves_icall_System_Threading_Thread_VolatileRead8 (void *ptr)
{
- return *((volatile gint64 *) (ptr));
+ gint64 tmp;
+ mono_atomic_load_acquire (tmp, gint64, (volatile gint64 *) ptr);
+ return tmp;
}
void *
ves_icall_System_Threading_Thread_VolatileReadIntPtr (void *ptr)
{
- return (void *) *((volatile void **) ptr);
+ volatile void *tmp;
+ mono_atomic_load_acquire (tmp, volatile void *, (volatile void **) ptr);
+ return (void *) tmp;
+}
+
+void *
+ves_icall_System_Threading_Thread_VolatileReadObject (void *ptr)
+{
+ volatile MonoObject *tmp;
+ mono_atomic_load_acquire (tmp, volatile MonoObject *, (volatile MonoObject **) ptr);
+ return (MonoObject *) tmp;
}
double
ves_icall_System_Threading_Thread_VolatileReadDouble (void *ptr)
{
- return *((volatile double *) (ptr));
+ double tmp;
+ mono_atomic_load_acquire (tmp, double, (volatile double *) ptr);
+ return tmp;
}
float
ves_icall_System_Threading_Thread_VolatileReadFloat (void *ptr)
{
- return *((volatile float *) (ptr));
+ float tmp;
+ mono_atomic_load_acquire (tmp, float, (volatile float *) ptr);
+ return tmp;
+}
+
+gint8
+ves_icall_System_Threading_Volatile_Read1 (void *ptr)
+{
+ return InterlockedRead8 (ptr);
+}
+
+gint16
+ves_icall_System_Threading_Volatile_Read2 (void *ptr)
+{
+ return InterlockedRead16 (ptr);
+}
+
+gint32
+ves_icall_System_Threading_Volatile_Read4 (void *ptr)
+{
+ return InterlockedRead (ptr);
+}
+
+gint64
+ves_icall_System_Threading_Volatile_Read8 (void *ptr)
+{
+ return InterlockedRead64 (ptr);
+}
+
+void *
+ves_icall_System_Threading_Volatile_ReadIntPtr (void *ptr)
+{
+ return InterlockedReadPointer (ptr);
+}
+
+double
+ves_icall_System_Threading_Volatile_ReadDouble (void *ptr)
+{
+ LongDoubleUnion u;
+
+ u.ival = InterlockedRead64 (ptr);
+
+ return u.fval;
+}
+
+float
+ves_icall_System_Threading_Volatile_ReadFloat (void *ptr)
+{
+ IntFloatUnion u;
+
+ u.ival = InterlockedRead (ptr);
+
+ return u.fval;
}
MonoObject*
ves_icall_System_Threading_Volatile_Read_T (void *ptr)
{
- return (MonoObject*)*((volatile MonoObject**)ptr);
+ return InterlockedReadPointer (ptr);
}
void
ves_icall_System_Threading_Thread_VolatileWrite1 (void *ptr, gint8 value)
{
- *((volatile gint8 *) ptr) = value;
+ mono_atomic_store_release ((volatile gint8 *) ptr, value);
}
void
ves_icall_System_Threading_Thread_VolatileWrite2 (void *ptr, gint16 value)
{
- *((volatile gint16 *) ptr) = value;
+ mono_atomic_store_release ((volatile gint16 *) ptr, value);
}
void
ves_icall_System_Threading_Thread_VolatileWrite4 (void *ptr, gint32 value)
{
- *((volatile gint32 *) ptr) = value;
+ mono_atomic_store_release ((volatile gint32 *) ptr, value);
}
void
ves_icall_System_Threading_Thread_VolatileWrite8 (void *ptr, gint64 value)
{
- *((volatile gint64 *) ptr) = value;
+ mono_atomic_store_release ((volatile gint64 *) ptr, value);
}
void
ves_icall_System_Threading_Thread_VolatileWriteIntPtr (void *ptr, void *value)
{
- *((volatile void **) ptr) = value;
+ mono_atomic_store_release ((volatile void **) ptr, value);
}
void
-ves_icall_System_Threading_Thread_VolatileWriteObject (void *ptr, void *value)
+ves_icall_System_Threading_Thread_VolatileWriteObject (void *ptr, MonoObject *value)
{
- mono_gc_wbarrier_generic_store (ptr, value);
+ mono_gc_wbarrier_generic_store_atomic (ptr, value);
}
void
ves_icall_System_Threading_Thread_VolatileWriteDouble (void *ptr, double value)
{
- *((volatile double *) ptr) = value;
+ mono_atomic_store_release ((volatile double *) ptr, value);
}
void
ves_icall_System_Threading_Thread_VolatileWriteFloat (void *ptr, float value)
{
- *((volatile float *) ptr) = value;
+ mono_atomic_store_release ((volatile float *) ptr, value);
+}
+
+void
+ves_icall_System_Threading_Volatile_Write1 (void *ptr, gint8 value)
+{
+ InterlockedWrite8 (ptr, value);
+}
+
+void
+ves_icall_System_Threading_Volatile_Write2 (void *ptr, gint16 value)
+{
+ InterlockedWrite16 (ptr, value);
+}
+
+void
+ves_icall_System_Threading_Volatile_Write4 (void *ptr, gint32 value)
+{
+ InterlockedWrite (ptr, value);
+}
+
+void
+ves_icall_System_Threading_Volatile_Write8 (void *ptr, gint64 value)
+{
+ InterlockedWrite64 (ptr, value);
+}
+
+void
+ves_icall_System_Threading_Volatile_WriteIntPtr (void *ptr, void *value)
+{
+ InterlockedWritePointer (ptr, value);
+}
+
+void
+ves_icall_System_Threading_Volatile_WriteDouble (void *ptr, double value)
+{
+ LongDoubleUnion u;
+
+ u.fval = value;
+
+ InterlockedWrite64 (ptr, u.ival);
+}
+
+void
+ves_icall_System_Threading_Volatile_WriteFloat (void *ptr, float value)
+{
+ IntFloatUnion u;
+
+ u.fval = value;
+
+ InterlockedWrite (ptr, u.ival);
}
void
ves_icall_System_Threading_Volatile_Write_T (void *ptr, MonoObject *value)
{
- *((volatile MonoObject **) ptr) = value;
- mono_gc_wbarrier_generic_nostore (ptr);
+ mono_gc_wbarrier_generic_store_atomic (ptr, value);
}
void
@@ -3205,7 +3236,7 @@ print_stack_frame_to_string (MonoStackFrameInfo *frame, MonoContext *ctx, gpoint
GString *p = (GString*)data;
MonoMethod *method = NULL;
if (frame->ji)
- method = frame->ji->method;
+ method = mono_jit_info_get_method (frame->ji);
if (method) {
gchar *location = mono_debug_print_stack_frame (method, frame->native_offset, frame->domain);
@@ -3683,12 +3714,22 @@ mono_free_static_data (gpointer* static_data, gboolean threadlocal)
{
int i;
for (i = 1; i < NUM_STATIC_DATA_IDX; ++i) {
- if (!static_data [i])
+ gpointer p = static_data [i];
+ if (!p)
continue;
+ /*
+ * At this point, the static data pointer array is still registered with the
+ * GC, so must ensure that mark_tls_slots() will not encounter any invalid
+ * data. Freeing the individual arrays without first nulling their slots
+ * would make it possible for mark_tls_slots() to encounter a pointer to
+ * such an already freed array. See bug #13813.
+ */
+ static_data [i] = NULL;
+ mono_memory_write_barrier ();
if (mono_gc_user_markers_supported () && threadlocal)
- g_free (static_data [i]);
+ g_free (p);
else
- mono_gc_free_fixed (static_data [i]);
+ mono_gc_free_fixed (p);
}
mono_gc_free_fixed (static_data);
}
@@ -4597,7 +4638,7 @@ abort_thread_internal (MonoInternalThread *thread, gboolean can_raise_exception,
InterlockedIncrement (&thread_interruption_requested);
ji = mono_thread_info_get_last_managed (info);
- protected_wrapper = ji && mono_threads_is_critical_method (ji->method);
+ protected_wrapper = ji && mono_threads_is_critical_method (mono_jit_info_get_method (ji));
running_managed = mono_jit_info_match (ji, MONO_CONTEXT_GET_IP (&info->suspend_state.ctx));
if (!protected_wrapper && running_managed) {
@@ -4666,7 +4707,7 @@ suspend_thread_internal (MonoInternalThread *thread, gboolean interrupt)
}
ji = mono_thread_info_get_last_managed (info);
- protected_wrapper = ji && mono_threads_is_critical_method (ji->method);
+ protected_wrapper = ji && mono_threads_is_critical_method (mono_jit_info_get_method (ji));
running_managed = mono_jit_info_match (ji, MONO_CONTEXT_GET_IP (&info->suspend_state.ctx));
if (running_managed && !protected_wrapper) {
diff --git a/mono/metadata/threads.h b/mono/metadata/threads.h
index 2678789b6e6..ab3f6cba7dd 100644
--- a/mono/metadata/threads.h
+++ b/mono/metadata/threads.h
@@ -20,33 +20,33 @@ MONO_BEGIN_DECLS
/* This callback should return TRUE if the runtime must wait for the thread, FALSE otherwise */
typedef mono_bool (*MonoThreadManageCallback) (MonoThread* thread);
-extern void mono_thread_init (MonoThreadStartCB start_cb,
+extern MONO_API void mono_thread_init (MonoThreadStartCB start_cb,
MonoThreadAttachCB attach_cb);
-extern void mono_thread_cleanup (void);
-extern void mono_thread_manage(void);
+extern MONO_API void mono_thread_cleanup (void);
+extern MONO_API void mono_thread_manage(void);
-extern MonoThread *mono_thread_current (void);
+extern MONO_API MonoThread *mono_thread_current (void);
-extern void mono_thread_set_main (MonoThread *thread);
-extern MonoThread *mono_thread_get_main (void);
+extern MONO_API void mono_thread_set_main (MonoThread *thread);
+extern MONO_API MonoThread *mono_thread_get_main (void);
-extern void mono_thread_stop (MonoThread *thread);
+extern MONO_API void mono_thread_stop (MonoThread *thread);
-extern void mono_thread_new_init (intptr_t tid, void* stack_start,
+extern MONO_API void mono_thread_new_init (intptr_t tid, void* stack_start,
void* func);
-extern void mono_thread_create (MonoDomain *domain, void* func, void* arg);
-extern MonoThread *mono_thread_attach (MonoDomain *domain);
-extern void mono_thread_detach (MonoThread *thread);
-extern void mono_thread_exit (void);
+extern MONO_API void mono_thread_create (MonoDomain *domain, void* func, void* arg);
+extern MONO_API MonoThread *mono_thread_attach (MonoDomain *domain);
+extern MONO_API void mono_thread_detach (MonoThread *thread);
+extern MONO_API void mono_thread_exit (void);
-void mono_thread_set_manage_callback (MonoThread *thread, MonoThreadManageCallback func);
+MONO_API void mono_thread_set_manage_callback (MonoThread *thread, MonoThreadManageCallback func);
-extern void mono_threads_set_default_stacksize (uint32_t stacksize);
-extern uint32_t mono_threads_get_default_stacksize (void);
+extern MONO_API void mono_threads_set_default_stacksize (uint32_t stacksize);
+extern MONO_API uint32_t mono_threads_get_default_stacksize (void);
-void mono_threads_request_thread_dump (void);
+MONO_API void mono_threads_request_thread_dump (void);
-mono_bool mono_thread_is_foreign (MonoThread *thread);
+MONO_API mono_bool mono_thread_is_foreign (MonoThread *thread);
MONO_END_DECLS
diff --git a/mono/metadata/tpool-epoll.c b/mono/metadata/tpool-epoll.c
index a82afefadf1..876a82bc07b 100644
--- a/mono/metadata/tpool-epoll.c
+++ b/mono/metadata/tpool-epoll.c
@@ -15,7 +15,7 @@ struct _tp_epoll_data {
};
typedef struct _tp_epoll_data tp_epoll_data;
-static void tp_epoll_modify (gpointer event_data, int fd, int operation, int events, gboolean is_new);
+static void tp_epoll_modify (gpointer p, int fd, int operation, int events, gboolean is_new);
static void tp_epoll_shutdown (gpointer event_data);
static void tp_epoll_wait (gpointer event_data);
@@ -51,12 +51,16 @@ tp_epoll_init (SocketIOData *data)
}
static void
-tp_epoll_modify (gpointer event_data, int fd, int operation, int events, gboolean is_new)
+tp_epoll_modify (gpointer p, int fd, int operation, int events, gboolean is_new)
{
- tp_epoll_data *data = event_data;
+ SocketIOData *socket_io_data;
+ tp_epoll_data *data;
struct epoll_event evt;
int epoll_op;
+ socket_io_data = p;
+ data = socket_io_data->event_data;
+
memset (&evt, 0, sizeof (evt));
evt.data.fd = fd;
if ((events & MONO_POLLIN) != 0)
@@ -74,6 +78,7 @@ tp_epoll_modify (gpointer event_data, int fd, int operation, int events, gboolea
}
}
}
+ LeaveCriticalSection (&socket_io_data->io_lock);
}
static void
@@ -92,7 +97,6 @@ tp_epoll_wait (gpointer p)
{
SocketIOData *socket_io_data;
int epollfd;
- MonoInternalThread *thread;
struct epoll_event *events, *evt;
int ready = 0, i;
gpointer async_results [EPOLL_NEVENTS * 2]; // * 2 because each loop can add up to 2 results here
@@ -102,7 +106,6 @@ tp_epoll_wait (gpointer p)
socket_io_data = p;
data = socket_io_data->event_data;
epollfd = data->epollfd;
- thread = mono_thread_internal_current ();
events = g_new0 (struct epoll_event, EPOLL_NEVENTS);
while (1) {
@@ -110,8 +113,7 @@ tp_epoll_wait (gpointer p)
do {
if (ready == -1) {
- if (THREAD_WANTS_A_BREAK (thread))
- mono_thread_interruption_checkpoint ();
+ check_for_interruption_critical ();
}
ready = epoll_wait (epollfd, events, EPOLL_NEVENTS, -1);
} while (ready == -1 && errno == EINTR);
diff --git a/mono/metadata/tpool-kqueue.c b/mono/metadata/tpool-kqueue.c
index 22d21a37a7b..75f12f266c8 100644
--- a/mono/metadata/tpool-kqueue.c
+++ b/mono/metadata/tpool-kqueue.c
@@ -12,7 +12,7 @@ struct _tp_kqueue_data {
};
typedef struct _tp_kqueue_data tp_kqueue_data;
-static void tp_kqueue_modify (gpointer event_data, int fd, int operation, int events, gboolean is_new);
+static void tp_kqueue_modify (gpointer p, int fd, int operation, int events, gboolean is_new);
static void tp_kqueue_shutdown (gpointer event_data);
static void tp_kqueue_wait (gpointer event_data);
@@ -42,9 +42,11 @@ kevent_change (int kfd, struct kevent *evt, const char *error_str)
}
static void
-tp_kqueue_modify (gpointer event_data, int fd, int operation, int events, gboolean is_new)
+tp_kqueue_modify (gpointer p, int fd, int operation, int events, gboolean is_new)
{
- tp_kqueue_data *data = event_data;
+ SocketIOData *socket_io_data;
+ socket_io_data = p;
+ tp_kqueue_data *data = socket_io_data->event_data;
struct kevent evt;
memset (&evt, 0, sizeof (evt));
@@ -57,6 +59,7 @@ tp_kqueue_modify (gpointer event_data, int fd, int operation, int events, gboole
EV_SET (&evt, fd, EVFILT_WRITE, EV_ADD | EV_ENABLE | EV_ONESHOT, 0, 0, 0);
kevent_change (data->fd, &evt, "ADD write");
}
+ LeaveCriticalSection (&socket_io_data->io_lock);
}
static void
@@ -74,7 +77,6 @@ tp_kqueue_wait (gpointer p)
{
SocketIOData *socket_io_data;
int kfd;
- MonoInternalThread *thread;
struct kevent *events, *evt;
int ready = 0, i;
gpointer async_results [KQUEUE_NEVENTS * 2]; // * 2 because each loop can add up to 2 results here
@@ -84,7 +86,6 @@ tp_kqueue_wait (gpointer p)
socket_io_data = p;
data = socket_io_data->event_data;
kfd = data->fd;
- thread = mono_thread_internal_current ();
events = g_new0 (struct kevent, KQUEUE_NEVENTS);
while (1) {
@@ -93,8 +94,7 @@ tp_kqueue_wait (gpointer p)
do {
if (ready == -1) {
- if (THREAD_WANTS_A_BREAK (thread))
- mono_thread_interruption_checkpoint ();
+ check_for_interruption_critical ();
}
ready = kevent (kfd, NULL, 0, events, KQUEUE_NEVENTS, NULL);
} while (ready == -1 && errno == EINTR);
diff --git a/mono/metadata/tpool-poll.c b/mono/metadata/tpool-poll.c
index e03eca5248c..e44e3385988 100644
--- a/mono/metadata/tpool-poll.c
+++ b/mono/metadata/tpool-poll.c
@@ -19,7 +19,7 @@ struct _tp_poll_data {
typedef struct _tp_poll_data tp_poll_data;
static void tp_poll_shutdown (gpointer event_data);
-static void tp_poll_modify (gpointer event_data, int fd, int operation, int events, gboolean is_new);
+static void tp_poll_modify (gpointer p, int fd, int operation, int events, gboolean is_new);
static void tp_poll_wait (gpointer p);
static gpointer
@@ -74,12 +74,18 @@ tp_poll_init (SocketIOData *data)
}
static void
-tp_poll_modify (gpointer event_data, int fd, int operation, int events, gboolean is_new)
+tp_poll_modify (gpointer p, int fd, int operation, int events, gboolean is_new)
{
- tp_poll_data *data = event_data;
+ SocketIOData *socket_io_data;
+ tp_poll_data *data;
char msg [1];
int unused;
+ socket_io_data = p;
+ data = socket_io_data->event_data;
+
+ LeaveCriticalSection (&socket_io_data->io_lock);
+
MONO_SEM_WAIT (&data->new_sem);
INIT_POLLFD (&data->newpfd, GPOINTER_TO_INT (fd), events);
*msg = (char) operation;
@@ -150,14 +156,11 @@ tp_poll_wait (gpointer p)
gint maxfd = 1;
gint allocated;
gint i;
- MonoInternalThread *thread;
tp_poll_data *data;
SocketIOData *socket_io_data = p;
MonoPtrArray async_results;
gint nresults;
- thread = mono_thread_internal_current ();
-
data = socket_io_data->event_data;
allocated = INITIAL_POLLFD_SIZE;
pfds = g_new0 (mono_pollfd, allocated);
@@ -177,8 +180,7 @@ tp_poll_wait (gpointer p)
do {
if (nsock == -1) {
- if (THREAD_WANTS_A_BREAK (thread))
- mono_thread_interruption_checkpoint ();
+ check_for_interruption_critical ();
}
nsock = mono_poll (pfds, maxfd, -1);
diff --git a/mono/metadata/verify.c b/mono/metadata/verify.c
index 20dbb1ac93d..3c29b116e4c 100644
--- a/mono/metadata/verify.c
+++ b/mono/metadata/verify.c
@@ -2089,6 +2089,28 @@ get_icollection_class (void)
}
static MonoClass*
+get_ireadonlylist_class (void)
+{
+ static MonoClass* generic_ireadonlylist_class = NULL;
+
+ if (generic_ireadonlylist_class == NULL)
+ generic_ireadonlylist_class = mono_class_from_name (mono_defaults.corlib,
+ "System.Collections.Generic", "IReadOnlyList`1");
+ return generic_ireadonlylist_class;
+}
+
+static MonoClass*
+get_ireadonlycollection_class (void)
+{
+ static MonoClass* generic_ireadonlycollection_class = NULL;
+
+ if (generic_ireadonlycollection_class == NULL)
+ generic_ireadonlycollection_class = mono_class_from_name (mono_defaults.corlib,
+ "System.Collections.Generic", "IReadOnlyCollection`1");
+ return generic_ireadonlycollection_class;
+}
+
+static MonoClass*
inflate_class_one_arg (MonoClass *gtype, MonoClass *arg0)
{
MonoType *args [1];
@@ -2128,6 +2150,10 @@ verifier_class_is_assignable_from (MonoClass *target, MonoClass *candidate)
return TRUE;
if (verifier_inflate_and_check_compat (target, get_ienumerable_class (), candidate->element_class))
return TRUE;
+ if (verifier_inflate_and_check_compat (target, get_ireadonlylist_class (), candidate->element_class))
+ return TRUE;
+ if (verifier_inflate_and_check_compat (target, get_ireadonlycollection_class (), candidate->element_class))
+ return TRUE;
} else {
MonoError error;
int i;
diff --git a/mono/metadata/verify.h b/mono/metadata/verify.h
index dd81fe49a81..75f52c6628f 100644
--- a/mono/metadata/verify.h
+++ b/mono/metadata/verify.h
@@ -52,9 +52,9 @@ typedef struct {
} MonoVerifyInfoExtended;
-GSList* mono_method_verify (MonoMethod *method, int level);
-void mono_free_verify_list (GSList *list);
-char* mono_verify_corlib (void);
+MONO_API GSList* mono_method_verify (MonoMethod *method, int level);
+MONO_API void mono_free_verify_list (GSList *list);
+MONO_API char* mono_verify_corlib (void);
MONO_END_DECLS
diff --git a/mono/mini/.gitignore b/mono/mini/.gitignore
index 8a85f25bc9b..6d694bc2957 100644
--- a/mono/mini/.gitignore
+++ b/mono/mini/.gitignore
@@ -28,5 +28,6 @@
/buildver.h
/TAGS
/mono-sgen
+/mono-boehm
/buildver-sgen.h
-
+/buildver-boehm.h
diff --git a/mono/mini/Makefile.am.in b/mono/mini/Makefile.am.in
index 53128de3c30..a515b11ba48 100644..100755
--- a/mono/mini/Makefile.am.in
+++ b/mono/mini/Makefile.am.in
@@ -24,14 +24,6 @@ sgen_libs = \
$(monodir)/mono/utils/libmonoutils.la \
$(GLIB_LIBS) $(LIBICONV)
-if MOONLIGHT
-moon_libs = \
- $(monodir)/mono/metadata/libmonoruntimemoon.la \
- $(monodir)/mono/io-layer/libwapi.la \
- $(monodir)/mono/utils/libmonoutils.la \
- $(GLIB_LIBS) $(LIBICONV)
-endif
-
static_libs= \
$(monodir)/mono/metadata/libmonoruntime-static.la \
$(monodir)/mono/io-layer/libwapi.la \
@@ -106,19 +98,23 @@ boehm_binaries = mono-boehm
endif
#The mono uses sgen, while libmono remains boehm
+if SUPPORT_SGEN
mono_bin_suffix = sgen
+else
+mono_bin_suffix = boehm
+endif
libmono_suffix = boehm
if DISABLE_EXECUTABLES
else
-bin_SCRIPTS = mono
-noinst_SCRIPTS = mono
-
mono: mono-$(mono_bin_suffix)
ln -sf $< $@
+mono.exe: mono-$(mono_bin_suffix).exe
+ ln -sf $< $@
+
install-exec-hook:
- ln -sf $(DESTDIR)$(bindir)/mono-$(libmono_suffix) $(DESTDIR)$(bindir)/mono
+ (cd $(DESTDIR)$(bindir) && ln -sf mono-$(mono_bin_suffix) mono)
(cd $(DESTDIR)$(libdir); for i in libmono$(libmono_suffix)*; do ln -sf $$i `echo $$i | sed s/$(libmono_suffix)//` ; done)
endif
@@ -159,14 +155,6 @@ else
noinst_LTLIBRARIES = $(mini_common_lib) libmini-static.la
endif
-if MOONLIGHT
-noinst_LTLIBRARIES += libmono-moon.la
-moon-do-build: $(BUILT_SOURCES) mono libmono-moon.la
-moon-do-clean: maintainer-clean-generic
- -test -z "mono$(EXEEXT)" || rm -f mono$(EXEEXT)
- -test -z "libmono-moon.la" || rm -f libmono-moon.la
-endif
-
if LOADED_LLVM
lib_LTLIBRARIES += libmono-llvm.la
libmono_llvm_la_SOURCES = mini-llvm.c mini-llvm-cpp.cpp
@@ -236,7 +224,7 @@ MONO_LIB=$(boehm_static_libraries)
MONO_SGEN_LIB=$(sgen_static_libraries)
else
MONO_LIB=libmonoboehm-2.0.la
-MONO_LIBLIB=libmonosgen-2.0.la
+MONO_SGEN_LIB=libmonosgen-2.0.la
endif
if LOADED_LLVM
@@ -433,7 +421,8 @@ common_sources = \
debug-debugger.h \
xdebug.c \
mini-llvm.h \
- mini-llvm-cpp.h
+ mini-llvm-cpp.h \
+ alias-analysis.c
test_sources = \
basic-calls.cs \
@@ -524,7 +513,7 @@ arch_built=cpu-sparc.h
arch_define=__sparc__
endif
-if S390x
+if S390X
arch_sources = $(s390x_sources)
arch_built=cpu-s390x.h
arch_define=__s390__
@@ -565,17 +554,6 @@ libmonosgen_2_0_la_CFLAGS = $(mono_sgen_CFLAGS)
libmonosgen_2_0_la_LIBADD = libmini.la $(sgen_libs) $(LIBMONO_DTRACE_OBJECT)
libmonosgen_2_0_la_LDFLAGS = $(libmonoldflags)
-if MOONLIGHT
-libmono_moon_la_SOURCES = $(libmini_la_SOURCES)
-if MOONLIGHT_BOEHM
-libmono_moon_la_CFLAGS = $(mono_CFLAGS) $(MOONLIGHT_DEFINES)
-libmono_moon_la_LIBADD = $(moon_libs) $(libgc_libs) $(LIBMONO_DTRACE_OBJECT)
-else
-libmono_moon_la_CFLAGS = $(mono_sgen_CFLAGS) $(MOONLIGHT_DEFINES)
-libmono_moon_la_LIBADD = $(moon_libs) $(LIBMONO_DTRACE_OBJECT)
-endif
-endif
-
#
# This library is shared between mono and mono-sgen, since the code in mini/ doesn't contain
# compile time dependencies on boehm/sgen.
@@ -787,3 +765,9 @@ patch-automake:
tags:
etags -o TAGS `find .. -name "*.h" -o -name "*.c"`
+
+if HAS_EXTENSION_MODULE
+else
+Makefile.am: Makefile.am.in
+ cp $< $@
+endif
diff --git a/mono/mini/alias-analysis.c b/mono/mini/alias-analysis.c
new file mode 100644
index 00000000000..ef164426e61
--- /dev/null
+++ b/mono/mini/alias-analysis.c
@@ -0,0 +1,335 @@
+/*
+ * alias-analysis.c: Implement simple alias analysis for local variables.
+ *
+ * Author:
+ * Rodrigo Kumpera (kumpera@gmail.com)
+ *
+ * (C) 2013 Xamarin
+ */
+
+#include <config.h>
+#include <stdio.h>
+
+#include "mini.h"
+#include "ir-emit.h"
+#include "glib.h"
+
+static gboolean
+is_int_stack_size (int type)
+{
+#if SIZEOF_VOID_P == 4
+ return type == STACK_I4 || type == STACK_MP;
+#else
+ return type == STACK_I4;
+#endif
+}
+
+static gboolean
+is_long_stack_size (int type)
+{
+#if SIZEOF_VOID_P == 8
+ return type == STACK_I8 || type == STACK_MP;
+#else
+ return type == STACK_I8;
+#endif
+}
+
+
+static gboolean
+lower_load (MonoCompile *cfg, MonoInst *load, MonoInst *ldaddr)
+{
+ MonoInst *var = ldaddr->inst_p0;
+ MonoType *type = &var->klass->byval_arg;
+ int replaced_op = mono_type_to_load_membase (cfg, type);
+
+ if (load->opcode == OP_LOADV_MEMBASE && load->klass != var->klass) {
+ if (cfg->verbose_level > 2)
+ printf ("Incompatible load_vtype classes %s x %s\n", load->klass->name, var->klass->name);
+ return FALSE;
+ }
+
+ if (replaced_op != load->opcode) {
+ if (cfg->verbose_level > 2)
+ printf ("Incompatible load type: expected %s but got %s\n",
+ mono_inst_name (replaced_op),
+ mono_inst_name (load->opcode));
+ return FALSE;
+ } else {
+ if (cfg->verbose_level > 2) { printf ("mem2reg replacing: "); mono_print_ins (load); }
+ }
+
+ load->opcode = mono_type_to_regmove (cfg, type);
+ type_to_eval_stack_type (cfg, type, load);
+ load->sreg1 = var->dreg;
+ mono_jit_stats.loads_eliminated++;
+ return TRUE;
+}
+
+static gboolean
+lower_store (MonoCompile *cfg, MonoInst *store, MonoInst *ldaddr)
+{
+ MonoInst *var = ldaddr->inst_p0;
+ MonoType *type = &var->klass->byval_arg;
+ int replaced_op = mono_type_to_store_membase (cfg, type);
+
+ if (store->opcode == OP_STOREV_MEMBASE && store->klass != var->klass) {
+ if (cfg->verbose_level > 2)
+ printf ("Incompatible store_vtype classes %s x %s\n", store->klass->name, store->klass->name);
+ return FALSE;
+ }
+
+
+ if (replaced_op != store->opcode) {
+ if (cfg->verbose_level > 2)
+ printf ("Incompatible store_reg type: expected %s but got %s\n",
+ mono_inst_name (replaced_op),
+ mono_inst_name (store->opcode));
+ return FALSE;
+ } else {
+ if (cfg->verbose_level > 2) { printf ("mem2reg replacing: "); mono_print_ins (store); }
+ }
+
+ store->opcode = mono_type_to_regmove (cfg, type);
+ type_to_eval_stack_type (cfg, type, store);
+ store->dreg = var->dreg;
+ mono_jit_stats.stores_eliminated++;
+ return TRUE;
+}
+
+static gboolean
+lower_store_imm (MonoCompile *cfg, MonoInst *store, MonoInst *ldaddr)
+{
+ MonoInst *var = ldaddr->inst_p0;
+ MonoType *type = &var->klass->byval_arg;
+ int store_op = mono_type_to_store_membase (cfg, type);
+ if (store_op == OP_STOREV_MEMBASE || store_op == OP_STOREX_MEMBASE)
+ return FALSE;
+
+ switch (store->opcode) {
+#if SIZEOF_VOID_P == 4
+ case OP_STORE_MEMBASE_IMM:
+#endif
+ case OP_STOREI4_MEMBASE_IMM:
+ if (!is_int_stack_size (var->type)) {
+ if (cfg->verbose_level > 2) printf ("Incompatible variable of size != 4\n");
+ return FALSE;
+ }
+ if (cfg->verbose_level > 2) { printf ("mem2reg replacing: "); mono_print_ins (store); }
+ store->opcode = OP_ICONST;
+ store->type = STACK_I4;
+ store->dreg = var->dreg;
+ store->inst_c0 = store->inst_imm;
+ break;
+
+#if SIZEOF_VOID_P == 8
+ case OP_STORE_MEMBASE_IMM:
+#endif
+ case OP_STOREI8_MEMBASE_IMM:
+ if (!is_long_stack_size (var->type)) {
+ if (cfg->verbose_level > 2) printf ("Incompatible variable of size != 8\n");
+ return FALSE;
+ }
+ if (cfg->verbose_level > 2) { printf ("mem2reg replacing: "); mono_print_ins (store); }
+ store->opcode = OP_I8CONST;
+ store->type = STACK_I8;
+ store->dreg = var->dreg;
+ store->inst_l = store->inst_imm;
+ break;
+ default:
+ return FALSE;
+ }
+ mono_jit_stats.stores_eliminated++;
+ return TRUE;
+}
+
+static gboolean
+lower_memory_access (MonoCompile *cfg)
+{
+ MonoBasicBlock *bb;
+ MonoInst *ins, *tmp;
+ gboolean needs_dce = FALSE;
+ GHashTable *addr_loads = g_hash_table_new (NULL, NULL);
+ //FIXME optimize
+ for (bb = cfg->bb_entry; bb; bb = bb->next_bb) {
+ g_hash_table_remove_all (addr_loads);
+
+ for (ins = bb->code; ins; ins = ins->next) {
+ switch (ins->opcode) {
+ case OP_LDADDR:
+ g_hash_table_insert (addr_loads, GINT_TO_POINTER (ins->dreg), ins);
+ if (cfg->verbose_level > 2) { printf ("New address: "); mono_print_ins (ins); }
+ break;
+ case OP_MOVE:
+ tmp = (MonoInst*)g_hash_table_lookup (addr_loads, GINT_TO_POINTER (ins->sreg1));
+ /*
+ Forward propagate known aliases
+ ldaddr R10 <- R8
+ mov R11 <- R10
+ */
+ if (tmp) {
+ g_hash_table_insert (addr_loads, GINT_TO_POINTER (ins->dreg), tmp);
+ if (cfg->verbose_level > 2) { printf ("New alias: "); mono_print_ins (ins); }
+ } else {
+ /*
+ Source value is not a know address, kill the variable.
+ */
+ if (g_hash_table_remove (addr_loads, GINT_TO_POINTER (ins->dreg))) {
+ if (cfg->verbose_level > 2) { printf ("Killed alias: "); mono_print_ins (ins); }
+ }
+ }
+ break;
+
+ case OP_LOADV_MEMBASE:
+ case OP_LOAD_MEMBASE:
+ case OP_LOADU1_MEMBASE:
+ case OP_LOADI2_MEMBASE:
+ case OP_LOADU2_MEMBASE:
+ case OP_LOADI4_MEMBASE:
+ case OP_LOADU4_MEMBASE:
+ case OP_LOADI1_MEMBASE:
+ case OP_LOADI8_MEMBASE:
+ case OP_LOADR4_MEMBASE:
+ case OP_LOADR8_MEMBASE:
+ if (ins->inst_offset != 0)
+ continue;
+ tmp = g_hash_table_lookup (addr_loads, GINT_TO_POINTER (ins->sreg1));
+ if (tmp) {
+ if (cfg->verbose_level > 2) { printf ("Found candidate load:"); mono_print_ins (ins); }
+ needs_dce |= lower_load (cfg, ins, tmp);
+ }
+ break;
+
+ case OP_STORE_MEMBASE_REG:
+ case OP_STOREI1_MEMBASE_REG:
+ case OP_STOREI2_MEMBASE_REG:
+ case OP_STOREI4_MEMBASE_REG:
+ case OP_STOREI8_MEMBASE_REG:
+ case OP_STORER4_MEMBASE_REG:
+ case OP_STORER8_MEMBASE_REG:
+ case OP_STOREV_MEMBASE:
+ if (ins->inst_offset != 0)
+ continue;
+ tmp = g_hash_table_lookup (addr_loads, GINT_TO_POINTER (ins->dreg));
+ if (tmp) {
+ if (cfg->verbose_level > 2) { printf ("Found candidate store:"); mono_print_ins (ins); }
+ needs_dce |= lower_store (cfg, ins, tmp);
+ }
+ break;
+
+ case OP_STORE_MEMBASE_IMM:
+ case OP_STOREI4_MEMBASE_IMM:
+ case OP_STOREI8_MEMBASE_IMM:
+ if (ins->inst_offset != 0)
+ continue;
+ tmp = g_hash_table_lookup (addr_loads, GINT_TO_POINTER (ins->dreg));
+ if (tmp) {
+ if (cfg->verbose_level > 2) { printf ("Found candidate store-imm:"); mono_print_ins (ins); }
+ needs_dce |= lower_store_imm (cfg, ins, tmp);
+ }
+ break;
+ }
+ }
+ }
+ g_hash_table_destroy (addr_loads);
+ return needs_dce;
+}
+
+static gboolean
+recompute_aliased_variables (MonoCompile *cfg)
+{
+ int i;
+ MonoBasicBlock *bb;
+ MonoInst *ins;
+ int kills = 0;
+ int adds = 0;
+
+ for (i = 0; i < cfg->num_varinfo; i++) {
+ MonoInst *var = cfg->varinfo [i];
+ if (var->flags & MONO_INST_INDIRECT) {
+ if (cfg->verbose_level > 2) {
+ printf ("Killing :"); mono_print_ins (var);
+ }
+ ++kills;
+ }
+ var->flags &= ~MONO_INST_INDIRECT;
+ }
+
+ if (!kills)
+ return FALSE;
+
+ for (bb = cfg->bb_entry; bb; bb = bb->next_bb) {
+ for (ins = bb->code; ins; ins = ins->next) {
+ if (ins->opcode == OP_LDADDR) {
+ MonoInst *var;
+
+ if (cfg->verbose_level > 2) { printf ("Found op :"); mono_print_ins (ins); }
+
+ var = (MonoInst*)ins->inst_p0;
+ if (!(var->flags & MONO_INST_INDIRECT)) {
+ if (cfg->verbose_level) { printf ("Restoring :"); mono_print_ins (var); }
+ ++adds;
+ }
+ var->flags |= MONO_INST_INDIRECT;
+ }
+ }
+ }
+
+ mono_jit_stats.alias_found += kills;
+ mono_jit_stats.alias_removed += kills - adds;
+ if (kills > adds) {
+ if (cfg->verbose_level > 2) {
+ printf ("Method: %s\n", mono_method_full_name (cfg->method, 1));
+ printf ("Kills %d Adds %d\n", kills, adds);
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/*
+FIXME:
+ Don't DCE on the whole CFG, only the BBs that have changed.
+
+TODO:
+ SRVT of small types can fix cases of mismatch for fields of a different type than the component.
+ Handle aliasing of byrefs in call conventions.
+*/
+void
+mono_local_alias_analysis (MonoCompile *cfg)
+{
+ if (!cfg->has_indirection)
+ return;
+
+ if (cfg->verbose_level > 2)
+ mono_print_code (cfg, "BEFORE ALIAS_ANALYSIS");
+
+ /*
+ Remove indirection and memory access of known variables.
+ */
+ if (!lower_memory_access (cfg))
+ goto done;
+
+ /*
+ By replacing indirect access with direct operations, some LDADDR ops become dead. Kill them.
+ */
+ if (cfg->opt & MONO_OPT_DEADCE)
+ mono_local_deadce (cfg);
+
+ /*
+ Some variables no longer need to be flagged as indirect, find them.
+ */
+ if (!recompute_aliased_variables (cfg))
+ goto done;
+
+ /*
+ A lot of simplification just took place, we recompute local variables and do DCE to
+ really profit from the previous gains
+ */
+ mono_handle_global_vregs (cfg);
+ if (cfg->opt & MONO_OPT_DEADCE)
+ mono_local_deadce (cfg);
+
+done:
+ if (cfg->verbose_level > 2)
+ mono_print_code (cfg, "AFTER ALIAS_ANALYSIS");
+}
diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c
index 032f344e4a8..6aef6f11f2c 100644..100755
--- a/mono/mini/aot-compiler.c
+++ b/mono/mini/aot-compiler.c
@@ -188,10 +188,12 @@ typedef struct MonoAotCompile {
guint32 final_got_size;
/* Number of GOT entries reserved for trampolines */
guint32 num_trampoline_got_entries;
+ guint32 tramp_page_size;
guint32 num_trampolines [MONO_AOT_TRAMP_NUM];
guint32 trampoline_got_offset_base [MONO_AOT_TRAMP_NUM];
guint32 trampoline_size [MONO_AOT_TRAMP_NUM];
+ guint32 tramp_page_code_offsets [MONO_AOT_TRAMP_NUM];
MonoAotOptions aot_opts;
guint32 nmethods;
@@ -233,6 +235,9 @@ typedef struct MonoAotCompile {
GHashTable *dwarf_ln_filenames;
gboolean global_symbols;
gboolean direct_method_addresses;
+ int objc_selector_index, objc_selector_index_2;
+ GPtrArray *objc_selectors;
+ GHashTable *objc_selector_to_index;
} MonoAotCompile;
typedef struct {
@@ -637,6 +642,10 @@ arch_init (MonoAotCompile *acfg)
g_string_append (acfg->llc_args, "-mattr=-avx");
#endif
+#if defined(TARGET_AMD64)
+ g_string_append (acfg->llc_args, " -march=x86-64");
+#endif
+
#ifdef TARGET_ARM
if (acfg->aot_opts.mtriple && strstr (acfg->aot_opts.mtriple, "darwin")) {
g_string_append (acfg->llc_args, "-mattr=+v6");
@@ -679,7 +688,7 @@ arch_init (MonoAotCompile *acfg)
* calling code.
*/
static void
-arch_emit_direct_call (MonoAotCompile *acfg, const char *target, gboolean external, int *call_size)
+arch_emit_direct_call (MonoAotCompile *acfg, const char *target, gboolean external, MonoJumpInfo *ji, int *call_size)
{
#if defined(TARGET_X86) || defined(TARGET_AMD64)
/* Need to make sure this is exactly 5 bytes long */
@@ -835,6 +844,35 @@ arch_emit_got_access (MonoAotCompile *acfg, guint8 *code, int got_slot, int *cod
#endif
/*
+ * arch_emit_objc_selector_ref:
+ *
+ * Emit the implementation of OP_OBJC_GET_SELECTOR, which itself implements @selector(foo:) in objective-c.
+ */
+static void
+arch_emit_objc_selector_ref (MonoAotCompile *acfg, guint8 *code, int index, int *code_size)
+{
+#if defined(TARGET_ARM)
+ char symbol1 [256];
+ char symbol2 [256];
+ int lindex = acfg->objc_selector_index_2 ++;
+
+ /* Emit ldr.imm/b */
+ emit_bytes (acfg, code, 8);
+
+ sprintf (symbol1, "L_OBJC_SELECTOR_%d", lindex);
+ sprintf (symbol2, "L_OBJC_SELECTOR_REFERENCES_%d", index);
+
+ emit_label (acfg, symbol1);
+ img_writer_emit_unset_mode (acfg->w);
+ fprintf (acfg->fp, ".long %s-(%s+12)", symbol2, symbol1);
+
+ *code_size = 12;
+#else
+ g_assert_not_reached ();
+#endif
+}
+
+/*
* arch_emit_plt_entry:
*
* Emit code for the PLT entry with index INDEX.
@@ -998,6 +1036,8 @@ arch_emit_specific_trampoline_pages (MonoAotCompile *acfg)
if (!acfg->aot_opts.use_trampolines_page)
return;
+ acfg->tramp_page_size = mono_pagesize ();
+
sprintf (symbol, "%sspecific_trampolines_page", acfg->user_symbol_prefix);
emit_alignment (acfg, mono_pagesize ());
emit_global (acfg, symbol, TRUE);
@@ -2596,6 +2636,8 @@ encode_method_ref (MonoAotCompile *acfg, MonoMethod *method, guint8 *buf, guint8
encode_klass_ref (acfg, method->klass, p, &p);
else if (info->subtype == WRAPPER_SUBTYPE_SYNCHRONIZED_INNER)
encode_method_ref (acfg, info->d.synchronized_inner.method, p, &p);
+ else if (info->subtype == WRAPPER_SUBTYPE_ARRAY_ACCESSOR)
+ encode_method_ref (acfg, info->d.array_accessor.method, p, &p);
break;
}
case MONO_WRAPPER_MANAGED_TO_NATIVE: {
@@ -2666,8 +2708,11 @@ encode_method_ref (MonoAotCompile *acfg, MonoMethod *method, guint8 *buf, guint8
encode_klass_ref (acfg, method->klass, p, &p);
} else {
MonoMethodSignature *sig = mono_method_signature (method);
+ WrapperInfo *info = mono_marshal_get_wrapper_info (method);
encode_value (0, p, &p);
+ if (method->wrapper_type == MONO_WRAPPER_DELEGATE_INVOKE)
+ encode_value (info ? info->subtype : 0, p, &p);
encode_signature (acfg, sig, p, &p);
}
break;
@@ -3299,10 +3344,6 @@ add_wrappers (MonoAotCompile *acfg)
add_method (acfg, mono_marshal_get_runtime_invoke_dynamic ());
#endif
- /* JIT icall wrappers */
- /* FIXME: locking */
- g_hash_table_foreach (mono_get_jit_icall_info (), add_jit_icall_wrapper, acfg);
-
/* stelemref */
add_method (acfg, mono_marshal_get_stelemref ());
@@ -3366,6 +3407,10 @@ add_wrappers (MonoAotCompile *acfg)
}
}
#endif
+
+ /* JIT icall wrappers */
+ /* FIXME: locking */
+ g_hash_table_foreach (mono_get_jit_icall_info (), add_jit_icall_wrapper, acfg);
}
/*
@@ -3479,13 +3524,62 @@ add_wrappers (MonoAotCompile *acfg)
}
}
+ /* array access wrappers */
+ for (i = 0; i < acfg->image->tables [MONO_TABLE_TYPESPEC].rows; ++i) {
+ MonoClass *klass;
+
+ token = MONO_TOKEN_TYPE_SPEC | (i + 1);
+ klass = mono_class_get (acfg->image, token);
+
+ if (!klass) {
+ mono_loader_clear_error ();
+ continue;
+ }
+
+ if (klass->rank && MONO_TYPE_IS_PRIMITIVE (&klass->element_class->byval_arg)) {
+ MonoMethod *m, *wrapper;
+
+ /* Add runtime-invoke wrappers too */
+
+ m = mono_class_get_method_from_name (klass, "Get", -1);
+ g_assert (m);
+ wrapper = mono_marshal_get_array_accessor_wrapper (m);
+ add_extra_method (acfg, wrapper);
+ add_extra_method (acfg, mono_marshal_get_runtime_invoke (wrapper, FALSE));
+
+ m = mono_class_get_method_from_name (klass, "Set", -1);
+ g_assert (m);
+ wrapper = mono_marshal_get_array_accessor_wrapper (m);
+ add_extra_method (acfg, wrapper);
+ add_extra_method (acfg, mono_marshal_get_runtime_invoke (wrapper, FALSE));
+ }
+ }
+
/* Synchronized wrappers */
for (i = 0; i < acfg->image->tables [MONO_TABLE_METHOD].rows; ++i) {
token = MONO_TOKEN_METHOD_DEF | (i + 1);
method = mono_get_method (acfg->image, token, NULL);
- if (method->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED && !method->is_generic)
- add_method (acfg, mono_marshal_get_synchronized_wrapper (method));
+ if (method->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED) {
+ if (method->is_generic) {
+ // FIXME:
+ } else if (method->klass->generic_container) {
+ MonoGenericContext ctx;
+ MonoMethod *inst, *gshared, *m;
+
+ /*
+ * Create a generic wrapper for a generic instance, and AOT that.
+ */
+ create_gsharedvt_inst (acfg, method, &ctx);
+ inst = mono_class_inflate_generic_method (method, &ctx);
+ m = mono_marshal_get_synchronized_wrapper (inst);
+ g_assert (m->is_inflated);
+ gshared = mini_get_shared_method_full (m, FALSE, TRUE);
+ add_method (acfg, gshared);
+ } else {
+ add_method (acfg, mono_marshal_get_synchronized_wrapper (method));
+ }
+ }
}
/* pinvoke wrappers */
@@ -3650,6 +3744,8 @@ has_type_vars (MonoClass *klass)
return TRUE;
}
}
+ if (klass->generic_container)
+ return TRUE;
return FALSE;
}
@@ -3778,6 +3874,13 @@ add_generic_class_with_depth (MonoAotCompile *acfg, MonoClass *klass, int depth,
iter = NULL;
while ((method = mono_class_get_methods (klass, &iter))) {
+ if ((acfg->opts & MONO_OPT_GSHAREDVT) && method->is_inflated && mono_method_get_context (method)->method_inst) {
+ /*
+ * This is partial sharing, and we can't handle it yet
+ */
+ continue;
+ }
+
if (mono_method_is_generic_sharable_full (method, FALSE, FALSE, use_gsharedvt))
/* Already added */
continue;
@@ -3941,6 +4044,8 @@ add_types_from_method_header (MonoAotCompile *acfg, MonoMethod *method)
for (j = 0; j < header->num_locals; ++j)
if (header->locals [j]->type == MONO_TYPE_GENERICINST)
add_generic_class_with_depth (acfg, mono_class_from_mono_type (header->locals [j]), depth + 1, "local");
+ } else {
+ mono_loader_clear_error ();
}
}
@@ -4365,7 +4470,7 @@ get_file_index (MonoAotCompile *acfg, const char *source_file)
findex = g_hash_table_size (acfg->dwarf_ln_filenames) + 1;
g_hash_table_insert (acfg->dwarf_ln_filenames, g_strdup (source_file), GINT_TO_POINTER (findex));
emit_unset_mode (acfg);
- fprintf (acfg->fp, ".file %d \"%s\"\n", findex, source_file);
+ fprintf (acfg->fp, ".file %d \"%s\"\n", findex, mono_dwarf_escape_path (source_file));
}
return findex;
}
@@ -4388,7 +4493,7 @@ emit_and_reloc_code (MonoAotCompile *acfg, MonoMethod *method, guint8 *code, gui
MonoDebugSourceLocation **locs = NULL;
gboolean skip, direct_call, external_call;
guint32 got_slot;
- const char *direct_call_target;
+ const char *direct_call_target = 0;
const char *direct_pinvoke;
if (method) {
@@ -4431,8 +4536,8 @@ emit_and_reloc_code (MonoAotCompile *acfg, MonoMethod *method, guint8 *code, gui
mono_debug_symfile_free_location (loc);
}
-#ifdef MONO_ARCH_AOT_SUPPORTED
skip = FALSE;
+#ifdef MONO_ARCH_AOT_SUPPORTED
if (patch_info && (patch_info->ip.i == i) && (pindex < patches->len)) {
start_index = pindex;
@@ -4448,6 +4553,30 @@ emit_and_reloc_code (MonoAotCompile *acfg, MonoMethod *method, guint8 *code, gui
patch_info->type = MONO_PATCH_INFO_NONE;
break;
}
+ case MONO_PATCH_INFO_OBJC_SELECTOR_REF: {
+ int code_size, index;
+ char *selector = (void*)patch_info->data.target;
+
+ if (!acfg->objc_selector_to_index)
+ acfg->objc_selector_to_index = g_hash_table_new (g_str_hash, g_str_equal);
+ if (!acfg->objc_selectors)
+ acfg->objc_selectors = g_ptr_array_new ();
+ index = GPOINTER_TO_UINT (g_hash_table_lookup (acfg->objc_selector_to_index, selector));
+ if (index)
+ index --;
+ else {
+ index = acfg->objc_selector_index;
+ g_ptr_array_add (acfg->objc_selectors, (void*)patch_info->data.target);
+ g_hash_table_insert (acfg->objc_selector_to_index, selector, GUINT_TO_POINTER (index + 1));
+ acfg->objc_selector_index ++;
+ }
+
+ arch_emit_objc_selector_ref (acfg, code + i, index, &code_size);
+ i += code_size - 1;
+ skip = TRUE;
+ patch_info->type = MONO_PATCH_INFO_NONE;
+ break;
+ }
default: {
/*
* If this patch is a call, try emitting a direct call instead of
@@ -4521,7 +4650,7 @@ emit_and_reloc_code (MonoAotCompile *acfg, MonoMethod *method, guint8 *code, gui
if (direct_call) {
int call_size;
- arch_emit_direct_call (acfg, direct_call_target, external_call, &call_size);
+ arch_emit_direct_call (acfg, direct_call_target, external_call, patch_info, &call_size);
i += call_size - 1;
} else {
int code_size;
@@ -4684,7 +4813,7 @@ emit_method_code (MonoAotCompile *acfg, MonoCompile *cfg)
acfg->cfgs [method_index]->got_offset = acfg->got_offset;
- emit_and_reloc_code (acfg, method, code, cfg->code_len, cfg->patch_info, FALSE, mono_debug_find_method (cfg->jit_info->method, mono_domain_get ()));
+ emit_and_reloc_code (acfg, method, code, cfg->code_len, cfg->patch_info, FALSE, mono_debug_find_method (cfg->jit_info->d.method, mono_domain_get ()));
emit_line (acfg);
@@ -5144,8 +5273,18 @@ emit_exception_debug_info (MonoAotCompile *acfg, MonoCompile *cfg)
encode_value ((gint)((guint8*)ei->data.filter - code), p, &p);
else {
if (ei->data.catch_class) {
- encode_value (1, p, &p);
- encode_klass_ref (acfg, ei->data.catch_class, p, &p);
+ guint8 *buf2, *p2;
+ int len;
+
+ buf2 = g_malloc (4096);
+ p2 = buf2;
+ encode_klass_ref (acfg, ei->data.catch_class, p2, &p2);
+ len = p2 - buf2;
+ g_assert (len < 4096);
+ encode_value (len, p, &p);
+ memcpy (p, buf2, len);
+ p += p2 - buf2;
+ g_free (buf2);
} else {
encode_value (0, p, &p);
}
@@ -5157,10 +5296,29 @@ emit_exception_debug_info (MonoAotCompile *acfg, MonoCompile *cfg)
}
}
+ if (jinfo->has_try_block_holes) {
+ MonoTryBlockHoleTableJitInfo *table = mono_jit_info_get_try_block_hole_table_info (jinfo);
+ for (i = 0; i < table->num_holes; ++i) {
+ MonoTryBlockHoleJitInfo *hole = &table->holes [i];
+ encode_value (hole->clause, p, &p);
+ encode_value (hole->length, p, &p);
+ encode_value (hole->offset, p, &p);
+ }
+ }
+
+ if (jinfo->has_arch_eh_info) {
+ MonoArchEHJitInfo *eh_info;
+
+ eh_info = mono_jit_info_get_arch_eh_info (jinfo);
+ encode_value (eh_info->stack_size, p, &p);
+ }
+
if (jinfo->has_generic_jit_info) {
MonoGenericJitInfo *gi = mono_jit_info_get_generic_jit_info (jinfo);
MonoGenericSharingContext* gsctx = gi->generic_sharing_context;
guint8 *p1;
+ guint8 *buf2, *p2;
+ int len;
p1 = p;
encode_value (gi->nlocs, p, &p);
@@ -5190,15 +5348,23 @@ emit_exception_debug_info (MonoAotCompile *acfg, MonoCompile *cfg)
* Need to encode jinfo->method too, since it is not equal to 'method'
* when using generic sharing.
*/
- encode_method_ref (acfg, jinfo->method, p, &p);
+ buf2 = g_malloc (4096);
+ p2 = buf2;
+ encode_method_ref (acfg, jinfo->d.method, p2, &p2);
+ len = p2 - buf2;
+ g_assert (len < 4096);
+ encode_value (len, p, &p);
+ memcpy (p, buf2, len);
+ p += p2 - buf2;
+ g_free (buf2);
if (gsctx && (gsctx->var_is_vt || gsctx->mvar_is_vt)) {
MonoMethodInflated *inflated;
MonoGenericContext *context;
MonoGenericInst *inst;
- g_assert (jinfo->method->is_inflated);
- inflated = (MonoMethodInflated*)jinfo->method;
+ g_assert (jinfo->d.method->is_inflated);
+ inflated = (MonoMethodInflated*)jinfo->d.method;
context = &inflated->context;
encode_value (1, p, &p);
@@ -5225,23 +5391,6 @@ emit_exception_debug_info (MonoAotCompile *acfg, MonoCompile *cfg)
}
}
- if (jinfo->has_try_block_holes) {
- MonoTryBlockHoleTableJitInfo *table = mono_jit_info_get_try_block_hole_table_info (jinfo);
- for (i = 0; i < table->num_holes; ++i) {
- MonoTryBlockHoleJitInfo *hole = &table->holes [i];
- encode_value (hole->clause, p, &p);
- encode_value (hole->length, p, &p);
- encode_value (hole->offset, p, &p);
- }
- }
-
- if (jinfo->has_arch_eh_info) {
- MonoArchEHJitInfo *eh_info;
-
- eh_info = mono_jit_info_get_arch_eh_info (jinfo);
- encode_value (eh_info->stack_size, p, &p);
- }
-
if (seq_points) {
int il_offset, native_offset, last_il_offset, last_native_offset, j;
@@ -5256,6 +5405,7 @@ emit_exception_debug_info (MonoAotCompile *acfg, MonoCompile *cfg)
last_il_offset = il_offset;
last_native_offset = native_offset;
+ encode_value (sp->flags, p, &p);
encode_value (sp->next_len, p, &p);
for (j = 0; j < sp->next_len; ++j)
encode_value (sp->next [j], p, &p);
@@ -5588,6 +5738,8 @@ emit_trampoline_full (MonoAotCompile *acfg, int got_offset, MonoTrampInfo *info,
MonoJumpInfo *ji;
GSList *unwind_ops;
+ g_assert (info);
+
name = info->name;
code = info->code;
code_size = info->code_size;
@@ -5713,6 +5865,14 @@ emit_trampolines (MonoAotCompile *acfg)
*/
for (tramp_type = 0; tramp_type < MONO_TRAMPOLINE_NUM; ++tramp_type) {
/* we overload the boolean here to indicate the slightly different trampoline needed, see mono_arch_create_generic_trampoline() */
+#ifdef DISABLE_REMOTING
+ if (tramp_type == MONO_TRAMPOLINE_GENERIC_VIRTUAL_REMOTING)
+ continue;
+#endif
+#ifndef MONO_ARCH_HAVE_HANDLER_BLOCK_GUARD
+ if (tramp_type == MONO_TRAMPOLINE_HANDLER_BLOCK_GUARD)
+ continue;
+#endif
mono_arch_create_generic_trampoline (tramp_type, &info, acfg->aot_opts.use_trampolines_page? 2: TRUE);
emit_trampoline (acfg, acfg->got_offset, info);
}
@@ -5894,6 +6054,7 @@ emit_trampolines (MonoAotCompile *acfg)
}
emit_label (acfg, end_symbol);
+ emit_int32 (acfg, 0);
}
arch_emit_specific_trampoline_pages (acfg);
@@ -6165,6 +6326,7 @@ can_encode_method (MonoAotCompile *acfg, MonoMethod *method)
case MONO_WRAPPER_DELEGATE_INVOKE:
case MONO_WRAPPER_DELEGATE_BEGIN_INVOKE:
case MONO_WRAPPER_DELEGATE_END_INVOKE:
+ case MONO_WRAPPER_SYNCHRONIZED:
break;
case MONO_WRAPPER_MANAGED_TO_MANAGED:
case MONO_WRAPPER_CASTCLASS: {
@@ -6775,7 +6937,7 @@ emit_llvm_file (MonoAotCompile *acfg)
opts = g_strdup ("-instcombine -simplifycfg");
opts = g_strdup ("-simplifycfg -domtree -domfrontier -scalarrepl -instcombine -simplifycfg -domtree -domfrontier -scalarrepl -simplify-libcalls -instcombine -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loop-simplify -domfrontier -loop-simplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine -scalar-evolution -loop-simplify -lcssa -iv-users -indvars -loop-deletion -loop-simplify -lcssa -loop-unroll -instcombine -memdep -gvn -memdep -memcpyopt -sccp -instcombine -domtree -memdep -dse -adce -simplifycfg -preverify -domtree -verify");
#if 1
- command = g_strdup_printf ("%sopt -f %s -o %s.opt.bc %s.bc", acfg->aot_opts.llvm_path, opts, acfg->tmpfname, acfg->tmpfname);
+ command = g_strdup_printf ("%sopt -f %s -o \"%s.opt.bc\" \"%s.bc\"", acfg->aot_opts.llvm_path, opts, acfg->tmpfname, acfg->tmpfname);
printf ("Executing opt: %s\n", command);
if (system (command) != 0) {
exit (1);
@@ -6803,7 +6965,7 @@ emit_llvm_file (MonoAotCompile *acfg)
#endif
unlink (acfg->tmpfname);
- command = g_strdup_printf ("%sllc %s -disable-gnu-eh-frame -enable-mono-eh-frame -o %s %s.opt.bc", acfg->aot_opts.llvm_path, acfg->llc_args->str, acfg->tmpfname, acfg->tmpfname);
+ command = g_strdup_printf ("%sllc %s -disable-gnu-eh-frame -enable-mono-eh-frame -o \"%s\" \"%s.opt.bc\"", acfg->aot_opts.llvm_path, acfg->llc_args->str, acfg->tmpfname, acfg->tmpfname);
printf ("Executing llc: %s\n", command);
@@ -6938,7 +7100,7 @@ emit_code (MonoAotCompile *acfg)
* This is PIE code, and the linker can update it if needed.
*/
sprintf (symbol, "method_addresses");
- emit_section_change (acfg, RODATA_SECT, 1);
+ emit_section_change (acfg, ".text", 1);
emit_alignment (acfg, 8);
emit_label (acfg, symbol);
emit_local_symbol (acfg, symbol, "method_addresses_end", TRUE);
@@ -7004,7 +7166,10 @@ emit_code (MonoAotCompile *acfg)
/* Emit a sorted table mapping methods to their unbox trampolines */
sprintf (symbol, "unbox_trampolines");
- emit_section_change (acfg, RODATA_SECT, 1);
+ if (acfg->direct_method_addresses)
+ emit_section_change (acfg, ".text", 0);
+ else
+ emit_section_change (acfg, RODATA_SECT, 0);
emit_alignment (acfg, 8);
emit_label (acfg, symbol);
@@ -7042,6 +7207,7 @@ emit_code (MonoAotCompile *acfg)
}
sprintf (symbol, "unbox_trampolines_end");
emit_label (acfg, symbol);
+ emit_int32 (acfg, 0);
}
static void
@@ -7325,6 +7491,7 @@ emit_extra_methods (MonoAotCompile *acfg)
value = get_method_index (acfg, method);
hash = mono_aot_method_hash (method) % table_size;
+ //printf ("X: %s %d\n", mono_method_full_name (method, 1), hash);
chain_lengths [hash] ++;
max_chain_length = MAX (max_chain_length, chain_lengths [hash]);
@@ -7962,6 +8129,10 @@ emit_file_info (MonoAotCompile *acfg)
emit_int32 (acfg, __alignof__ (double));
emit_int32 (acfg, __alignof__ (gint64));
#endif
+ emit_int32 (acfg, MONO_TRAMPOLINE_NUM);
+ emit_int32 (acfg, acfg->tramp_page_size);
+ for (i = 0; i < MONO_AOT_TRAMP_NUM; ++i)
+ emit_int32 (acfg, acfg->tramp_page_code_offsets [i]);
if (acfg->aot_opts.static_link) {
char *p;
@@ -7981,6 +8152,7 @@ emit_file_info (MonoAotCompile *acfg)
}
acfg->static_linking_symbol = g_strdup (symbol);
emit_global_inner (acfg, symbol, FALSE);
+ emit_alignment (acfg, sizeof (gpointer));
emit_label (acfg, symbol);
emit_pointer_2 (acfg, acfg->user_symbol_prefix, "mono_aot_file_info");
}
@@ -8000,6 +8172,45 @@ emit_blob (MonoAotCompile *acfg)
}
static void
+emit_objc_selectors (MonoAotCompile *acfg)
+{
+ int i;
+
+ if (!acfg->objc_selectors || acfg->objc_selectors->len == 0)
+ return;
+
+ /*
+ * From
+ * cat > foo.m << EOF
+ * void *ret ()
+ * {
+ * return @selector(print:);
+ * }
+ * EOF
+ */
+
+ img_writer_emit_unset_mode (acfg->w);
+ g_assert (acfg->fp);
+ fprintf (acfg->fp, ".section __DATA,__objc_selrefs,literal_pointers,no_dead_strip\n");
+ fprintf (acfg->fp, ".align 2\n");
+ for (i = 0; i < acfg->objc_selectors->len; ++i) {
+ fprintf (acfg->fp, "L_OBJC_SELECTOR_REFERENCES_%d:\n", i);
+ fprintf (acfg->fp, ".long L_OBJC_METH_VAR_NAME_%d\n", i);
+ }
+ fprintf (acfg->fp, ".section __TEXT,__cstring,cstring_literals\n");
+ for (i = 0; i < acfg->objc_selectors->len; ++i) {
+ fprintf (acfg->fp, "L_OBJC_METH_VAR_NAME_%d:\n", i);
+ fprintf (acfg->fp, ".asciz \"%s\"\n", (char*)g_ptr_array_index (acfg->objc_selectors, i));
+ }
+
+ fprintf (acfg->fp, ".section __DATA,__objc_imageinfo,regular,no_dead_strip\n");
+ fprintf (acfg->fp, ".align 2\n");
+ fprintf (acfg->fp, "L_OBJC_IMAGE_INFO:\n");
+ fprintf (acfg->fp, ".long 0\n");
+ fprintf (acfg->fp, ".long 16\n");
+}
+
+static void
emit_dwarf_info (MonoAotCompile *acfg)
{
#ifdef EMIT_DWARF_INFO
@@ -8019,7 +8230,7 @@ emit_dwarf_info (MonoAotCompile *acfg)
sprintf (symbol2, "%sme_%x", acfg->temp_prefix, i);
- mono_dwarf_writer_emit_method (acfg->dwarf, cfg, cfg->method, cfg->asm_symbol, symbol2, cfg->jit_info->code_start, cfg->jit_info->code_size, cfg->args, cfg->locals, cfg->unwind_ops, mono_debug_find_method (cfg->jit_info->method, mono_domain_get ()));
+ mono_dwarf_writer_emit_method (acfg->dwarf, cfg, cfg->method, cfg->asm_symbol, symbol2, cfg->jit_info->code_start, cfg->jit_info->code_size, cfg->args, cfg->locals, cfg->unwind_ops, mono_debug_find_method (cfg->jit_info->d.method, mono_domain_get ()));
}
#endif
}
@@ -8248,7 +8459,7 @@ compile_asm (MonoAotCompile *acfg)
#elif defined(TARGET_AMD64) && defined(TARGET_MACH)
command = g_strdup_printf ("gcc --shared -o %s %s.o", tmp_outfile_name, acfg->tmpfname);
#elif defined(HOST_WIN32)
- command = g_strdup_printf ("gcc -shared --dll -mno-cygwin -o %s %s.o", tmp_outfile_name, acfg->tmpfname);
+ command = g_strdup_printf ("gcc -shared --dll -o %s %s.o", tmp_outfile_name, acfg->tmpfname);
#elif defined(TARGET_X86) && defined(TARGET_MACH) && !defined(__native_client_codegen__)
command = g_strdup_printf ("gcc -m32 -dynamiclib -o %s %s.o", tmp_outfile_name, acfg->tmpfname);
#else
@@ -8405,8 +8616,11 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
TV_DECLARE (atv);
TV_DECLARE (btv);
-#ifndef MONO_ARCH_GSHAREDVT_SUPPORTED
- opts &= ~MONO_OPT_GSHAREDVT;
+#if !defined(MONO_ARCH_GSHAREDVT_SUPPORTED) || (!defined(MONO_EXTENSIONS) && !defined(MONOTOUCH))
+ if (opts & MONO_OPT_GSHAREDVT) {
+ fprintf (stderr, "-O=gsharedvt not supported on this platform.\n");
+ exit (1);
+ }
#endif
printf ("Mono Ahead of Time compiler - compiling assembly %s\n", image->name);
@@ -8421,7 +8635,7 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
acfg->aot_opts.nrgctx_fetch_trampolines = 128;
acfg->aot_opts.ngsharedvt_arg_trampolines = 128;
acfg->aot_opts.llvm_path = g_strdup ("");
-#if MONOTOUCH
+#ifdef MONOTOUCH
acfg->aot_opts.use_trampolines_page = TRUE;
#endif
@@ -8617,10 +8831,10 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
int i = g_file_open_tmp ("mono_aot_XXXXXX", &acfg->tmpfname, NULL);
acfg->fp = fdopen (i, "w+");
}
- if (acfg->fp == 0) {
- fprintf (stderr, "Unable to open file '%s': %s\n", acfg->tmpfname, strerror (errno));
- return 1;
- }
+ }
+ if (acfg->fp == 0) {
+ fprintf (stderr, "Unable to open file '%s': %s\n", acfg->tmpfname, strerror (errno));
+ return 1;
}
acfg->w = img_writer_create (acfg->fp, FALSE);
@@ -8708,6 +8922,8 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
emit_blob (acfg);
+ emit_objc_selectors (acfg);
+
emit_globals (acfg);
emit_autoreg (acfg);
diff --git a/mono/mini/aot-runtime.c b/mono/mini/aot-runtime.c
index 6d93b6ce303..19ec1564a3e 100644
--- a/mono/mini/aot-runtime.c
+++ b/mono/mini/aot-runtime.c
@@ -70,9 +70,15 @@
#define SHARED_EXT ".so"
#endif
+#define ALIGN_TO(val,align) ((((guint64)val) + ((align) - 1)) & ~((align) - 1))
#define ALIGN_PTR_TO(ptr,align) (gpointer)((((gssize)(ptr)) + (align - 1)) & (~(align - 1)))
#define ROUND_DOWN(VALUE,SIZE) ((VALUE) & ~((SIZE) - 1))
+typedef struct {
+ int method_index;
+ MonoJitInfo *jinfo;
+} JitInfoMap;
+
typedef struct MonoAotModule {
char *aot_name;
/* Pointer to the Global Offset Table */
@@ -98,9 +104,7 @@ typedef struct MonoAotModule {
guint8 *plt_end;
guint8 *blob;
gint32 *code_offsets;
-#ifdef MONOTOUCH
gpointer *method_addresses;
-#endif
/* This contains <offset, index> pairs sorted by offset */
/* This is needed because LLVM emitted methods can be in any order */
gint32 *sorted_code_offsets;
@@ -132,6 +136,8 @@ typedef struct MonoAotModule {
gpointer *globals;
MonoDl *sofile;
+
+ JitInfoMap *async_jit_info_table;
} MonoAotModule;
typedef struct {
@@ -180,6 +186,9 @@ static guint32 n_pagefaults = 0;
static gsize aot_code_low_addr = (gssize)-1;
static gsize aot_code_high_addr = 0;
+/* Stats */
+static gint32 async_jit_info_size;
+
static GHashTable *aot_jit_icall_hash;
#ifdef MONOTOUCH
@@ -908,6 +917,12 @@ decode_method_ref_with_target (MonoAotModule *module, MethodRef *ref, MonoMethod
if (!m)
return FALSE;
ref->method = mono_marshal_get_synchronized_inner_wrapper (m);
+ } else if (subtype == WRAPPER_SUBTYPE_ARRAY_ACCESSOR) {
+ MonoMethod *m = decode_resolve_method_ref (module, p, &p);
+
+ if (!m)
+ return FALSE;
+ ref->method = mono_marshal_get_array_accessor_wrapper (m);
} else if (subtype == WRAPPER_SUBTYPE_GSHAREDVT_IN) {
ref->method = mono_marshal_get_gsharedvt_in_wrapper ();
} else if (subtype == WRAPPER_SUBTYPE_GSHAREDVT_OUT) {
@@ -1042,6 +1057,7 @@ decode_method_ref_with_target (MonoAotModule *module, MethodRef *ref, MonoMethod
case MONO_WRAPPER_DELEGATE_BEGIN_INVOKE:
case MONO_WRAPPER_DELEGATE_END_INVOKE: {
gboolean is_inflated = decode_value (p, &p);
+ WrapperSubtype subtype;
if (is_inflated) {
MonoClass *klass;
@@ -1079,6 +1095,19 @@ decode_method_ref_with_target (MonoAotModule *module, MethodRef *ref, MonoMethod
if (!target)
return FALSE;
+ if (wrapper_type == MONO_WRAPPER_DELEGATE_INVOKE) {
+ WrapperInfo *info;
+
+ subtype = decode_value (p, &p);
+ info = mono_marshal_get_wrapper_info (target);
+ if (info) {
+ if (info->subtype != subtype)
+ return FALSE;
+ } else {
+ if (subtype != WRAPPER_SUBTYPE_NONE)
+ return FALSE;
+ }
+ }
if (sig_matches_target (module, target, p, &p))
ref->method = target;
else
@@ -1568,7 +1597,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
sofile = mono_dl_open (aot_name, MONO_DL_LAZY, &err);
if (!sofile) {
- mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT failed to load AOT module %s: %s\n", aot_name, err);
+ mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT module '%s' not found: %s\n", aot_name, err);
g_free (err);
}
}
@@ -1640,6 +1669,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
/* Sanity check */
g_assert (info->double_align == align_double);
g_assert (info->long_align == align_int64);
+ g_assert (info->generic_tramp_num == MONO_TRAMPOLINE_NUM);
blob = info->blob;
@@ -1698,9 +1728,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
}
amodule->code_offsets = info->code_offsets;
-#ifdef MONOTOUCH
amodule->method_addresses = info->method_addresses;
-#endif
amodule->code = info->methods;
#ifdef TARGET_ARM
/* Mask out thumb interop bit */
@@ -1734,7 +1762,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
amodule->code_offsets = g_malloc0 (amodule->info.nmethods * sizeof (gint32));
for (i = 0; i < amodule->info.nmethods; ++i) {
/* method_addresses () contains a table of branches, since the ios linker can update those correctly */
- void *addr = get_arm_bl_target ((guint32*)(amodule->method_addresses + i));
+ void *addr = get_arm_bl_target ((guint32*)amodule->method_addresses + i);
if (addr == amodule->method_addresses)
amodule->code_offsets [i] = 0xffffffff;
@@ -1888,6 +1916,7 @@ mono_aot_init (void)
#ifndef __native_client__
mono_install_assembly_load_hook (load_aot_module, NULL);
#endif
+ mono_counters_register ("Async JIT info size", MONO_COUNTER_INT|MONO_COUNTER_JIT, &async_jit_info_size);
if (g_getenv ("MONO_LASTAOT"))
mono_last_aot_method = atoi (g_getenv ("MONO_LASTAOT"));
@@ -2186,11 +2215,13 @@ decode_llvm_mono_eh_frame (MonoAotModule *amodule, MonoDomain *domain,
}
code_start = amodule->code + amodule->code_offsets [table [(pos * 2)]];
- if (pos + 1 == fde_count)
- /* End of table */
- code_end = amodule->code_end;
- else
+ if (pos + 1 == fde_count) {
+ /* The +1 entry in the table contains the length of the last method */
+ int len = table [(pos + 1) * 2];
+ code_end = code_start + len;
+ } else {
code_end = amodule->code + amodule->code_offsets [table [(pos + 1) * 2]];
+ }
code_len = code_end - code_start;
g_assert (code >= code_start && code < code_end);
@@ -2234,11 +2265,11 @@ decode_llvm_mono_eh_frame (MonoAotModule *amodule, MonoDomain *domain,
* allocate a new JI.
*/
jinfo =
- mono_domain_alloc0 (domain, MONO_SIZEOF_JIT_INFO + (sizeof (MonoJitExceptionInfo) * (ei_len + nested_len)) + extra_size);
+ mono_domain_alloc0_lock_free (domain, MONO_SIZEOF_JIT_INFO + (sizeof (MonoJitExceptionInfo) * (ei_len + nested_len)) + extra_size);
jinfo->code_size = code_len;
jinfo->used_regs = mono_cache_unwind_info (info.unw_info, info.unw_info_len);
- jinfo->method = method;
+ jinfo->d.method = method;
jinfo->code_start = code;
jinfo->domain_neutral = 0;
/* This signals that used_regs points to a normal cached unwind info */
@@ -2298,15 +2329,30 @@ decode_llvm_mono_eh_frame (MonoAotModule *amodule, MonoDomain *domain,
return jinfo;
}
+static gpointer
+alloc0_jit_info_data (MonoDomain *domain, int size, gboolean async_context)
+{
+ gpointer res;
+
+ if (async_context) {
+ res = mono_domain_alloc0_lock_free (domain, size);
+ InterlockedExchangeAdd (&async_jit_info_size, size);
+ } else {
+ res = mono_domain_alloc0 (domain, size);
+ }
+ return res;
+}
+
/*
* LOCKING: Acquires the domain lock.
+ * In async context, this is async safe.
*/
static MonoJitInfo*
decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
MonoMethod *method, guint8* ex_info, guint8 *addr,
guint8 *code, guint32 code_len)
{
- int i, buf_len, num_clauses;
+ int i, buf_len, num_clauses, len;
MonoJitInfo *jinfo;
guint used_int_regs, flags;
gboolean has_generic_jit_info, has_dwarf_unwind_info, has_clauses, has_seq_points, has_try_block_holes, has_arch_eh_jit_info;
@@ -2314,8 +2360,10 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
guint8 *p;
int generic_info_size, try_holes_info_size, num_holes, arch_eh_jit_info_size;
int this_reg = 0, this_offset = 0;
+ gboolean async;
/* Load the method info from the AOT file */
+ async = mono_thread_info_is_async_context ();
p = ex_info;
flags = decode_value (p, &p);
@@ -2362,6 +2410,9 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
MonoJitExceptionInfo *clauses;
GSList **nesting;
+ // FIXME: async
+ g_assert (!async);
+
/*
* Part of the info is encoded by the AOT compiler, the rest is in the .eh_frame
* section.
@@ -2394,8 +2445,8 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
g_slist_free (nesting [i]);
g_free (nesting);
} else {
- jinfo =
- mono_domain_alloc0 (domain, MONO_SIZEOF_JIT_INFO + (sizeof (MonoJitExceptionInfo) * num_clauses) + generic_info_size + try_holes_info_size + arch_eh_jit_info_size);
+ len = MONO_SIZEOF_JIT_INFO + (sizeof (MonoJitExceptionInfo) * num_clauses) + generic_info_size + try_holes_info_size + arch_eh_jit_info_size;
+ jinfo = alloc0_jit_info_data (domain, len, async);
jinfo->num_clauses = num_clauses;
for (i = 0; i < jinfo->num_clauses; ++i) {
@@ -2408,8 +2459,14 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
if (ei->flags == MONO_EXCEPTION_CLAUSE_FILTER || ei->flags == MONO_EXCEPTION_CLAUSE_FINALLY)
ei->data.filter = code + decode_value (p, &p);
else {
- if (decode_value (p, &p))
- ei->data.catch_class = decode_klass_ref (amodule, p, &p);
+ int len = decode_value (p, &p);
+
+ if (len > 0) {
+ if (async)
+ p += len;
+ else
+ ei->data.catch_class = decode_klass_ref (amodule, p, &p);
+ }
}
ei->try_start = code + decode_value (p, &p);
@@ -2419,14 +2476,49 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
jinfo->code_size = code_len;
jinfo->used_regs = used_int_regs;
- jinfo->method = method;
+ jinfo->d.method = method;
jinfo->code_start = code;
jinfo->domain_neutral = 0;
jinfo->from_aot = 1;
}
+ if (has_try_block_holes) {
+ MonoTryBlockHoleTableJitInfo *table;
+
+ jinfo->has_try_block_holes = 1;
+
+ table = mono_jit_info_get_try_block_hole_table_info (jinfo);
+ g_assert (table);
+
+ table->num_holes = (guint16)num_holes;
+ for (i = 0; i < num_holes; ++i) {
+ MonoTryBlockHoleJitInfo *hole = &table->holes [i];
+ hole->clause = decode_value (p, &p);
+ hole->length = decode_value (p, &p);
+ hole->offset = decode_value (p, &p);
+ }
+ }
+
+ if (has_arch_eh_jit_info) {
+ MonoArchEHJitInfo *eh_info;
+
+ jinfo->has_arch_eh_info = 1;
+
+ eh_info = mono_jit_info_get_arch_eh_info (jinfo);
+ eh_info->stack_size = decode_value (p, &p);
+ }
+
+ if (async) {
+ /* The rest is not needed in async mode */
+ jinfo->async = TRUE;
+ jinfo->d.aot_info = amodule;
+ // FIXME: Cache
+ return jinfo;
+ }
+
if (has_generic_jit_info) {
MonoGenericJitInfo *gi;
+ int len;
jinfo->has_generic_jit_info = 1;
@@ -2435,7 +2527,7 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
gi->nlocs = decode_value (p, &p);
if (gi->nlocs) {
- gi->locations = mono_domain_alloc0 (domain, gi->nlocs * sizeof (MonoDwarfLocListEntry));
+ gi->locations = alloc0_jit_info_data (domain, gi->nlocs * sizeof (MonoDwarfLocListEntry), async);
for (i = 0; i < gi->nlocs; ++i) {
MonoDwarfLocListEntry *entry = &gi->locations [i];
@@ -2459,7 +2551,11 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
}
}
- jinfo->method = decode_resolve_method_ref (amodule, p, &p);
+ len = decode_value (p, &p);
+ if (async)
+ p += len;
+ else
+ jinfo->d.method = decode_resolve_method_ref (amodule, p, &p);
gi->generic_sharing_context = g_new0 (MonoGenericSharingContext, 1);
if (decode_value (p, &p)) {
@@ -2469,46 +2565,20 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
n = decode_value (p, &p);
if (n) {
- gsctx->var_is_vt = g_new0 (gboolean, n);
+ gsctx->var_is_vt = alloc0_jit_info_data (domain, sizeof (gboolean) * n, async);
for (i = 0; i < n; ++i)
gsctx->var_is_vt [i] = decode_value (p, &p);
}
n = decode_value (p, &p);
if (n) {
- gsctx->mvar_is_vt = g_new0 (gboolean, n);
+ gsctx->mvar_is_vt = alloc0_jit_info_data (domain, sizeof (gboolean) * n, async);
for (i = 0; i < n; ++i)
gsctx->mvar_is_vt [i] = decode_value (p, &p);
}
}
}
- if (has_try_block_holes) {
- MonoTryBlockHoleTableJitInfo *table;
-
- jinfo->has_try_block_holes = 1;
-
- table = mono_jit_info_get_try_block_hole_table_info (jinfo);
- g_assert (table);
-
- table->num_holes = (guint16)num_holes;
- for (i = 0; i < num_holes; ++i) {
- MonoTryBlockHoleJitInfo *hole = &table->holes [i];
- hole->clause = decode_value (p, &p);
- hole->length = decode_value (p, &p);
- hole->offset = decode_value (p, &p);
- }
- }
-
- if (has_arch_eh_jit_info) {
- MonoArchEHJitInfo *eh_info;
-
- jinfo->has_arch_eh_info = 1;
-
- eh_info = mono_jit_info_get_arch_eh_info (jinfo);
- eh_info->stack_size = decode_value (p, &p);
- }
-
- if (has_seq_points) {
+ if (method && has_seq_points) {
MonoSeqPointInfo *seq_points;
int il_offset, native_offset, last_il_offset, last_native_offset, j;
@@ -2525,6 +2595,7 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
sp->il_offset = il_offset;
sp->native_offset = native_offset;
+ sp->flags = decode_value (p, &p);
sp->next_len = decode_value (p, &p);
sp->next = g_new (int, sp->next_len);
for (j = 0; j < sp->next_len; ++j)
@@ -2541,7 +2612,8 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
/* Load debug info */
buf_len = decode_value (p, &p);
- mono_debug_add_aot_method (domain, method, code, p, buf_len);
+ if (!async)
+ mono_debug_add_aot_method (domain, method, code, p, buf_len);
p += buf_len;
if (has_gc_map) {
@@ -2553,7 +2625,7 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
p += map_size;
}
- if (amodule != jinfo->method->klass->image->aot_module) {
+ if (amodule != jinfo->d.method->klass->image->aot_module) {
mono_aot_lock ();
if (!ji_to_amodule)
ji_to_amodule = g_hash_table_new (NULL, NULL);
@@ -2572,10 +2644,14 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
guint8*
mono_aot_get_unwind_info (MonoJitInfo *ji, guint32 *unwind_info_len)
{
- MonoAotModule *amodule = ji->method->klass->image->aot_module;
+ MonoAotModule *amodule;
guint8 *p;
guint8 *code = ji->code_start;
+ if (ji->async)
+ amodule = ji->d.aot_info;
+ else
+ amodule = jinfo_get_method (ji)->klass->image->aot_module;
g_assert (amodule);
g_assert (ji->from_aot);
@@ -2654,6 +2730,13 @@ msort_code_offsets (gint32 *array, int len)
g_free (scratch);
}
+/*
+ * mono_aot_find_jit_info:
+ *
+ * In async context, the resulting MonoJitInfo will not have its method field set, and it will not be added
+ * to the jit info tables.
+ * FIXME: Large sizes in the lock free allocator
+ */
MonoJitInfo *
mono_aot_find_jit_info (MonoDomain *domain, MonoImage *image, gpointer addr)
{
@@ -2661,13 +2744,14 @@ mono_aot_find_jit_info (MonoDomain *domain, MonoImage *image, gpointer addr)
int method_index, table_len;
guint32 token;
MonoAotModule *amodule = image->aot_module;
- MonoMethod *method;
+ MonoMethod *method = NULL;
MonoJitInfo *jinfo;
guint8 *code, *ex_info, *p;
guint32 *table;
int nmethods = amodule->info.nmethods;
gint32 *code_offsets;
int offsets_len, i;
+ gboolean async;
if (!amodule)
return NULL;
@@ -2676,10 +2760,13 @@ mono_aot_find_jit_info (MonoDomain *domain, MonoImage *image, gpointer addr)
/* FIXME: */
return NULL;
+ async = mono_thread_info_is_async_context ();
+
offset = (guint8*)addr - amodule->code;
/* Compute a sorted table mapping code offsets to method indexes. */
if (!amodule->sorted_code_offsets) {
+ // FIXME: async
code_offsets = g_new0 (gint32, nmethods * 2);
offsets_len = 0;
for (i = 0; i < nmethods; ++i) {
@@ -2734,6 +2821,20 @@ mono_aot_find_jit_info (MonoDomain *domain, MonoImage *image, gpointer addr)
g_assert (offset < code_offsets [((pos + 1) * 2)]);
method_index = code_offsets [(pos * 2) + 1];
+ /* In async mode, jinfo is not added to the normal jit info table, so have to cache it ourselves */
+ if (async) {
+ JitInfoMap *table = amodule->async_jit_info_table;
+ int len;
+
+ if (table) {
+ len = table [0].method_index;
+ for (i = 1; i < len; ++i) {
+ if (table [i].method_index == method_index)
+ return table [i].jinfo;
+ }
+ }
+ }
+
code = &amodule->code [amodule->code_offsets [method_index]];
ex_info = &amodule->blob [mono_aot_get_offset (amodule->ex_info_offsets, method_index)];
@@ -2745,54 +2846,55 @@ mono_aot_find_jit_info (MonoDomain *domain, MonoImage *image, gpointer addr)
g_assert ((guint8*)code <= (guint8*)addr && (guint8*)addr < (guint8*)code + code_len);
/* Might be a wrapper/extra method */
- if (amodule->extra_methods) {
- mono_aot_lock ();
- method = g_hash_table_lookup (amodule->extra_methods, GUINT_TO_POINTER (method_index));
- mono_aot_unlock ();
- } else {
- method = NULL;
- }
-
- if (!method) {
- if (method_index >= image->tables [MONO_TABLE_METHOD].rows) {
- /*
- * This is hit for extra methods which are called directly, so they are
- * not in amodule->extra_methods.
- */
- table_len = amodule->extra_method_info_offsets [0];
- table = amodule->extra_method_info_offsets + 1;
- left = 0;
- right = table_len;
- pos = 0;
-
- /* Binary search */
- while (TRUE) {
- pos = ((left + right) / 2);
+ if (!async) {
+ if (amodule->extra_methods) {
+ mono_aot_lock ();
+ method = g_hash_table_lookup (amodule->extra_methods, GUINT_TO_POINTER (method_index));
+ mono_aot_unlock ();
+ } else {
+ method = NULL;
+ }
- g_assert (pos < table_len);
+ if (!method) {
+ if (method_index >= image->tables [MONO_TABLE_METHOD].rows) {
+ /*
+ * This is hit for extra methods which are called directly, so they are
+ * not in amodule->extra_methods.
+ */
+ table_len = amodule->extra_method_info_offsets [0];
+ table = amodule->extra_method_info_offsets + 1;
+ left = 0;
+ right = table_len;
+ pos = 0;
+
+ /* Binary search */
+ while (TRUE) {
+ pos = ((left + right) / 2);
+
+ g_assert (pos < table_len);
+
+ if (table [pos * 2] < method_index)
+ left = pos + 1;
+ else if (table [pos * 2] > method_index)
+ right = pos;
+ else
+ break;
+ }
- if (table [pos * 2] < method_index)
- left = pos + 1;
- else if (table [pos * 2] > method_index)
- right = pos;
- else
- break;
+ p = amodule->blob + table [(pos * 2) + 1];
+ method = decode_resolve_method_ref (amodule, p, &p);
+ if (!method)
+ /* Happens when a random address is passed in which matches a not-yey called wrapper encoded using its name */
+ return NULL;
+ } else {
+ token = mono_metadata_make_token (MONO_TABLE_METHOD, method_index + 1);
+ method = mono_get_method (image, token, NULL);
}
-
- p = amodule->blob + table [(pos * 2) + 1];
- method = decode_resolve_method_ref (amodule, p, &p);
- if (!method)
- /* Happens when a random address is passed in which matches a not-yey called wrapper encoded using its name */
- return NULL;
- } else {
- token = mono_metadata_make_token (MONO_TABLE_METHOD, method_index + 1);
- method = mono_get_method (image, token, NULL);
}
+ /* FIXME: */
+ g_assert (method);
}
- /* FIXME: */
- g_assert (method);
-
//printf ("F: %s\n", mono_method_full_name (method, TRUE));
jinfo = decode_exception_debug_info (amodule, domain, method, ex_info, addr, code, code_len);
@@ -2801,7 +2903,35 @@ mono_aot_find_jit_info (MonoDomain *domain, MonoImage *image, gpointer addr)
g_assert ((guint8*)addr < (guint8*)jinfo->code_start + jinfo->code_size);
/* Add it to the normal JitInfo tables */
- mono_jit_info_table_add (domain, jinfo);
+ if (async) {
+ JitInfoMap *old_table, *new_table;
+ int len;
+
+ /*
+ * Use a simple inmutable table with linear search to cache async jit info entries.
+ * This assumes that the number of entries is small.
+ */
+ while (TRUE) {
+ /* Copy the table, adding a new entry at the end */
+ old_table = amodule->async_jit_info_table;
+ if (old_table)
+ len = old_table[0].method_index;
+ else
+ len = 1;
+ new_table = alloc0_jit_info_data (domain, (len * 1) * sizeof (JitInfoMap), async);
+ if (old_table)
+ memcpy (new_table, old_table, len * sizeof (JitInfoMap));
+ new_table [0].method_index = len + 1;
+ new_table [len].method_index = method_index;
+ new_table [len].jinfo = jinfo;
+ /* Publish it */
+ mono_memory_barrier ();
+ if (InterlockedCompareExchangePointer ((gpointer)&amodule->async_jit_info_table, new_table, old_table) == old_table)
+ break;
+ }
+ } else {
+ mono_jit_info_table_add (domain, jinfo);
+ }
return jinfo;
}
@@ -4145,14 +4275,16 @@ get_new_trampoline_from_page (int tramp_type)
vm_address_t addr, taddr;
kern_return_t ret;
vm_prot_t prot, max_prot;
- int psize;
+ int psize, specific_trampoline_size;
unsigned char *code;
+ specific_trampoline_size = 2 * sizeof (gpointer);
+
mono_aot_page_lock ();
page = trampoline_pages [tramp_type];
if (page && page->trampolines < page->trampolines_end) {
code = page->trampolines;
- page->trampolines += 8;
+ page->trampolines += specific_trampoline_size;
mono_aot_page_unlock ();
return code;
}
@@ -4165,6 +4297,8 @@ get_new_trampoline_from_page (int tramp_type)
amodule = image->aot_module;
g_assert (amodule);
+ g_assert (amodule->info.tramp_page_size == psize);
+
if (tramp_type == MONO_AOT_TRAMP_SPECIFIC)
tpage = load_function (amodule, "specific_trampolines_page");
else if (tramp_type == MONO_AOT_TRAMP_STATIC_RGCTX)
@@ -4208,7 +4342,7 @@ get_new_trampoline_from_page (int tramp_type)
/* some other thread already allocated, so use that to avoid wasting memory */
if (page && page->trampolines < page->trampolines_end) {
code = page->trampolines;
- page->trampolines += 8;
+ page->trampolines += specific_trampoline_size;
mono_aot_page_unlock ();
vm_deallocate (mach_task_self (), addr, psize);
vm_deallocate (mach_task_self (), taddr, psize);
@@ -4320,7 +4454,7 @@ get_numerous_trampoline (MonoAotTrampoline tramp_type, int n_got_slots, MonoAotM
*out_amodule = amodule;
#ifdef MONOTOUCH
-#define MONOTOUCH_TRAMPOLINES_ERROR ". See http://docs.xamarin.com/ios/troubleshooting for instruction on how to fix this condition"
+#define MONOTOUCH_TRAMPOLINES_ERROR ". See http://docs.xamarin.com/ios/troubleshooting for instructions on how to fix this condition."
#else
#define MONOTOUCH_TRAMPOLINES_ERROR ""
#endif
diff --git a/mono/mini/arrays.cs b/mono/mini/arrays.cs
index 9598aa735cb..f38d05319b2 100644
--- a/mono/mini/arrays.cs
+++ b/mono/mini/arrays.cs
@@ -766,7 +766,31 @@ class Tests
test[x+100,y+100] = true;
}
return 0;
- }
+ }
+
+ static bool alloc_long (long l) {
+ try {
+ var arr = new byte[l];
+ return false;
+ } catch (Exception e) {
+ return true;
+ }
+ }
+
+ // #13544
+ public static int test_0_newarr_ovf () {
+ if (!alloc_long (5000000000))
+ return 1;
+ if (!alloc_long (4000000000))
+ return 2;
+ if (!alloc_long (-1))
+ return 3;
+ if (!alloc_long (-4000000000))
+ return 4;
+ if (!alloc_long (-6000000000))
+ return 5;
+ return 0;
+ }
}
diff --git a/mono/mini/basic-float.cs b/mono/mini/basic-float.cs
index 9a48e772f13..11e3e2725b1 100644
--- a/mono/mini/basic-float.cs
+++ b/mono/mini/basic-float.cs
@@ -80,6 +80,20 @@ class Tests
sbyte sb = (sbyte)a;
if (sb != 2)
return 6;
+ /* MS.NET special cases these */
+ double d = Double.NaN;
+ ui = (uint)d;
+ if (ui != 0)
+ return 7;
+ d = Double.PositiveInfinity;
+ ui = (uint)d;
+ if (ui != 0)
+ return 8;
+ d = Double.NegativeInfinity;
+ ui = (uint)d;
+ if (ui != 0)
+ return 9;
+
return 0;
}
diff --git a/mono/mini/cpu-amd64.md b/mono/mini/cpu-amd64.md
index 6fdf39699be..2422d73c139 100644
--- a/mono/mini/cpu-amd64.md
+++ b/mono/mini/cpu-amd64.md
@@ -62,7 +62,6 @@
#
break: len:2
-jmp: len:120
tailcall: len:120 clob:c
br: len:6
label: len:0
@@ -292,7 +291,7 @@ amd64_set_xmmreg_r4: dest:f src1:f len:14 clob:m
amd64_set_xmmreg_r8: dest:f src1:f len:14 clob:m
amd64_save_sp_to_lmf: len:16
tls_get: dest:i len:16
-tls_get_reg: dest:i src1:i len:20
+tls_get_reg: dest:i src1:i len:32
atomic_add_i4: src1:b src2:i dest:i len:32
atomic_add_new_i4: src1:b src2:i dest:i len:32
atomic_exchange_i4: src1:b src2:i dest:a len:32
diff --git a/mono/mini/cpu-arm.md b/mono/mini/cpu-arm.md
index 0ff8a13f839..b00f5647876 100644
--- a/mono/mini/cpu-arm.md
+++ b/mono/mini/cpu-arm.md
@@ -194,6 +194,7 @@ float_clt_un: dest:i src1:f src2:f len:20
float_conv_to_u: dest:i src1:f len:36
setfret: src1:f len:12
aot_const: dest:i len:16
+objc_get_selector: dest:i len:32
sqrt: dest:f src1:f len:4
adc: dest:i src1:i src2:i len:4
addcc: dest:i src1:i src2:i len:4
diff --git a/mono/mini/cpu-mips.md b/mono/mini/cpu-mips.md
index 968822a88ce..41c1b5840c2 100644
--- a/mono/mini/cpu-mips.md
+++ b/mono/mini/cpu-mips.md
@@ -177,7 +177,7 @@ not_null: src1:i len:0
# 32 bit opcodes
int_add: dest:i src1:i src2:i len:4
int_sub: dest:i src1:i src2:i len:4
-int_mul: dest:i src1:i src2:i len:4
+int_mul: dest:i src1:i src2:i len:16
int_div: dest:i src1:i src2:i len:84
int_div_un: dest:i src1:i src2:i len:40
int_rem: dest:i src1:i src2:i len:84
@@ -278,7 +278,7 @@ icompare_imm: src1:i len:12
# 64 bit opcodes
long_add: dest:i src1:i src2:i len:4
long_sub: dest:i src1:i src2:i len:4
-long_mul: dest:i src1:i src2:i len:8
+long_mul: dest:i src1:i src2:i len:32
long_mul_imm: dest:i src1:i len:4
long_div: dest:i src1:i src2:i len:40
long_div_un: dest:i src1:i src2:i len:16
diff --git a/mono/mini/cpu-x86.md b/mono/mini/cpu-x86.md
index d7d70f7aa5e..3cc4a528803 100644
--- a/mono/mini/cpu-x86.md
+++ b/mono/mini/cpu-x86.md
@@ -63,7 +63,6 @@
# See the code in mini-x86.c for more details on how the specifiers are used.
#
break: len:1
-jmp: len:32 clob:c
call: dest:a clob:c len:17
tailcall: len:120 clob:c
br: len:5
diff --git a/mono/mini/debug-mini.c b/mono/mini/debug-mini.c
index a8078869ae6..25f77b22f4d 100644
--- a/mono/mini/debug-mini.c
+++ b/mono/mini/debug-mini.c
@@ -163,6 +163,13 @@ write_variable (MonoInst *inst, MonoDebugVarInfo *var)
var->offset = inst->inst_offset;
} else if (inst->opcode == OP_GSHAREDVT_LOCAL) {
var->index = inst->inst_imm | MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL;
+ } else if (inst->opcode == OP_VTARG_ADDR) {
+ MonoInst *vtaddr;
+
+ vtaddr = inst->inst_left;
+ g_assert (vtaddr->opcode == OP_REGOFFSET);
+ var->offset = vtaddr->inst_offset;
+ var->index = vtaddr->inst_basereg | MONO_DEBUG_VAR_ADDRESS_MODE_VTADDR;
} else {
g_assert_not_reached ();
}
@@ -486,6 +493,7 @@ serialize_variable (MonoDebugVarInfo *var, guint8 *p, guint8 **endbuf)
encode_value (var->offset, p, &p);
break;
case MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL:
+ case MONO_DEBUG_VAR_ADDRESS_MODE_VTADDR:
case MONO_DEBUG_VAR_ADDRESS_MODE_DEAD:
break;
default:
@@ -568,6 +576,7 @@ deserialize_variable (MonoDebugVarInfo *var, guint8 *p, guint8 **endbuf)
var->offset = decode_value (p, &p);
break;
case MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL:
+ case MONO_DEBUG_VAR_ADDRESS_MODE_VTADDR:
case MONO_DEBUG_VAR_ADDRESS_MODE_DEAD:
break;
default:
@@ -693,6 +702,9 @@ print_var_info (MonoDebugVarInfo *info, int idx, const char *name, const char *t
case MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL:
g_print ("%s %s (%d) gsharedvt local.\n", type, name, idx);
break;
+ case MONO_DEBUG_VAR_ADDRESS_MODE_VTADDR:
+ g_print ("%s %s (%d) vt address: base register %s + %d\n", type, name, idx, mono_arch_regname (info->index & (~MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS)), info->offset);
+ break;
case MONO_DEBUG_VAR_ADDRESS_MODE_TWO_REGISTERS:
default:
g_assert_not_reached ();
@@ -721,14 +733,14 @@ mono_debug_print_vars (gpointer ip, gboolean only_arguments)
if (!ji)
return;
- jit = mono_debug_find_method (mono_jit_info_get_method (ji), domain);
+ jit = mono_debug_find_method (jinfo_get_method (ji), domain);
if (!jit)
return;
if (only_arguments) {
char **names;
names = g_new (char *, jit->num_params);
- mono_method_get_param_names (mono_jit_info_get_method (ji), (const char **) names);
+ mono_method_get_param_names (jinfo_get_method (ji), (const char **) names);
if (jit->this_var)
print_var_info (jit->this_var, 0, "this", "Arg");
for (i = 0; i < jit->num_params; ++i) {
diff --git a/mono/mini/debug-mini.h b/mono/mini/debug-mini.h
index b46d75ba4ff..649c30c0fb2 100644
--- a/mono/mini/debug-mini.h
+++ b/mono/mini/debug-mini.h
@@ -9,28 +9,28 @@
typedef struct _MonoDebuggerThreadInfo MonoDebuggerThreadInfo;
extern MonoDebuggerThreadInfo *mono_debugger_thread_table;
-void
+MONO_API void
mono_debugger_thread_created (gsize tid, MonoThread *thread, MonoJitTlsData *jit_tls, gpointer func);
-void
+MONO_API void
mono_debugger_thread_cleanup (MonoJitTlsData *jit_tls);
-void
+MONO_API void
mono_debugger_extended_notification (MonoDebuggerEvent event, guint64 data, guint64 arg);
-void
+MONO_API void
mono_debugger_trampoline_compiled (const guint8 *trampoline, MonoMethod *method, const guint8 *code);
-void
+MONO_API void
mono_debugger_call_exception_handler (gpointer addr, gpointer stack, MonoObject *exc);
-gboolean
+MONO_API gboolean
mono_debugger_handle_exception (MonoContext *ctx, MonoObject *obj);
-MonoObject *
+MONO_API MonoObject *
mono_debugger_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObject **exc);
-gboolean
+MONO_API gboolean
mono_debugger_abort_runtime_invoke (void);
/*
diff --git a/mono/mini/debugger-agent.c b/mono/mini/debugger-agent.c
index 42c415e0e10..7d53fb41050 100644..100755
--- a/mono/mini/debugger-agent.c
+++ b/mono/mini/debugger-agent.c
@@ -283,7 +283,7 @@ typedef struct {
#define HEADER_LENGTH 11
#define MAJOR_VERSION 2
-#define MINOR_VERSION 24
+#define MINOR_VERSION 26
typedef enum {
CMD_SET_VM = 1,
@@ -367,7 +367,8 @@ typedef enum {
typedef enum {
STEP_FILTER_NONE = 0,
STEP_FILTER_STATIC_CTOR = 1,
- STEP_FILTER_DEBUGGER_HIDDEN = 2
+ STEP_FILTER_DEBUGGER_HIDDEN = 2,
+ STEP_FILTER_DEBUGGER_STEP_THROUGH = 4
} StepFilter;
typedef enum {
@@ -528,7 +529,7 @@ typedef struct {
GHashTable *type_names; /* For kind == MONO_KIND_TYPE_NAME_ONLY */
StepFilter filter; /* For kind == MOD_KIND_STEP */
} data;
- gboolean caught, uncaught; /* For kind == MOD_KIND_EXCEPTION_ONLY */
+ gboolean caught, uncaught, subclasses; /* For kind == MOD_KIND_EXCEPTION_ONLY */
} Modifier;
typedef struct{
@@ -820,14 +821,14 @@ mono_debugger_agent_parse_options (char *options)
char **args, **ptr;
char *host;
int port;
- char *extra;
+ const char *extra;
#ifndef MONO_ARCH_SOFT_DEBUG_SUPPORTED
fprintf (stderr, "--debugger-agent is not supported on this platform.\n");
exit (1);
#endif
- extra = getenv ("MONO_SDB_ENV_OPTIONS");
+ extra = g_getenv ("MONO_SDB_ENV_OPTIONS");
if (extra)
options = g_strdup_printf ("%s,%s", options, extra);
@@ -2207,7 +2208,17 @@ buffer_add_ptr_id (Buffer *buf, MonoDomain *domain, IdType type, gpointer val)
static inline MonoClass*
decode_typeid (guint8 *buf, guint8 **endbuf, guint8 *limit, MonoDomain **domain, int *err)
{
- return decode_ptr_id (buf, endbuf, limit, ID_TYPE, domain, err);
+ MonoClass *klass;
+
+ klass = decode_ptr_id (buf, endbuf, limit, ID_TYPE, domain, err);
+ if (G_UNLIKELY (log_level >= 2) && klass) {
+ char *s;
+
+ s = mono_type_full_name (&klass->byval_arg);
+ DEBUG(2, fprintf (log_file, "[dbg] recv class [%s]\n", s));
+ g_free (s);
+ }
+ return klass;
}
static inline MonoAssembly*
@@ -2225,7 +2236,17 @@ decode_moduleid (guint8 *buf, guint8 **endbuf, guint8 *limit, MonoDomain **domai
static inline MonoMethod*
decode_methodid (guint8 *buf, guint8 **endbuf, guint8 *limit, MonoDomain **domain, int *err)
{
- return decode_ptr_id (buf, endbuf, limit, ID_METHOD, domain, err);
+ MonoMethod *m;
+
+ m = decode_ptr_id (buf, endbuf, limit, ID_METHOD, domain, err);
+ if (G_UNLIKELY (log_level >= 2) && m) {
+ char *s;
+
+ s = mono_method_full_name (m, TRUE);
+ DEBUG(2, fprintf (log_file, "[dbg] recv method [%s]\n", s));
+ g_free (s);
+ }
+ return m;
}
static inline MonoClassField*
@@ -2250,12 +2271,29 @@ static inline void
buffer_add_typeid (Buffer *buf, MonoDomain *domain, MonoClass *klass)
{
buffer_add_ptr_id (buf, domain, ID_TYPE, klass);
+ if (G_UNLIKELY (log_level >= 2) && klass) {
+ char *s;
+
+ s = mono_type_full_name (&klass->byval_arg);
+ if (GetCurrentThreadId () == debugger_thread_id)
+ DEBUG(2, fprintf (log_file, "[dbg] send class [%s]\n", s));
+ else
+ DEBUG(2, fprintf (log_file, "[%p] send class [%s]\n", (gpointer)GetCurrentThreadId (), s));
+ g_free (s);
+ }
}
static inline void
buffer_add_methodid (Buffer *buf, MonoDomain *domain, MonoMethod *method)
{
buffer_add_ptr_id (buf, domain, ID_METHOD, method);
+ if (G_UNLIKELY (log_level >= 2) && method) {
+ char *s;
+
+ s = mono_method_full_name (method, 1);
+ DEBUG(2, fprintf (log_file, "[dbg] send method [%s]\n", s));
+ g_free (s);
+ }
}
static inline void
@@ -2420,7 +2458,7 @@ thread_interrupt (DebuggerTlsData *tls, MonoThreadInfo *info, void *sigctx, Mono
if (ji) {
/* Running managed code, will be suspended by the single step code */
- DEBUG (1, fprintf (log_file, "[%p] Received interrupt while at %s(%p), continuing.\n", (gpointer)(gsize)tid, ji->method->name, ip));
+ DEBUG (1, fprintf (log_file, "[%p] Received interrupt while at %s(%p), continuing.\n", (gpointer)(gsize)tid, jinfo_get_method (ji)->name, ip));
return TRUE;
} else {
/*
@@ -2443,8 +2481,6 @@ thread_interrupt (DebuggerTlsData *tls, MonoThreadInfo *info, void *sigctx, Mono
/* Already terminated */
return TRUE;
- tls->context.valid = FALSE;
-
/*
* We are in a difficult position: we want to be able to provide stack
* traces for this thread, but we can't use the current ctx+lmf, since
@@ -2478,9 +2514,9 @@ thread_interrupt (DebuggerTlsData *tls, MonoThreadInfo *info, void *sigctx, Mono
tls->async_state.unwind_data [MONO_UNWIND_DATA_LMF] = data.lmf;
tls->async_state.unwind_data [MONO_UNWIND_DATA_JIT_TLS] = tls->thread->jit_data;
} else {
- /* No managed frames */
tls->async_state.valid = FALSE;
}
+
mono_memory_barrier ();
tls->suspended = TRUE;
@@ -2619,6 +2655,7 @@ process_suspend (DebuggerTlsData *tls, MonoContext *ctx)
{
guint8 *ip = MONO_CONTEXT_GET_IP (ctx);
MonoJitInfo *ji;
+ MonoMethod *method;
if (mono_loader_lock_is_owned_by_self ()) {
/*
@@ -2651,7 +2688,8 @@ process_suspend (DebuggerTlsData *tls, MonoContext *ctx)
ji = mini_jit_info_table_find (mono_domain_get (), (char*)ip, NULL);
/* Can't suspend in these methods */
- if (ji->method->klass == mono_defaults.string_class && (!strcmp (ji->method->name, "memset") || strstr (ji->method->name, "memcpy")))
+ method = jinfo_get_method (ji);
+ if (method->klass == mono_defaults.string_class && (!strcmp (method->name, "memset") || strstr (method->name, "memcpy")))
return;
save_thread_context (ctx);
@@ -3065,7 +3103,7 @@ process_frame (StackFrameInfo *info, MonoContext *ctx, gpointer user_data)
}
if (info->ji)
- method = info->ji->method;
+ method = jinfo_get_method (info->ji);
else
method = info->method;
actual_method = info->actual_method;
@@ -3326,7 +3364,9 @@ create_event_list (EventKind event, GPtrArray *reqs, MonoJitInfo *ji, EventInfo
if (mod->data.thread != mono_thread_internal_current ())
filtered = TRUE;
} else if (mod->kind == MOD_KIND_EXCEPTION_ONLY && ei) {
- if (mod->data.exc_class && !mono_class_is_assignable_from (mod->data.exc_class, ei->exc->vtable->klass))
+ if (mod->data.exc_class && mod->subclasses && !mono_class_is_assignable_from (mod->data.exc_class, ei->exc->vtable->klass))
+ filtered = TRUE;
+ if (mod->data.exc_class && !mod->subclasses && mod->data.exc_class != ei->exc->vtable->klass)
filtered = TRUE;
if (ei->caught && !mod->caught)
filtered = TRUE;
@@ -3339,7 +3379,7 @@ create_event_list (EventKind event, GPtrArray *reqs, MonoJitInfo *ji, EventInfo
if (assemblies) {
for (k = 0; assemblies [k]; ++k)
- if (assemblies [k] == ji->method->klass->image->assembly)
+ if (assemblies [k] == jinfo_get_method (ji)->klass->image->assembly)
found = TRUE;
}
if (!found)
@@ -3392,8 +3432,8 @@ create_event_list (EventKind event, GPtrArray *reqs, MonoJitInfo *ji, EventInfo
g_free (s);
} else if (mod->kind == MOD_KIND_STEP) {
if ((mod->data.filter & STEP_FILTER_STATIC_CTOR) && ji &&
- (ji->method->flags & METHOD_ATTRIBUTE_SPECIAL_NAME) &&
- !strcmp (ji->method->name, ".cctor"))
+ (jinfo_get_method (ji)->flags & METHOD_ATTRIBUTE_SPECIAL_NAME) &&
+ !strcmp (jinfo_get_method (ji)->name, ".cctor"))
filtered = TRUE;
if ((mod->data.filter & STEP_FILTER_DEBUGGER_HIDDEN) && ji) {
MonoCustomAttrInfo *ainfo;
@@ -3404,7 +3444,7 @@ create_event_list (EventKind event, GPtrArray *reqs, MonoJitInfo *ji, EventInfo
g_assert (klass);
}
if (!ji->dbg_hidden_inited) {
- ainfo = mono_custom_attrs_from_method (ji->method);
+ ainfo = mono_custom_attrs_from_method (jinfo_get_method (ji));
if (ainfo) {
if (mono_custom_attrs_has_attr (ainfo, klass))
ji->dbg_hidden = TRUE;
@@ -3415,6 +3455,32 @@ create_event_list (EventKind event, GPtrArray *reqs, MonoJitInfo *ji, EventInfo
if (ji->dbg_hidden)
filtered = TRUE;
}
+ if ((mod->data.filter & STEP_FILTER_DEBUGGER_STEP_THROUGH) && ji) {
+ MonoCustomAttrInfo *ainfo;
+ static MonoClass *klass;
+
+ if (!klass) {
+ klass = mono_class_from_name (mono_defaults.corlib, "System.Diagnostics", "DebuggerStepThroughAttribute");
+ g_assert (klass);
+ }
+ if (!ji->dbg_step_through_inited) {
+ ainfo = mono_custom_attrs_from_method (jinfo_get_method (ji));
+ if (ainfo) {
+ if (mono_custom_attrs_has_attr (ainfo, klass))
+ ji->dbg_step_through = TRUE;
+ mono_custom_attrs_free (ainfo);
+ }
+ ainfo = mono_custom_attrs_from_class (jinfo_get_method (ji)->klass);
+ if (ainfo) {
+ if (mono_custom_attrs_has_attr (ainfo, klass))
+ ji->dbg_step_through = TRUE;
+ mono_custom_attrs_free (ainfo);
+ }
+ ji->dbg_step_through_inited = TRUE;
+ }
+ if (ji->dbg_step_through)
+ filtered = TRUE;
+ }
}
}
@@ -3457,6 +3523,7 @@ event_to_string (EventKind event)
case EVENT_KIND_USER_LOG: return "USER_LOG";
default:
g_assert_not_reached ();
+ return "";
}
}
@@ -4053,7 +4120,7 @@ insert_breakpoint (MonoSeqPointInfo *seq_points, MonoDomain *domain, MonoJitInfo
}
if (i == seq_points->len) {
- char *s = g_strdup_printf ("Unable to insert breakpoint at %s:%d, seq_points=%d\n", mono_method_full_name (ji->method, TRUE), bp->il_offset, seq_points->len);
+ char *s = g_strdup_printf ("Unable to insert breakpoint at %s:%d, seq_points=%d\n", mono_method_full_name (jinfo_get_method (ji), TRUE), bp->il_offset, seq_points->len);
for (i = 0; i < seq_points->len; ++i)
DEBUG (1, fprintf (log_file, "%d\n", seq_points->seq_points [i].il_offset));
@@ -4095,7 +4162,7 @@ insert_breakpoint (MonoSeqPointInfo *seq_points, MonoDomain *domain, MonoJitInfo
#endif
}
- DEBUG(1, fprintf (log_file, "[dbg] Inserted breakpoint at %s:0x%x.\n", mono_method_full_name (ji->method, TRUE), (int)sp->il_offset));
+ DEBUG(1, fprintf (log_file, "[dbg] Inserted breakpoint at %s:0x%x.\n", mono_method_full_name (jinfo_get_method (ji), TRUE), (int)sp->il_offset));
}
static void
@@ -4164,6 +4231,7 @@ add_pending_breakpoints (MonoMethod *method, MonoJitInfo *ji)
int i, j;
MonoSeqPointInfo *seq_points;
MonoDomain *domain;
+ MonoMethod *jmethod;
if (!breakpoints)
return;
@@ -4187,10 +4255,11 @@ add_pending_breakpoints (MonoMethod *method, MonoJitInfo *ji)
}
if (!found) {
+ jmethod = jinfo_get_method (ji);
mono_domain_lock (domain);
- seq_points = g_hash_table_lookup (domain_jit_info (domain)->seq_points, ji->method);
- if (!seq_points && ji->method->is_inflated)
- seq_points = g_hash_table_lookup (domain_jit_info (domain)->seq_points, mono_method_get_declaring_generic_method (ji->method));
+ seq_points = g_hash_table_lookup (domain_jit_info (domain)->seq_points, jmethod);
+ if (!seq_points && jmethod->is_inflated)
+ seq_points = g_hash_table_lookup (domain_jit_info (domain)->seq_points, mono_method_get_declaring_generic_method (jmethod));
mono_domain_unlock (domain);
if (!seq_points)
/* Could be AOT code */
@@ -4383,6 +4452,55 @@ clear_breakpoints_for_domain (MonoDomain *domain)
mono_loader_unlock ();
}
+/*
+ * ss_update:
+ *
+ * Return FALSE if single stepping needs to continue.
+ */
+static gboolean
+ss_update (SingleStepReq *req, MonoJitInfo *ji, SeqPoint *sp)
+{
+ MonoDebugMethodInfo *minfo;
+ MonoDebugSourceLocation *loc = NULL;
+ gboolean hit = TRUE;
+ MonoMethod *method;
+
+ if (req->depth == STEP_DEPTH_OVER && (sp->flags & MONO_SEQ_POINT_FLAG_NONEMPTY_STACK)) {
+ /*
+ * These seq points are inserted by the JIT after calls, step over needs to skip them.
+ */
+ DEBUG (1, fprintf (log_file, "[%p] Seq point at nonempty stack %x while stepping over, continuing single stepping.\n", (gpointer)GetCurrentThreadId (), sp->il_offset));
+ return FALSE;
+ }
+
+ if (req->size != STEP_SIZE_LINE)
+ return TRUE;
+
+ /* Have to check whenever a different source line was reached */
+ method = jinfo_get_method (ji);
+ minfo = mono_debug_lookup_method (method);
+
+ if (minfo)
+ loc = mono_debug_symfile_lookup_location (minfo, sp->il_offset);
+
+ if (!loc || (loc && method == ss_req->last_method && loc->row == ss_req->last_line)) {
+ /* Have to continue single stepping */
+ if (!loc)
+ DEBUG(1, fprintf (log_file, "[%p] No line number info for il offset %x, continuing single stepping.\n", (gpointer)GetCurrentThreadId (), sp->il_offset));
+ else
+ DEBUG(1, fprintf (log_file, "[%p] Same source line (%d), continuing single stepping.\n", (gpointer)GetCurrentThreadId (), loc->row));
+ hit = FALSE;
+ }
+
+ if (loc) {
+ ss_req->last_method = method;
+ ss_req->last_line = loc->row;
+ mono_debug_free_source_location (loc);
+ }
+
+ return hit;
+}
+
static gboolean
breakpoint_matches_assembly (MonoBreakpoint *bp, MonoAssembly *assembly)
{
@@ -4402,6 +4520,7 @@ process_breakpoint_inner (DebuggerTlsData *tls)
GSList *bp_events = NULL, *ss_events = NULL, *enter_leave_events = NULL;
EventKind kind = EVENT_KIND_BREAKPOINT;
MonoContext *ctx = &tls->restore_ctx;
+ MonoMethod *method;
MonoSeqPointInfo *info;
SeqPoint *sp;
@@ -4410,7 +4529,7 @@ process_breakpoint_inner (DebuggerTlsData *tls)
ip = MONO_CONTEXT_GET_IP (ctx);
ji = mini_jit_info_table_find (mono_domain_get (), (char*)ip, NULL);
g_assert (ji);
- g_assert (ji->method);
+ method = jinfo_get_method (ji);
/* Compute the native offset of the breakpoint from the ip */
native_offset = ip - (guint8*)ji->code_start;
@@ -4420,7 +4539,7 @@ process_breakpoint_inner (DebuggerTlsData *tls)
*/
mono_arch_skip_breakpoint (ctx, ji);
- if (ji->method->wrapper_type || tls->disable_breakpoints)
+ if (method->wrapper_type || tls->disable_breakpoints)
return;
bp_reqs = g_ptr_array_new ();
@@ -4433,12 +4552,12 @@ process_breakpoint_inner (DebuggerTlsData *tls)
* The ip points to the instruction causing the breakpoint event, which is after
* the offset recorded in the seq point map, so find the prev seq point before ip.
*/
- sp = find_prev_seq_point_for_native_offset (mono_domain_get (), ji->method, native_offset, &info);
+ sp = find_prev_seq_point_for_native_offset (mono_domain_get (), method, native_offset, &info);
if (!sp)
- no_seq_points_found (ji->method);
+ no_seq_points_found (method);
g_assert (sp);
- DEBUG(1, fprintf (log_file, "[%p] Breakpoint hit, method=%s, ip=%p, offset=0x%x, sp il offset=0x%x.\n", (gpointer)GetCurrentThreadId (), ji->method->name, ip, native_offset, sp ? sp->il_offset : -1));
+ DEBUG(1, fprintf (log_file, "[%p] Breakpoint hit, method=%s, ip=%p, offset=0x%x, sp il offset=0x%x.\n", (gpointer)GetCurrentThreadId (), method->name, ip, native_offset, sp ? sp->il_offset : -1));
bp = NULL;
for (i = 0; i < breakpoints->len; ++i) {
@@ -4470,36 +4589,17 @@ process_breakpoint_inner (DebuggerTlsData *tls)
for (i = 0; i < ss_reqs_orig->len; ++i) {
EventRequest *req = g_ptr_array_index (ss_reqs_orig, i);
SingleStepReq *ss_req = req->info;
- gboolean hit = TRUE;
-
- if (ss_req->size == STEP_SIZE_LINE) {
- /* Have to check whenever a different source line was reached */
- MonoDebugMethodInfo *minfo;
- MonoDebugSourceLocation *loc = NULL;
+ gboolean hit;
- minfo = mono_debug_lookup_method (ji->method);
-
- if (minfo)
- loc = mono_debug_symfile_lookup_location (minfo, sp->il_offset);
-
- if (!loc || (loc && ji->method == ss_req->last_method && loc->row == ss_req->last_line)) {
- /* Have to continue single stepping */
- DEBUG(1, fprintf (log_file, "[%p] Same source line, continuing single stepping.\n", (gpointer)GetCurrentThreadId ()));
- hit = FALSE;
- }
-
- if (loc) {
- ss_req->last_method = ji->method;
- ss_req->last_line = loc->row;
- mono_debug_free_source_location (loc);
- }
- }
+ if (mono_thread_internal_current () != ss_req->thread)
+ continue;
+ hit = ss_update (ss_req, ji, sp);
if (hit)
g_ptr_array_add (ss_reqs, req);
/* Start single stepping again from the current sequence point */
- ss_start (ss_req, ji->method, sp, info, ctx, tls, FALSE);
+ ss_start (ss_req, method, sp, info, ctx, tls, FALSE);
}
if (ss_reqs->len > 0)
@@ -4519,11 +4619,11 @@ process_breakpoint_inner (DebuggerTlsData *tls)
* resume.
*/
if (ss_events)
- process_event (EVENT_KIND_STEP, ji->method, 0, ctx, ss_events, suspend_policy);
+ process_event (EVENT_KIND_STEP, method, 0, ctx, ss_events, suspend_policy);
if (bp_events)
- process_event (kind, ji->method, 0, ctx, bp_events, suspend_policy);
+ process_event (kind, method, 0, ctx, bp_events, suspend_policy);
if (enter_leave_events)
- process_event (kind, ji->method, 0, ctx, enter_leave_events, suspend_policy);
+ process_event (kind, method, 0, ctx, enter_leave_events, suspend_policy);
}
/* Process a breakpoint/single step event after resuming from a signal handler */
@@ -4532,10 +4632,6 @@ process_signal_event (void (*func) (DebuggerTlsData*))
{
DebuggerTlsData *tls;
MonoContext orig_restore_ctx, ctx;
- static void (*restore_context) (void *);
-
- if (!restore_context)
- restore_context = mono_get_restore_context ();
tls = mono_native_tls_get_value (debugger_tls_id);
/* Have to save/restore the restore_ctx as we can be called recursively during invokes etc. */
@@ -4547,7 +4643,7 @@ process_signal_event (void (*func) (DebuggerTlsData*))
/* This is called when resuming from a signal handler, so it shouldn't return */
memcpy (&ctx, &tls->restore_ctx, sizeof (MonoContext));
memcpy (&tls->restore_ctx, &orig_restore_ctx, sizeof (MonoContext));
- restore_context (&ctx);
+ mono_restore_context (&ctx);
g_assert_not_reached ();
}
@@ -4663,6 +4759,7 @@ process_single_step_inner (DebuggerTlsData *tls)
MonoDomain *domain;
GSList *events;
MonoContext *ctx = &tls->restore_ctx;
+ MonoMethod *method;
SeqPoint *sp;
MonoSeqPointInfo *info;
@@ -4686,75 +4783,43 @@ process_single_step_inner (DebuggerTlsData *tls)
if (log_level > 0) {
ji = mini_jit_info_table_find (mono_domain_get (), (char*)ip, &domain);
- DEBUG (1, fprintf (log_file, "[%p] Single step event (depth=%s) at %s (%p), sp %p, last sp %p\n", (gpointer)GetCurrentThreadId (), ss_depth_to_string (ss_req->depth), mono_method_full_name (ji->method, TRUE), MONO_CONTEXT_GET_IP (ctx), MONO_CONTEXT_GET_SP (ctx), ss_req->last_sp));
+ DEBUG (1, fprintf (log_file, "[%p] Single step event (depth=%s) at %s (%p), sp %p, last sp %p\n", (gpointer)GetCurrentThreadId (), ss_depth_to_string (ss_req->depth), mono_method_full_name (jinfo_get_method (ji), TRUE), MONO_CONTEXT_GET_IP (ctx), MONO_CONTEXT_GET_SP (ctx), ss_req->last_sp));
}
ji = mini_jit_info_table_find (mono_domain_get (), (char*)ip, &domain);
g_assert (ji);
- g_assert (ji->method);
+ method = jinfo_get_method (ji);
+ g_assert (method);
- if (ji->method->wrapper_type && ji->method->wrapper_type != MONO_WRAPPER_DYNAMIC_METHOD)
+ if (method->wrapper_type && method->wrapper_type != MONO_WRAPPER_DYNAMIC_METHOD)
return;
/*
- * FIXME:
+ * FIXME:
* Stopping in memset makes half-initialized vtypes visible.
* Stopping in memcpy makes half-copied vtypes visible.
*/
- if (ji->method->klass == mono_defaults.string_class && (!strcmp (ji->method->name, "memset") || strstr (ji->method->name, "memcpy")))
+ if (method->klass == mono_defaults.string_class && (!strcmp (method->name, "memset") || strstr (method->name, "memcpy")))
return;
/*
* The ip points to the instruction causing the single step event, which is before
* the offset recorded in the seq point map, so find the next seq point after ip.
*/
- sp = find_next_seq_point_for_native_offset (domain, ji->method, (guint8*)ip - (guint8*)ji->code_start, &info);
+ sp = find_next_seq_point_for_native_offset (domain, method, (guint8*)ip - (guint8*)ji->code_start, &info);
if (!sp)
return;
il_offset = sp->il_offset;
- // FIXME: No tests fail if this is disabled
-#if 0
- if (ss_req->size == STEP_SIZE_LINE) {
- // FIXME:
- NOT_IMPLEMENTED;
-
- /* Step until a different source line is reached */
- MonoDebugMethodInfo *minfo;
-
- minfo = mono_debug_lookup_method (ji->method);
-
- if (minfo) {
- MonoDebugSourceLocation *loc = mono_debug_symfile_lookup_location (minfo, il_offset);
-
- if (loc && ji->method == ss_req->last_method && loc->row == ss_req->last_line) {
- mono_debug_free_source_location (loc);
- return;
- }
- if (!loc)
- /*
- * Step until we reach a location with line number info,
- * otherwise the client can't show a location.
- * This can happen for example with statics initialized inline
- * outside of a cctor.
- */
- return;
-
- if (loc) {
- ss_req->last_method = ji->method;
- ss_req->last_line = loc->row;
- mono_debug_free_source_location (loc);
- }
- }
- }
-#endif
+ if (!ss_update (ss_req, ji, sp))
+ return;
/* Start single stepping again from the current sequence point */
- ss_start (ss_req, ji->method, sp, info, ctx, tls, FALSE);
+ ss_start (ss_req, method, sp, info, ctx, tls, FALSE);
if ((ss_req->filter & STEP_FILTER_STATIC_CTOR) &&
- (ji->method->flags & METHOD_ATTRIBUTE_SPECIAL_NAME) &&
- !strcmp (ji->method->name, ".cctor"))
+ (method->flags & METHOD_ATTRIBUTE_SPECIAL_NAME) &&
+ !strcmp (method->name, ".cctor"))
return;
// FIXME: Has to lock earlier
@@ -4771,7 +4836,7 @@ process_single_step_inner (DebuggerTlsData *tls)
mono_loader_unlock ();
- process_event (EVENT_KIND_STEP, ji->method, il_offset, ctx, events, suspend_policy);
+ process_event (EVENT_KIND_STEP, jinfo_get_method (ji), il_offset, ctx, events, suspend_policy);
}
static void
@@ -5321,7 +5386,7 @@ mono_debugger_agent_handle_exception (MonoException *exc, MonoContext *throw_ctx
if (assemblies) {
for (k = 0; assemblies [k]; ++k)
- if (assemblies [k] == catch_ji->method->klass->image->assembly)
+ if (assemblies [k] == jinfo_get_method (catch_ji)->klass->image->assembly)
found = TRUE;
}
if (!found)
@@ -5582,6 +5647,52 @@ static ErrorCode
decode_value (MonoType *t, MonoDomain *domain, guint8 *addr, guint8 *buf, guint8 **endbuf, guint8 *limit);
static ErrorCode
+decode_vtype (MonoType *t, MonoDomain *domain, guint8 *addr, guint8 *buf, guint8 **endbuf, guint8 *limit)
+{
+ gboolean is_enum;
+ MonoClass *klass;
+ MonoClassField *f;
+ int nfields;
+ gpointer iter = NULL;
+ MonoDomain *d;
+ int err;
+
+ is_enum = decode_byte (buf, &buf, limit);
+ /* Enums are sent as a normal vtype */
+ if (is_enum)
+ return ERR_NOT_IMPLEMENTED;
+ klass = decode_typeid (buf, &buf, limit, &d, &err);
+ if (err)
+ return err;
+
+ if (t && klass != mono_class_from_mono_type (t)) {
+ char *name = mono_type_full_name (t);
+ char *name2 = mono_type_full_name (&klass->byval_arg);
+ DEBUG(1, fprintf (log_file, "[%p] Expected value of type %s, got %s.\n", (gpointer)GetCurrentThreadId (), name, name2));
+ g_free (name);
+ g_free (name2);
+ return ERR_INVALID_ARGUMENT;
+ }
+
+ nfields = decode_int (buf, &buf, limit);
+ while ((f = mono_class_get_fields (klass, &iter))) {
+ if (f->type->attrs & FIELD_ATTRIBUTE_STATIC)
+ continue;
+ if (mono_field_is_deleted (f))
+ continue;
+ err = decode_value (f->type, domain, (guint8*)addr + f->offset - sizeof (MonoObject), buf, &buf, limit);
+ if (err)
+ return err;
+ nfields --;
+ }
+ g_assert (nfields == 0);
+
+ *endbuf = buf;
+
+ return 0;
+}
+
+static ErrorCode
decode_value_internal (MonoType *t, int type, MonoDomain *domain, guint8 *addr, guint8 *buf, guint8 **endbuf, guint8 *limit)
{
int err;
@@ -5653,38 +5764,11 @@ decode_value_internal (MonoType *t, int type, MonoDomain *domain, guint8 *addr,
g_assert (type == MONO_TYPE_VALUETYPE);
/* Fall through */
handle_vtype:
- case MONO_TYPE_VALUETYPE: {
- gboolean is_enum = decode_byte (buf, &buf, limit);
- MonoClass *klass;
- MonoClassField *f;
- int nfields;
- gpointer iter = NULL;
- MonoDomain *d;
-
- /* Enums are sent as a normal vtype */
- if (is_enum)
- return ERR_NOT_IMPLEMENTED;
- klass = decode_typeid (buf, &buf, limit, &d, &err);
+ case MONO_TYPE_VALUETYPE:
+ err = decode_vtype (t, domain, addr,buf, &buf, limit);
if (err)
return err;
-
- if (klass != mono_class_from_mono_type (t))
- return ERR_INVALID_ARGUMENT;
-
- nfields = decode_int (buf, &buf, limit);
- while ((f = mono_class_get_fields (klass, &iter))) {
- if (f->type->attrs & FIELD_ATTRIBUTE_STATIC)
- continue;
- if (mono_field_is_deleted (f))
- continue;
- err = decode_value (f->type, domain, (guint8*)addr + f->offset - sizeof (MonoObject), buf, &buf, limit);
- if (err)
- return err;
- nfields --;
- }
- g_assert (nfields == 0);
break;
- }
handle_ref:
default:
if (MONO_TYPE_IS_REFERENCE (t)) {
@@ -5709,7 +5793,44 @@ decode_value_internal (MonoType *t, int type, MonoDomain *domain, guint8 *addr,
mono_gc_wbarrier_generic_store (addr, obj);
} else if (type == VALUE_TYPE_ID_NULL) {
*(MonoObject**)addr = NULL;
+ } else if (type == MONO_TYPE_VALUETYPE) {
+ guint8 *buf2;
+ gboolean is_enum;
+ MonoClass *klass;
+ MonoDomain *d;
+ guint8 *vtype_buf;
+ int vtype_buf_size;
+
+ /* This can happen when round-tripping boxed vtypes */
+ /*
+ * Obtain vtype class.
+ * Same as the beginning of the handle_vtype case above.
+ */
+ buf2 = buf;
+ is_enum = decode_byte (buf, &buf, limit);
+ if (is_enum)
+ return ERR_NOT_IMPLEMENTED;
+ klass = decode_typeid (buf, &buf, limit, &d, &err);
+ if (err)
+ return err;
+
+ /* Decode the vtype into a temporary buffer, then box it. */
+ vtype_buf_size = mono_class_value_size (klass, NULL);
+ vtype_buf = g_malloc0 (vtype_buf_size);
+ g_assert (vtype_buf);
+
+ buf = buf2;
+ err = decode_vtype (NULL, domain, vtype_buf, buf, &buf, limit);
+ if (err) {
+ g_free (vtype_buf);
+ return err;
+ }
+ *(MonoObject**)addr = mono_value_box (d, klass, vtype_buf);
+ g_free (vtype_buf);
} else {
+ char *name = mono_type_full_name (t);
+ DEBUG(1, fprintf (log_file, "[%p] Expected value of type %s, got 0x%0x.\n", (gpointer)GetCurrentThreadId (), name, type));
+ g_free (name);
return ERR_INVALID_ARGUMENT;
}
} else {
@@ -5793,6 +5914,7 @@ add_var (Buffer *buf, MonoDebugMethodJitInfo *jit, MonoType *t, MonoDebugVarInfo
NOT_IMPLEMENTED;
break;
case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR:
+ case MONO_DEBUG_VAR_ADDRESS_MODE_VTADDR:
/* Same as regoffset, but with an indirection */
addr = (gpointer)mono_arch_context_get_int_reg (ctx, reg);
addr += (gint32)var->offset;
@@ -6101,8 +6223,10 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8
if (m->klass->valuetype && (m->flags & METHOD_ATTRIBUTE_STATIC)) {
/* Should be null */
int type = decode_byte (p, &p, end);
- if (type != VALUE_TYPE_ID_NULL)
+ if (type != VALUE_TYPE_ID_NULL) {
+ DEBUG (1, fprintf (log_file, "[%p] Error: Static vtype method invoked with this argument.\n", (gpointer)GetCurrentThreadId ()));
return ERR_INVALID_ARGUMENT;
+ }
memset (this_buf, 0, mono_class_instance_size (m->klass));
} else {
err = decode_value (&m->klass->byval_arg, domain, this_buf, p, &p, end);
@@ -6115,6 +6239,14 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8
else
this = NULL;
+ if (MONO_CLASS_IS_INTERFACE (m->klass)) {
+ if (!this) {
+ DEBUG (1, fprintf (log_file, "[%p] Error: Interface method invoked without this argument.\n", (gpointer)GetCurrentThreadId ()));
+ return ERR_INVALID_ARGUMENT;
+ }
+ m = mono_object_get_virtual_method (this, m);
+ }
+
DEBUG (1, fprintf (log_file, "[%p] Invoking method '%s' on receiver '%s'.\n", (gpointer)GetCurrentThreadId (), mono_method_full_name (m, TRUE), this ? this->vtable->klass->name : "<null>"));
if (this && this->vtable->domain != domain)
@@ -6282,13 +6414,9 @@ invoke_method (void)
int id;
int i, err, mindex;
Buffer buf;
- static void (*restore_context) (void *);
MonoContext restore_ctx;
guint8 *p;
- if (!restore_context)
- restore_context = mono_get_restore_context ();
-
tls = mono_native_tls_get_value (debugger_tls_id);
g_assert (tls);
@@ -6346,7 +6474,7 @@ invoke_method (void)
tls->resume_count -= invoke->suspend_count;
}
- DEBUG (1, fprintf (log_file, "[%p] Invoke finished, resume_count = %d.\n", (gpointer)GetCurrentThreadId (), tls->resume_count));
+ DEBUG (1, fprintf (log_file, "[%p] Invoke finished (%d), resume_count = %d.\n", (gpointer)GetCurrentThreadId (), err, tls->resume_count));
/*
* Take the loader lock to avoid race conditions with CMD_VM_ABORT_INVOKE:
@@ -6875,6 +7003,9 @@ event_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
if (CHECK_PROTOCOL_VERSION (2, 16))
filter = decode_int (p, &p, end);
req->modifiers [i].data.filter = filter;
+ if (!CHECK_PROTOCOL_VERSION (2, 26) && (req->modifiers [i].data.filter & STEP_FILTER_DEBUGGER_HIDDEN))
+ /* Treat STEP_THOUGH the same as HIDDEN */
+ req->modifiers [i].data.filter |= STEP_FILTER_DEBUGGER_STEP_THROUGH;
} else if (mod == MOD_KIND_THREAD_ONLY) {
int id = decode_id (p, &p, end);
@@ -6890,7 +7021,11 @@ event_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
return err;
req->modifiers [i].caught = decode_byte (p, &p, end);
req->modifiers [i].uncaught = decode_byte (p, &p, end);
- DEBUG(1, fprintf (log_file, "[dbg] \tEXCEPTION_ONLY filter (%s%s%s).\n", exc_class ? exc_class->name : "all", req->modifiers [i].caught ? ", caught" : "", req->modifiers [i].uncaught ? ", uncaught" : ""));
+ if (CHECK_PROTOCOL_VERSION (2, 25))
+ req->modifiers [i].subclasses = decode_byte (p, &p, end);
+ else
+ req->modifiers [i].subclasses = TRUE;
+ DEBUG(1, fprintf (log_file, "[dbg] \tEXCEPTION_ONLY filter (%s%s%s%s).\n", exc_class ? exc_class->name : "all", req->modifiers [i].caught ? ", caught" : "", req->modifiers [i].uncaught ? ", uncaught" : "", req->modifiers [i].subclasses ? ", include-subclasses" : ""));
if (exc_class) {
req->modifiers [i].data.exc_class = exc_class;
@@ -7304,9 +7439,11 @@ buffer_add_cattrs (Buffer *buf, MonoDomain *domain, MonoImage *image, MonoClass
if (!attr_klass || mono_class_has_parent (attr->ctor->klass, attr_klass)) {
MonoArray *typed_args, *named_args;
MonoType *t;
- CattrNamedArg *arginfo;
+ CattrNamedArg *arginfo = NULL;
+ MonoError error;
- mono_reflection_create_custom_attr_data_args (image, attr->ctor, attr->data, attr->data_size, &typed_args, &named_args, &arginfo);
+ mono_reflection_create_custom_attr_data_args (image, attr->ctor, attr->data, attr->data_size, &typed_args, &named_args, &arginfo, &error);
+ g_assert (mono_error_ok (&error));
buffer_add_methodid (buf, domain, attr->ctor);
@@ -7346,6 +7483,7 @@ buffer_add_cattrs (Buffer *buf, MonoDomain *domain, MonoImage *image, MonoClass
} else {
buffer_add_int (buf, 0);
}
+ g_free (arginfo);
}
}
}
@@ -8744,41 +8882,188 @@ command_set_to_string (CommandSet command_set)
}
}
+static const char* vm_cmds_str [] = {
+ "VERSION",
+ "ALL_THREADS",
+ "SUSPEND",
+ "RESUME",
+ "EXIT",
+ "DISPOSE",
+ "INVOKE_METHOD",
+ "SET_PROTOCOL_VERSION",
+ "ABORT_INVOKE",
+ "SET_KEEPALIVE"
+ "GET_TYPES_FOR_SOURCE_FILE",
+ "GET_TYPES",
+ "INVOKE_METHODS"
+};
+
+static const char* thread_cmds_str[] = {
+ "GET_FRAME_INFO",
+ "GET_NAME",
+ "GET_STATE",
+ "GET_INFO",
+ "GET_ID",
+ "GET_TID"
+};
+
+static const char* event_cmds_str[] = {
+ "REQUEST_SET",
+ "REQUEST_CLEAR",
+ "REQUEST_CLEAR_ALL_BREAKPOINTS"
+};
+
+static const char* appdomain_cmds_str[] = {
+ "GET_ROOT_DOMAIN",
+ "GET_FRIENDLY_NAME",
+ "GET_ASSEMBLIES",
+ "GET_ENTRY_ASSEMBLY",
+ "CREATE_STRING",
+ "GET_CORLIB",
+ "CREATE_BOXED_VALUE"
+};
+
+static const char* assembly_cmds_str[] = {
+ "GET_LOCATION",
+ "GET_ENTRY_POINT",
+ "GET_MANIFEST_MODULE",
+ "GET_OBJECT",
+ "GET_TYPE",
+ "GET_NAME"
+};
+
+static const char* module_cmds_str[] = {
+ "GET_INFO",
+};
+
+static const char* method_cmds_str[] = {
+ "GET_NAME",
+ "GET_DECLARING_TYPE",
+ "GET_DEBUG_INFO",
+ "GET_PARAM_INFO",
+ "GET_LOCALS_INFO",
+ "GET_INFO",
+ "GET_BODY",
+ "RESOLVE_TOKEN",
+ "GET_CATTRS ",
+ "MAKE_GENERIC_METHOD"
+};
+
+static const char* type_cmds_str[] = {
+ "GET_INFO",
+ "GET_METHODS",
+ "GET_FIELDS",
+ "GET_VALUES",
+ "GET_OBJECT",
+ "GET_SOURCE_FILES",
+ "SET_VALUES",
+ "IS_ASSIGNABLE_FROM",
+ "GET_PROPERTIES ",
+ "GET_CATTRS",
+ "GET_FIELD_CATTRS",
+ "GET_PROPERTY_CATTRS",
+ "GET_SOURCE_FILES_2",
+ "GET_VALUES_2",
+ "GET_METHODS_BY_NAME_FLAGS",
+ "GET_INTERFACES",
+ "GET_INTERFACE_MAP",
+ "IS_INITIALIZED"
+};
+
+static const char* stack_frame_cmds_str[] = {
+ "GET_VALUES",
+ "GET_THIS",
+ "SET_VALUES"
+};
+
+static const char* array_cmds_str[] = {
+ "GET_LENGTH",
+ "GET_VALUES",
+ "SET_VALUES",
+};
+
+static const char* string_cmds_str[] = {
+ "GET_VALUE",
+ "GET_LENGTH",
+ "GET_CHARS"
+};
+
+static const char* object_cmds_str[] = {
+ "GET_TYPE",
+ "GET_VALUES",
+ "IS_COLLECTED",
+ "GET_ADDRESS",
+ "GET_DOMAIN",
+ "SET_VALUES",
+ "GET_INFO",
+};
+
static const char*
cmd_to_string (CommandSet set, int command)
{
+ const char **cmds;
+ int cmds_len = 0;
+
switch (set) {
- case CMD_SET_VM: {
- switch (command) {
- case CMD_VM_VERSION:
- return "VERSION";
- case CMD_VM_ALL_THREADS:
- return "ALL_THREADS";
- case CMD_VM_SUSPEND:
- return "SUSPEND";
- case CMD_VM_RESUME:
- return "RESUME";
- case CMD_VM_EXIT:
- return "EXIT";
- case CMD_VM_DISPOSE:
- return "DISPOSE";
- case CMD_VM_INVOKE_METHOD:
- return "INVOKE_METHOD";
- case CMD_VM_SET_PROTOCOL_VERSION:
- return "SET_PROTOCOL_VERSION";
- case CMD_VM_ABORT_INVOKE:
- return "ABORT_INVOKE";
- case CMD_VM_SET_KEEPALIVE:
- return "SET_KEEPALIVE";
- default:
- break;
- }
+ case CMD_SET_VM:
+ cmds = vm_cmds_str;
+ cmds_len = G_N_ELEMENTS (vm_cmds_str);
break;
- }
- default:
+ case CMD_SET_OBJECT_REF:
+ cmds = object_cmds_str;
+ cmds_len = G_N_ELEMENTS (object_cmds_str);
break;
+ case CMD_SET_STRING_REF:
+ cmds = string_cmds_str;
+ cmds_len = G_N_ELEMENTS (string_cmds_str);
+ break;
+ case CMD_SET_THREAD:
+ cmds = thread_cmds_str;
+ cmds_len = G_N_ELEMENTS (thread_cmds_str);
+ break;
+ case CMD_SET_ARRAY_REF:
+ cmds = array_cmds_str;
+ cmds_len = G_N_ELEMENTS (array_cmds_str);
+ break;
+ case CMD_SET_EVENT_REQUEST:
+ cmds = event_cmds_str;
+ cmds_len = G_N_ELEMENTS (event_cmds_str);
+ break;
+ case CMD_SET_STACK_FRAME:
+ cmds = stack_frame_cmds_str;
+ cmds_len = G_N_ELEMENTS (stack_frame_cmds_str);
+ break;
+ case CMD_SET_APPDOMAIN:
+ cmds = appdomain_cmds_str;
+ cmds_len = G_N_ELEMENTS (appdomain_cmds_str);
+ break;
+ case CMD_SET_ASSEMBLY:
+ cmds = assembly_cmds_str;
+ cmds_len = G_N_ELEMENTS (assembly_cmds_str);
+ break;
+ case CMD_SET_METHOD:
+ cmds = method_cmds_str;
+ cmds_len = G_N_ELEMENTS (method_cmds_str);
+ break;
+ case CMD_SET_TYPE:
+ cmds = type_cmds_str;
+ cmds_len = G_N_ELEMENTS (type_cmds_str);
+ break;
+ case CMD_SET_MODULE:
+ cmds = module_cmds_str;
+ cmds_len = G_N_ELEMENTS (module_cmds_str);
+ break;
+ case CMD_SET_EVENT:
+ cmds = event_cmds_str;
+ cmds_len = G_N_ELEMENTS (event_cmds_str);
+ break;
+ default:
+ return NULL;
}
- return NULL;
+ if (command > 0 && command <= cmds_len)
+ return cmds [command - 1];
+ else
+ return NULL;
}
static gboolean
@@ -8878,7 +9163,7 @@ debugger_thread (void *arg)
cmd_str = cmd_num;
}
- DEBUG (1, fprintf (log_file, "[dbg] Received command %s(%s), id=%d.\n", command_set_to_string (command_set), cmd_str, id));
+ DEBUG (1, fprintf (log_file, "[dbg] Command %s(%s) [%d].\n", command_set_to_string (command_set), cmd_str, id));
}
data = g_malloc (len - HEADER_LENGTH);
diff --git a/mono/mini/declsec.c b/mono/mini/declsec.c
index fa06e6efdd9..1ece56bdc46 100644
--- a/mono/mini/declsec.c
+++ b/mono/mini/declsec.c
@@ -47,19 +47,21 @@ void
mono_declsec_cache_stack_modifiers (MonoJitInfo *jinfo)
{
MonoMethodCasInfo *info = mono_jit_info_get_cas_info (jinfo);
+ MonoMethod *method;
guint32 flags;
if (!info)
return;
+ method = jinfo_get_method (jinfo);
/* first find the stack modifiers applied to the method */
- flags = mono_declsec_flags_from_method (jinfo->method);
+ flags = mono_declsec_flags_from_method (method);
info->cas_method_assert = (flags & MONO_DECLSEC_FLAG_ASSERT) != 0;
info->cas_method_deny = (flags & MONO_DECLSEC_FLAG_DENY) != 0;
info->cas_method_permitonly = (flags & MONO_DECLSEC_FLAG_PERMITONLY) != 0;
/* then find the stack modifiers applied to the class */
- flags = mono_declsec_flags_from_class (jinfo->method->klass);
+ flags = mono_declsec_flags_from_class (method->klass);
info->cas_class_assert = (flags & MONO_DECLSEC_FLAG_ASSERT) != 0;
info->cas_class_deny = (flags & MONO_DECLSEC_FLAG_DENY) != 0;
info->cas_class_permitonly = (flags & MONO_DECLSEC_FLAG_PERMITONLY) != 0;
@@ -71,41 +73,43 @@ mono_declsec_create_frame (MonoDomain *domain, MonoJitInfo *jinfo)
{
MonoSecurityFrame *frame = (MonoSecurityFrame*) mono_object_new (domain, mono_defaults.runtimesecurityframe_class);
MonoMethodCasInfo *info;
+ MonoMethod *method;
+ method = jinfo_get_method (jinfo);
info = mono_jit_info_get_cas_info (jinfo);
if (info && !info->cas_inited) {
- if (mono_method_has_declsec (jinfo->method)) {
+ if (mono_method_has_declsec (method)) {
/* Cache the stack modifiers into the MonoJitInfo structure to speed up future stack walks */
mono_declsec_cache_stack_modifiers (jinfo);
}
info->cas_inited = TRUE;
}
- MONO_OBJECT_SETREF (frame, method, mono_method_get_object (domain, jinfo->method, NULL));
+ MONO_OBJECT_SETREF (frame, method, mono_method_get_object (domain, method, NULL));
MONO_OBJECT_SETREF (frame, domain, domain->domain);
/* stack modifiers on methods have priority on (i.e. replaces) modifiers on class */
if (info && info->cas_method_assert) {
- mono_declsec_get_method_action (jinfo->method, SECURITY_ACTION_ASSERT, &frame->assert);
+ mono_declsec_get_method_action (method, SECURITY_ACTION_ASSERT, &frame->assert);
} else if (info && info->cas_class_assert) {
- mono_declsec_get_class_action (jinfo->method->klass, SECURITY_ACTION_ASSERT, &frame->assert);
+ mono_declsec_get_class_action (method->klass, SECURITY_ACTION_ASSERT, &frame->assert);
}
if (info && info->cas_method_deny) {
- mono_declsec_get_method_action (jinfo->method, SECURITY_ACTION_DENY, &frame->deny);
+ mono_declsec_get_method_action (method, SECURITY_ACTION_DENY, &frame->deny);
} else if (info && info->cas_class_deny) {
- mono_declsec_get_class_action (jinfo->method->klass, SECURITY_ACTION_DENY, &frame->deny);
+ mono_declsec_get_class_action (method->klass, SECURITY_ACTION_DENY, &frame->deny);
}
if (info && info->cas_method_permitonly) {
- mono_declsec_get_method_action (jinfo->method, SECURITY_ACTION_PERMITONLY, &frame->permitonly);
+ mono_declsec_get_method_action (method, SECURITY_ACTION_PERMITONLY, &frame->permitonly);
} else if (info && info->cas_class_permitonly) {
- mono_declsec_get_class_action (jinfo->method->klass, SECURITY_ACTION_PERMITONLY, &frame->permitonly);
+ mono_declsec_get_class_action (method->klass, SECURITY_ACTION_PERMITONLY, &frame->permitonly);
}
/* g_warning ("FRAME %s A(%p,%d) D(%p,%d) PO(%p,%d)",
- jinfo->method->name, frame->assert.blob, frame->assert.size, frame->deny.blob, frame->deny.size, frame->permitonly.blob,frame->permitonly.size); */
+ method->name, frame->assert.blob, frame->assert.size, frame->deny.blob, frame->deny.size, frame->permitonly.blob,frame->permitonly.size); */
return frame;
}
diff --git a/mono/mini/decompose.c b/mono/mini/decompose.c
index c15502818fb..1bbdedb4307 100644
--- a/mono/mini/decompose.c
+++ b/mono/mini/decompose.c
@@ -17,7 +17,7 @@
#ifndef DISABLE_JIT
/* FIXME: This conflicts with the definition in mini.c, so it cannot be moved to mini.h */
-MonoInst* mono_emit_native_call (MonoCompile *cfg, gconstpointer func, MonoMethodSignature *sig, MonoInst **args);
+MONO_API MonoInst* mono_emit_native_call (MonoCompile *cfg, gconstpointer func, MonoMethodSignature *sig, MonoInst **args);
void mini_emit_stobj (MonoCompile *cfg, MonoInst *dest, MonoInst *src, MonoClass *klass, gboolean native);
void mini_emit_initobj (MonoCompile *cfg, MonoInst *dest, const guchar *ip, MonoClass *klass);
@@ -1483,7 +1483,7 @@ typedef union {
double vald;
} DVal;
-#ifdef MONO_ARCH_SOFT_FLOAT
+#ifdef MONO_ARCH_SOFT_FLOAT_FALLBACK
/**
* mono_decompose_soft_float:
diff --git a/mono/mini/driver.c b/mono/mini/driver.c
index fc2cb65ff87..1e3c8dea77a 100644
--- a/mono/mini/driver.c
+++ b/mono/mini/driver.c
@@ -47,6 +47,7 @@
#include <mono/metadata/coree.h>
#include <mono/metadata/attach.h>
#include "mono/utils/mono-counters.h"
+#include "mono/utils/mono-hwcap.h"
#include "mini.h"
#include "jit.h"
@@ -136,6 +137,7 @@ extern char *nacl_mono_path;
MONO_OPT_CMOV | \
MONO_OPT_GSHARED | \
MONO_OPT_SIMD | \
+ MONO_OPT_ALIAS_ANALYSIS | \
MONO_OPT_AOT)
#define EXCLUDED_FROM_ALL (MONO_OPT_SHARED | MONO_OPT_PRECOMP | MONO_OPT_UNSAFE | MONO_OPT_GSHAREDVT)
@@ -149,6 +151,9 @@ parse_optimizations (const char* p)
const char *n;
int i, invert, len;
+ /* Initialize the hwcap module if necessary. */
+ mono_hwcap_init ();
+
/* call out to cpu detection code here that sets the defaults ... */
opt |= mono_arch_cpu_optimizations (&exclude);
opt &= ~exclude;
@@ -305,16 +310,19 @@ opt_sets [] = {
MONO_OPT_BRANCH,
MONO_OPT_CFOLD,
MONO_OPT_FCMOV,
+ MONO_OPT_ALIAS_ANALYSIS,
#ifdef MONO_ARCH_SIMD_INTRINSICS
MONO_OPT_SIMD,
MONO_OPT_SSE2,
MONO_OPT_SIMD | MONO_OPT_SSE2,
#endif
MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_INTRINS,
+ MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_INTRINS | MONO_OPT_ALIAS_ANALYSIS,
MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_LINEARS,
MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_LINEARS | MONO_OPT_COPYPROP,
MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_LINEARS | MONO_OPT_CFOLD,
MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_LINEARS | MONO_OPT_COPYPROP | MONO_OPT_CONSPROP | MONO_OPT_DEADCE,
+ MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_LINEARS | MONO_OPT_COPYPROP | MONO_OPT_CONSPROP | MONO_OPT_DEADCE | MONO_OPT_ALIAS_ANALYSIS,
MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_LINEARS | MONO_OPT_COPYPROP | MONO_OPT_CONSPROP | MONO_OPT_DEADCE | MONO_OPT_LOOP | MONO_OPT_INLINE | MONO_OPT_INTRINS,
MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_LINEARS | MONO_OPT_COPYPROP | MONO_OPT_CONSPROP | MONO_OPT_DEADCE | MONO_OPT_LOOP | MONO_OPT_INLINE | MONO_OPT_INTRINS | MONO_OPT_TAILC,
MONO_OPT_BRANCH | MONO_OPT_PEEPHOLE | MONO_OPT_LINEARS | MONO_OPT_COPYPROP | MONO_OPT_CONSPROP | MONO_OPT_DEADCE | MONO_OPT_LOOP | MONO_OPT_INLINE | MONO_OPT_INTRINS | MONO_OPT_SSA,
@@ -338,19 +346,105 @@ domain_dump_native_code (MonoDomain *domain) {
}
#endif
+static void
+mini_regression_step (MonoImage *image, int verbose, int *total_run, int *total,
+ guint32 opt_flags,
+ GTimer *timer, MonoDomain *domain)
+{
+ int result, expected, failed, cfailed, run, code_size;
+ TestMethod func;
+ double elapsed, comp_time, start_time;
+ char *n;
+ int i;
+
+ mono_set_defaults (verbose, opt_flags);
+ n = opt_descr (opt_flags);
+ g_print ("Test run: image=%s, opts=%s\n", mono_image_get_filename (image), n);
+ g_free (n);
+ cfailed = failed = run = code_size = 0;
+ comp_time = elapsed = 0.0;
+
+ /* fixme: ugly hack - delete all previously compiled methods */
+ if (domain_jit_info (domain)) {
+ g_hash_table_destroy (domain_jit_info (domain)->jit_trampoline_hash);
+ domain_jit_info (domain)->jit_trampoline_hash = g_hash_table_new (mono_aligned_addr_hash, NULL);
+ mono_internal_hash_table_destroy (&(domain->jit_code_hash));
+ mono_jit_code_hash_init (&(domain->jit_code_hash));
+ }
+
+ g_timer_start (timer);
+ if (mini_stats_fd)
+ fprintf (mini_stats_fd, "[");
+ for (i = 0; i < mono_image_get_table_rows (image, MONO_TABLE_METHOD); ++i) {
+ MonoMethod *method = mono_get_method (image, MONO_TOKEN_METHOD_DEF | (i + 1), NULL);
+ if (!method)
+ continue;
+ if (strncmp (method->name, "test_", 5) == 0) {
+ MonoCompile *cfg;
+
+ expected = atoi (method->name + 5);
+ run++;
+ start_time = g_timer_elapsed (timer, NULL);
+ comp_time -= start_time;
+ cfg = mini_method_compile (method, mono_get_optimizations_for_method (method, opt_flags), mono_get_root_domain (), TRUE, FALSE, 0);
+ comp_time += g_timer_elapsed (timer, NULL);
+ if (cfg->exception_type == MONO_EXCEPTION_NONE) {
+ if (verbose >= 2)
+ g_print ("Running '%s' ...\n", method->name);
+#ifdef MONO_USE_AOT_COMPILER
+ if ((func = mono_aot_get_method (mono_get_root_domain (), method)))
+ ;
+ else
+#endif
+ func = (TestMethod)(gpointer)cfg->native_code;
+ func = (TestMethod)mono_create_ftnptr (mono_get_root_domain (), func);
+ result = func ();
+ if (result != expected) {
+ failed++;
+ g_print ("Test '%s' failed result (got %d, expected %d).\n", method->name, result, expected);
+ }
+ code_size += cfg->code_len;
+ mono_destroy_compile (cfg);
+
+ } else {
+ cfailed++;
+ if (verbose)
+ g_print ("Test '%s' failed compilation.\n", method->name);
+ }
+ if (mini_stats_fd)
+ fprintf (mini_stats_fd, "%f, ",
+ g_timer_elapsed (timer, NULL) - start_time);
+ }
+ }
+ if (mini_stats_fd)
+ fprintf (mini_stats_fd, "],\n");
+ g_timer_stop (timer);
+ elapsed = g_timer_elapsed (timer, NULL);
+ if (failed > 0 || cfailed > 0){
+ g_print ("Results: total tests: %d, failed: %d, cfailed: %d (pass: %.2f%%)\n",
+ run, failed, cfailed, 100.0*(run-failed-cfailed)/run);
+ } else {
+ g_print ("Results: total tests: %d, all pass \n", run);
+ }
+
+ g_print ("Elapsed time: %f secs (%f, %f), Code size: %d\n\n", elapsed,
+ elapsed - comp_time, comp_time, code_size);
+ *total += failed + cfailed;
+ *total_run += run;
+}
+
static int
mini_regression (MonoImage *image, int verbose, int *total_run)
{
- guint32 i, opt, opt_flags;
+ guint32 i, opt;
MonoMethod *method;
- MonoCompile *cfg;
char *n;
- int result, expected, failed, cfailed, run, code_size, total;
- TestMethod func;
GTimer *timer = g_timer_new ();
MonoDomain *domain = mono_domain_get ();
guint32 exclude = 0;
+ int total;
+ /* Note: mono_hwcap_init () called in mono_init () before we get here. */
mono_arch_cpu_optimizations (&exclude);
if (mini_stats_fd) {
@@ -358,7 +452,7 @@ mini_regression (MonoImage *image, int verbose, int *total_run)
fprintf (mini_stats_fd, "$graph->set_legend(qw(");
for (opt = 0; opt < G_N_ELEMENTS (opt_sets); opt++) {
- opt_flags = opt_sets [opt];
+ guint32 opt_flags = opt_sets [opt];
n = opt_descr (opt_flags);
if (!n [0])
n = (char *)"none";
@@ -391,80 +485,37 @@ mini_regression (MonoImage *image, int verbose, int *total_run)
total = 0;
*total_run = 0;
- for (opt = 0; opt < G_N_ELEMENTS (opt_sets); ++opt) {
- double elapsed, comp_time, start_time;
-
- opt_flags = opt_sets [opt] & ~exclude;
- mono_set_defaults (verbose, opt_flags);
- n = opt_descr (opt_flags);
- g_print ("Test run: image=%s, opts=%s\n", mono_image_get_filename (image), n);
- g_free (n);
- cfailed = failed = run = code_size = 0;
- comp_time = elapsed = 0.0;
-
- /* fixme: ugly hack - delete all previously compiled methods */
- g_hash_table_destroy (domain_jit_info (domain)->jit_trampoline_hash);
- domain_jit_info (domain)->jit_trampoline_hash = g_hash_table_new (mono_aligned_addr_hash, NULL);
- mono_internal_hash_table_destroy (&(domain->jit_code_hash));
- mono_jit_code_hash_init (&(domain->jit_code_hash));
-
- g_timer_start (timer);
- if (mini_stats_fd)
- fprintf (mini_stats_fd, "[");
- for (i = 0; i < mono_image_get_table_rows (image, MONO_TABLE_METHOD); ++i) {
- method = mono_get_method (image, MONO_TOKEN_METHOD_DEF | (i + 1), NULL);
- if (!method)
- continue;
- if (strncmp (method->name, "test_", 5) == 0) {
- expected = atoi (method->name + 5);
- run++;
- start_time = g_timer_elapsed (timer, NULL);
- comp_time -= start_time;
- cfg = mini_method_compile (method, opt_flags, mono_get_root_domain (), TRUE, FALSE, 0);
- comp_time += g_timer_elapsed (timer, NULL);
- if (cfg->exception_type == MONO_EXCEPTION_NONE) {
- if (verbose >= 2)
- g_print ("Running '%s' ...\n", method->name);
-#ifdef MONO_USE_AOT_COMPILER
- if ((func = mono_aot_get_method (mono_get_root_domain (), method)))
- ;
- else
-#endif
- func = (TestMethod)(gpointer)cfg->native_code;
- func = (TestMethod)mono_create_ftnptr (mono_get_root_domain (), func);
- result = func ();
- if (result != expected) {
- failed++;
- g_print ("Test '%s' failed result (got %d, expected %d).\n", method->name, result, expected);
- }
- code_size += cfg->code_len;
- mono_destroy_compile (cfg);
-
- } else {
- cfailed++;
- if (verbose)
- g_print ("Test '%s' failed compilation.\n", method->name);
- }
- if (mini_stats_fd)
- fprintf (mini_stats_fd, "%f, ",
- g_timer_elapsed (timer, NULL) - start_time);
- }
+ if (mono_do_single_method_regression) {
+ GSList *iter;
+
+ mini_regression_step (image, verbose, total_run, &total,
+ 0,
+ timer, domain);
+ if (total)
+ return total;
+ g_print ("Single method regression: %d methods\n", g_slist_length (mono_single_method_list));
+
+ for (iter = mono_single_method_list; iter; iter = g_slist_next (iter)) {
+ char *method_name;
+
+ mono_current_single_method = iter->data;
+
+ method_name = mono_method_full_name (mono_current_single_method, TRUE);
+ g_print ("Current single method: %s\n", method_name);
+ g_free (method_name);
+
+ mini_regression_step (image, verbose, total_run, &total,
+ 0,
+ timer, domain);
+ if (total)
+ return total;
}
- if (mini_stats_fd)
- fprintf (mini_stats_fd, "],\n");
- g_timer_stop (timer);
- elapsed = g_timer_elapsed (timer, NULL);
- if (failed > 0 || cfailed > 0){
- g_print ("Results: total tests: %d, failed: %d, cfailed: %d (pass: %.2f%%)\n",
- run, failed, cfailed, 100.0*(run-failed-cfailed)/run);
- } else {
- g_print ("Results: total tests: %d, all pass \n", run);
+ } else {
+ for (opt = 0; opt < G_N_ELEMENTS (opt_sets); ++opt) {
+ mini_regression_step (image, verbose, total_run, &total,
+ opt_sets [opt] & ~exclude,
+ timer, domain);
}
-
- g_print ("Elapsed time: %f secs (%f, %f), Code size: %d\n\n", elapsed,
- elapsed - comp_time, comp_time, code_size);
- total += failed + cfailed;
- *total_run += run;
}
if (mini_stats_fd) {
@@ -590,7 +641,7 @@ alloc_random_data (Region *region)
g_assert (d->start >= prev_end && d->start + d->length <= next_start);
d->ji = g_new0 (MonoJitInfo, 1);
- d->ji->method = (MonoMethod*) 0xABadBabe;
+ d->ji->d.method = (MonoMethod*) 0xABadBabe;
d->ji->code_start = (gpointer)(gulong) d->start;
d->ji->code_size = d->length;
d->ji->cas_inited = 1; /* marks an allocated jit info */
@@ -824,6 +875,7 @@ jit_info_table_test (MonoDomain *domain)
enum {
DO_BENCH,
DO_REGRESSION,
+ DO_SINGLE_METHOD_REGRESSION,
DO_COMPILE,
DO_EXEC,
DO_DRAW,
@@ -883,7 +935,7 @@ compile_all_methods_thread_main_inner (CompileAllThreadArgs *args)
g_print ("Compiling %d %s\n", count, desc);
g_free (desc);
}
- cfg = mini_method_compile (method, args->opts, mono_get_root_domain (), FALSE, FALSE, 0);
+ cfg = mini_method_compile (method, mono_get_optimizations_for_method (method, args->opts), mono_get_root_domain (), FALSE, FALSE, 0);
if (cfg->exception_type != MONO_EXCEPTION_NONE) {
printf ("Compilation of %s failed with exception '%s':\n", mono_method_full_name (cfg->method, TRUE), cfg->exception_message);
fail_count ++;
@@ -1095,6 +1147,7 @@ mini_usage_jitdeveloper (void)
" --ncompile N Number of times to compile METHOD (default: 1)\n"
" --print-vtable Print the vtable of all used classes\n"
" --regression Runs the regression test contained in the assembly\n"
+ " --single-method=OPTS Runs regressions with only one method optimized with OPTS at any time\n"
" --statfile FILE Sets the stat file to FILE\n"
" --stats Print statistics about the JIT operations\n"
" --wapi=hps|semdel|seminfo IO-layer maintenance\n"
@@ -1346,6 +1399,8 @@ mono_jit_parse_options (int argc, char * argv[])
} else if (strcmp (argv [i], "--llvm") == 0) {
#ifndef MONO_ARCH_LLVM_SUPPORTED
fprintf (stderr, "Mono Warning: --llvm not supported on this platform.\n");
+#elif !defined(ENABLE_LLVM)
+ fprintf (stderr, "Mono Warning: --llvm not enabled in this runtime.\n");
#else
mono_use_llvm = TRUE;
#endif
@@ -1463,7 +1518,7 @@ mono_main (int argc, char* argv[])
setlocale (LC_ALL, "");
- if (getenv ("MONO_NO_SMP"))
+ if (g_getenv ("MONO_NO_SMP"))
mono_set_use_smp (FALSE);
if (!g_thread_supported ())
@@ -1479,13 +1534,18 @@ mono_main (int argc, char* argv[])
break;
if (strcmp (argv [i], "--regression") == 0) {
action = DO_REGRESSION;
+ } else if (strncmp (argv [i], "--single-method=", 16) == 0) {
+ char *full_opts = g_strdup_printf ("-all,%s", argv [i] + 16);
+ action = DO_SINGLE_METHOD_REGRESSION;
+ mono_single_method_regression_opt = parse_optimizations (full_opts);
+ g_free (full_opts);
} else if (strcmp (argv [i], "--verbose") == 0 || strcmp (argv [i], "-v") == 0) {
mini_verbose++;
} else if (strcmp (argv [i], "--version") == 0 || strcmp (argv [i], "-V") == 0) {
char *build = mono_get_runtime_build_info ();
char *gc_descr;
- g_print ("Mono JIT compiler version %s\nCopyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com\n", build);
+ g_print ("Mono Runtime Engine version %s\nCopyright (C) 2002-2013 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com\n", build);
g_free (build);
g_print (info);
gc_descr = mono_gc_get_description ();
@@ -1718,9 +1778,10 @@ mono_main (int argc, char* argv[])
}
} else if (strcmp (argv [i], "--desktop") == 0) {
mono_gc_set_desktop_mode ();
- /* Put desktop-specific optimizations here */
+ /* Put more desktop-specific optimizations here */
} else if (strcmp (argv [i], "--server") == 0){
- /* Put server-specific optimizations here */
+ mono_config_set_server_mode (TRUE);
+ /* Put more server-specific optimizations here */
} else if (strcmp (argv [i], "--inside-mdb") == 0) {
action = DO_DEBUGGER;
} else if (strncmp (argv [i], "--wapi=", 7) == 0) {
@@ -1743,6 +1804,8 @@ mono_main (int argc, char* argv[])
} else if (strcmp (argv [i], "--llvm") == 0) {
#ifndef MONO_ARCH_LLVM_SUPPORTED
fprintf (stderr, "Mono Warning: --llvm not supported on this platform.\n");
+#elif !defined(ENABLE_LLVM)
+ fprintf (stderr, "Mono Warning: --llvm not enabled in this runtime.\n");
#else
mono_use_llvm = TRUE;
#endif
@@ -1765,7 +1828,7 @@ mono_main (int argc, char* argv[])
}
#ifdef __native_client_codegen__
- if (getenv ("MONO_NACL_ALIGN_MASK_OFF"))
+ if (g_getenv ("MONO_NACL_ALIGN_MASK_OFF"))
{
nacl_align_byte = -1; /* 0xff */
}
@@ -1780,7 +1843,7 @@ mono_main (int argc, char* argv[])
return 1;
}
- if (getenv ("MONO_XDEBUG"))
+ if (g_getenv ("MONO_XDEBUG"))
enable_debugging = TRUE;
#ifdef MONO_CROSS_COMPILE
@@ -1868,6 +1931,8 @@ mono_main (int argc, char* argv[])
}
switch (action) {
+ case DO_SINGLE_METHOD_REGRESSION:
+ mono_do_single_method_regression = TRUE;
case DO_REGRESSION:
if (mini_regression_list (mini_verbose, argc -i, argv + i)) {
g_print ("Regression ERRORS!\n");
diff --git a/mono/mini/dwarfwriter.c b/mono/mini/dwarfwriter.c
index ae72268f8d8..d00b7332e32 100644
--- a/mono/mini/dwarfwriter.c
+++ b/mono/mini/dwarfwriter.c
@@ -35,7 +35,6 @@ typedef struct {
char *start_symbol, *end_symbol;
guint8 *code;
guint32 code_size;
- MonoDebugMethodJitInfo *debug_info;
} MethodLineNumberInfo;
struct _MonoDwarfWriter
@@ -742,14 +741,15 @@ emit_line_number_info_begin (MonoDwarfWriter *w)
emit_label (w, ".Ldebug_line_end");
}
-static char *
-escape_path (char *name)
+char *
+mono_dwarf_escape_path (const char *name)
{
if (strchr (name, '\\')) {
- char *s = g_malloc (strlen (name) * 2);
+ char *s;
int len, i, j;
len = strlen (name);
+ s = g_malloc0 ((len + 1) * 2);
j = 0;
for (i = 0; i < len; ++i) {
if (name [i] == '\\') {
@@ -761,7 +761,7 @@ escape_path (char *name)
}
return s;
}
- return name;
+ return g_strdup (name);
}
static void
@@ -852,7 +852,7 @@ emit_all_line_number_info (MonoDwarfWriter *w)
for (i = 0; i < w->line_number_dir_index; ++i) {
char *dir = g_hash_table_lookup (index_to_dir, GUINT_TO_POINTER (i + 1));
- emit_string (w, escape_path (dir));
+ emit_string (w, mono_dwarf_escape_path (dir));
}
/* End of Includes */
emit_byte (w, 0);
@@ -873,7 +873,7 @@ emit_all_line_number_info (MonoDwarfWriter *w)
if (basename)
emit_string (w, basename);
else
- emit_string (w, escape_path (name));
+ emit_string (w, mono_dwarf_escape_path (name));
emit_uleb128 (w, dir_index);
emit_byte (w, 0);
emit_byte (w, 0);
@@ -887,8 +887,11 @@ emit_all_line_number_info (MonoDwarfWriter *w)
/* Emit line number table */
for (l = info_list; l; l = l->next) {
MethodLineNumberInfo *info = l->data;
+ MonoDebugMethodJitInfo *dmji;
- emit_line_number_info (w, info->method, info->start_symbol, info->end_symbol, info->code, info->code_size, info->debug_info);
+ dmji = mono_debug_find_method (info->method, mono_domain_get ());;
+ emit_line_number_info (w, info->method, info->start_symbol, info->end_symbol, info->code, info->code_size, dmji);
+ mono_debug_free_method_jit_info (dmji);
}
g_slist_free (info_list);
@@ -2082,7 +2085,6 @@ mono_dwarf_writer_emit_method (MonoDwarfWriter *w, MonoCompile *cfg, MonoMethod
info->end_symbol = g_strdup (end_symbol);
info->code = code;
info->code_size = code_size;
- info->debug_info = debug_info;
w->line_info = g_slist_prepend (w->line_info, info);
} else {
emit_line_number_info (w, method, start_symbol, end_symbol, code, code_size, debug_info);
diff --git a/mono/mini/dwarfwriter.h b/mono/mini/dwarfwriter.h
index 37927826dad..490f821fb79 100644
--- a/mono/mini/dwarfwriter.h
+++ b/mono/mini/dwarfwriter.h
@@ -35,4 +35,7 @@ void mono_dwarf_writer_emit_trampoline (MonoDwarfWriter *w, const char *tramp_na
void
mono_dwarf_writer_emit_method (MonoDwarfWriter *w, MonoCompile *cfg, MonoMethod *method, char *start_symbol, char *end_symbol, guint8 *code, guint32 code_size, MonoInst **args, MonoInst **locals, GSList *unwind_info, MonoDebugMethodJitInfo *debug_info) MONO_INTERNAL;
+char *
+mono_dwarf_escape_path (const char *name);
+
#endif
diff --git a/mono/mini/exceptions-amd64.c b/mono/mini/exceptions-amd64.c
index e5bee78641e..b1384de0fd2 100644
--- a/mono/mini/exceptions-amd64.c
+++ b/mono/mini/exceptions-amd64.c
@@ -9,6 +9,13 @@
*/
#include <config.h>
+
+#if _WIN32_WINNT < 0x0501
+/* Required for Vectored Exception Handling. */
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif /* _WIN32_WINNT < 0x0501 */
+
#include <glib.h>
#include <signal.h>
#include <string.h>
@@ -40,24 +47,37 @@ static MonoW32ExceptionHandler ill_handler;
static MonoW32ExceptionHandler segv_handler;
LPTOP_LEVEL_EXCEPTION_FILTER mono_old_win_toplevel_exception_filter;
-guint64 mono_win_chained_exception_filter_result;
-gboolean mono_win_chained_exception_filter_didrun;
+guint64 mono_win_vectored_exception_handle;
+extern gboolean mono_win_chained_exception_needs_run;
#define W32_SEH_HANDLE_EX(_ex) \
if (_ex##_handler) _ex##_handler(0, ep, sctx)
+LONG CALLBACK seh_unhandled_exception_filter(EXCEPTION_POINTERS* ep)
+{
+#ifndef MONO_CROSS_COMPILE
+ if (mono_old_win_toplevel_exception_filter) {
+ return (*mono_old_win_toplevel_exception_filter)(ep);
+ }
+#endif
+
+ mono_handle_native_sigsegv (SIGSEGV, NULL);
+
+ return EXCEPTION_CONTINUE_SEARCH;
+}
+
/*
* Unhandled Exception Filter
* Top-level per-process exception handler.
*/
-LONG CALLBACK seh_handler(EXCEPTION_POINTERS* ep)
+LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep)
{
EXCEPTION_RECORD* er;
CONTEXT* ctx;
MonoContext* sctx;
LONG res;
- mono_win_chained_exception_filter_didrun = FALSE;
+ mono_win_chained_exception_needs_run = FALSE;
res = EXCEPTION_CONTINUE_EXECUTION;
er = ep->ExceptionRecord;
@@ -98,40 +118,55 @@ LONG CALLBACK seh_handler(EXCEPTION_POINTERS* ep)
break;
}
- /* Copy context back */
- /* Nonvolatile */
- ctx->Rsp = sctx->rsp;
- ctx->Rdi = sctx->rdi;
- ctx->Rsi = sctx->rsi;
- ctx->Rbx = sctx->rbx;
- ctx->Rbp = sctx->rbp;
- ctx->R12 = sctx->r12;
- ctx->R13 = sctx->r13;
- ctx->R14 = sctx->r14;
- ctx->R15 = sctx->r15;
- ctx->Rip = sctx->rip;
-
- /* Volatile But should not matter?*/
- ctx->Rax = sctx->rax;
- ctx->Rcx = sctx->rcx;
- ctx->Rdx = sctx->rdx;
-
- g_free (sctx);
-
- if (mono_win_chained_exception_filter_didrun)
- res = mono_win_chained_exception_filter_result;
+ if (mono_win_chained_exception_needs_run) {
+ /* Don't copy context back if we chained exception
+ * as the handler may have modfied the EXCEPTION_POINTERS
+ * directly. We don't pass sigcontext to chained handlers.
+ * Return continue search so the UnhandledExceptionFilter
+ * can correctly chain the exception.
+ */
+ res = EXCEPTION_CONTINUE_SEARCH;
+ } else {
+ /* Copy context back */
+ /* Nonvolatile */
+ ctx->Rsp = sctx->rsp;
+ ctx->Rdi = sctx->rdi;
+ ctx->Rsi = sctx->rsi;
+ ctx->Rbx = sctx->rbx;
+ ctx->Rbp = sctx->rbp;
+ ctx->R12 = sctx->r12;
+ ctx->R13 = sctx->r13;
+ ctx->R14 = sctx->r14;
+ ctx->R15 = sctx->r15;
+ ctx->Rip = sctx->rip;
+
+ /* Volatile But should not matter?*/
+ ctx->Rax = sctx->rax;
+ ctx->Rcx = sctx->rcx;
+ ctx->Rdx = sctx->rdx;
+ }
+
+ /* TODO: Find right place to free this in stack overflow case */
+ if (er->ExceptionCode != EXCEPTION_STACK_OVERFLOW)
+ g_free (sctx);
return res;
}
void win32_seh_init()
{
- mono_old_win_toplevel_exception_filter = SetUnhandledExceptionFilter(seh_handler);
+ mono_old_win_toplevel_exception_filter = SetUnhandledExceptionFilter(seh_unhandled_exception_filter);
+ mono_win_vectored_exception_handle = AddVectoredExceptionHandler (1, seh_vectored_exception_handler);
}
void win32_seh_cleanup()
{
if (mono_old_win_toplevel_exception_filter) SetUnhandledExceptionFilter(mono_old_win_toplevel_exception_filter);
+
+ guint32 ret = 0;
+
+ ret = RemoveVectoredExceptionHandler (mono_win_vectored_exception_handle);
+ g_assert (ret);
}
void win32_seh_set_handler(int type, MonoW32ExceptionHandler handler)
@@ -190,16 +225,17 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
amd64_mov_reg_membase (code, AMD64_R15, AMD64_R11, G_STRUCT_OFFSET (MonoContext, r15), 8);
#endif
- if (mono_running_on_valgrind ()) {
- /* Prevent 'Address 0x... is just below the stack ptr.' errors */
- amd64_mov_reg_membase (code, AMD64_R8, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rsp), 8);
- amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rip), 8);
- amd64_mov_reg_reg (code, AMD64_RSP, AMD64_R8, 8);
- } else {
- amd64_mov_reg_membase (code, AMD64_RSP, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rsp), 8);
- /* get return address */
- amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rip), 8);
- }
+ /*
+ * The context resides on the stack, in the stack frame of the
+ * caller of this function. The stack pointer that we need to
+ * restore is potentially many stack frames higher up, so the
+ * distance between them can easily be more than the red zone
+ * size. Hence the stack pointer can be restored only after
+ * we have finished loading everything from the context.
+ */
+ amd64_mov_reg_membase (code, AMD64_R8, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rsp), 8);
+ amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rip), 8);
+ amd64_mov_reg_reg (code, AMD64_RSP, AMD64_R8, 8);
/* jump to the saved IP */
amd64_jump_reg (code, AMD64_R11);
@@ -209,7 +245,7 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
mono_arch_flush_icache (start, code - start);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("restore_context"), start, code - start, ji, unwind_ops);
+ *info = mono_tramp_info_create ("restore_context", start, code - start, ji, unwind_ops);
return start;
}
@@ -296,7 +332,7 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
mono_arch_flush_icache (start, code - start);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("call_filter"), start, code - start, ji, unwind_ops);
+ *info = mono_tramp_info_create ("call_filter", start, code - start, ji, unwind_ops);
return start;
}
@@ -311,12 +347,8 @@ mono_amd64_throw_exception (guint64 dummy1, guint64 dummy2, guint64 dummy3, guin
mgreg_t *regs, mgreg_t rip,
MonoObject *exc, gboolean rethrow)
{
- static void (*restore_context) (MonoContext *);
MonoContext ctx;
- if (!restore_context)
- restore_context = mono_get_restore_context ();
-
ctx.rsp = regs [AMD64_RSP];
ctx.rip = rip;
ctx.rbx = regs [AMD64_RBX];
@@ -347,7 +379,7 @@ mono_amd64_throw_exception (guint64 dummy1, guint64 dummy2, guint64 dummy3, guin
ctx_cp.rip = rip - 5;
if (mono_debugger_handle_exception (&ctx_cp, exc)) {
- restore_context (&ctx_cp);
+ mono_restore_context (&ctx_cp);
g_assert_not_reached ();
}
}
@@ -357,8 +389,7 @@ mono_amd64_throw_exception (guint64 dummy1, guint64 dummy2, guint64 dummy3, guin
ctx.rip -= 1;
mono_handle_exception (&ctx, exc);
- restore_context (&ctx);
-
+ mono_restore_context (&ctx);
g_assert_not_reached ();
}
@@ -508,7 +539,7 @@ get_throw_trampoline (MonoTrampInfo **info, gboolean rethrow, gboolean corlib, g
nacl_global_codeman_validate(&start, kMaxCodeSize, &code);
if (info)
- *info = mono_tramp_info_create (g_strdup (tramp_name), start, code - start, ji, unwind_ops);
+ *info = mono_tramp_info_create (tramp_name, start, code - start, ji, unwind_ops);
return start;
}
@@ -721,10 +752,6 @@ handle_signal_exception (gpointer obj)
{
MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
MonoContext ctx;
- static void (*restore_context) (MonoContext *);
-
- if (!restore_context)
- restore_context = mono_get_restore_context ();
memcpy (&ctx, &jit_tls->ex_ctx, sizeof (MonoContext));
@@ -733,7 +760,7 @@ handle_signal_exception (gpointer obj)
mono_handle_exception (&ctx, obj);
- restore_context (&ctx);
+ mono_restore_context (&ctx);
}
void
@@ -849,22 +876,20 @@ prepare_for_guard_pages (MonoContext *mctx)
static void
altstack_handle_and_restore (void *sigctx, gpointer obj, gboolean stack_ovf)
{
- void (*restore_context) (MonoContext *);
MonoContext mctx;
- restore_context = mono_get_restore_context ();
mono_arch_sigctx_to_monoctx (sigctx, &mctx);
if (mono_debugger_handle_exception (&mctx, (MonoObject *)obj)) {
if (stack_ovf)
prepare_for_guard_pages (&mctx);
- restore_context (&mctx);
+ mono_restore_context (&mctx);
}
mono_handle_exception (&mctx, obj);
if (stack_ovf)
prepare_for_guard_pages (&mctx);
- restore_context (&mctx);
+ mono_restore_context (&mctx);
}
void
@@ -1042,7 +1067,7 @@ mono_arch_get_throw_pending_exception (MonoTrampInfo **info, gboolean aot)
nacl_global_codeman_validate(&start, kMaxCodeSize, &code);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("throw_pending_exception"), start, code - start, ji, unwind_ops);
+ *info = mono_tramp_info_create ("throw_pending_exception", start, code - start, ji, unwind_ops);
return start;
}
@@ -1125,8 +1150,7 @@ mono_arch_exceptions_init (void)
MonoTrampInfo *info = l->data;
mono_register_jit_icall (info->code, g_strdup (info->name), NULL, TRUE);
- mono_save_trampoline_xdebug_info (info);
- mono_tramp_info_free (info);
+ mono_tramp_info_register (info);
}
g_slist_free (tramps);
}
diff --git a/mono/mini/exceptions-arm.c b/mono/mini/exceptions-arm.c
index 575654b67e3..a76f2820746 100644
--- a/mono/mini/exceptions-arm.c
+++ b/mono/mini/exceptions-arm.c
@@ -81,7 +81,7 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
mono_arch_flush_icache (start, code - start);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("restore_context"), start, code - start, ji, unwind_ops);
+ *info = mono_tramp_info_create ("restore_context", start, code - start, ji, unwind_ops);
return start;
}
@@ -127,7 +127,7 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
mono_arch_flush_icache (start, code - start);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("call_filter"), start, code - start, ji, unwind_ops);
+ *info = mono_tramp_info_create ("call_filter", start, code - start, ji, unwind_ops);
return start;
}
@@ -135,13 +135,9 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
void
mono_arm_throw_exception (MonoObject *exc, mgreg_t pc, mgreg_t sp, mgreg_t *int_regs, gdouble *fp_regs)
{
- static void (*restore_context) (MonoContext *);
MonoContext ctx;
gboolean rethrow = pc & 1;
- if (!restore_context)
- restore_context = mono_get_restore_context ();
-
pc &= ~1; /* clear the optional rethrow bit */
/* adjust eip so that it point into the call instruction */
pc -= 4;
@@ -159,7 +155,7 @@ mono_arm_throw_exception (MonoObject *exc, mgreg_t pc, mgreg_t sp, mgreg_t *int_
mono_ex->stack_trace = NULL;
}
mono_handle_exception (&ctx, exc);
- restore_context (&ctx);
+ mono_restore_context (&ctx);
g_assert_not_reached ();
}
@@ -279,7 +275,7 @@ get_throw_trampoline (int size, gboolean corlib, gboolean rethrow, gboolean llvm
mono_arch_flush_icache (start, code - start);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf (tramp_name), start, code - start, ji, unwind_ops);
+ *info = mono_tramp_info_create (tramp_name, start, code - start, ji, unwind_ops);
return start;
}
@@ -371,8 +367,7 @@ mono_arch_exceptions_init (void)
MonoTrampInfo *info = l->data;
mono_register_jit_icall (info->code, g_strdup (info->name), NULL, TRUE);
- mono_save_trampoline_xdebug_info (info);
- mono_tramp_info_free (info);
+ mono_tramp_info_register (info);
}
g_slist_free (tramps);
}
@@ -517,16 +512,12 @@ handle_signal_exception (gpointer obj)
{
MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
MonoContext ctx;
- static void (*restore_context) (MonoContext *);
-
- if (!restore_context)
- restore_context = mono_get_restore_context ();
memcpy (&ctx, &jit_tls->ex_ctx, sizeof (MonoContext));
mono_handle_exception (&ctx, obj);
- restore_context (&ctx);
+ mono_restore_context (&ctx);
}
/*
diff --git a/mono/mini/exceptions-ia64.c b/mono/mini/exceptions-ia64.c
index 85c7792be30..b8212c684bd 100644
--- a/mono/mini/exceptions-ia64.c
+++ b/mono/mini/exceptions-ia64.c
@@ -266,7 +266,7 @@ throw_exception (MonoObject *exc, guint64 rethrow)
ji = mini_jit_info_table_find (mono_domain_get (), (gpointer)ip, NULL);
- //printf ("UN: %s %lx %lx\n", ji ? ji->method->name : "", ip, sp);
+ //printf ("UN: %s %lx %lx\n", ji ? jinfo_get_method (ji)->name : "", ip, sp);
if (ji)
break;
diff --git a/mono/mini/exceptions-mips.c b/mono/mini/exceptions-mips.c
index ea38a836aab..ea58f176176 100644
--- a/mono/mini/exceptions-mips.c
+++ b/mono/mini/exceptions-mips.c
@@ -174,7 +174,6 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
static void
throw_exception (MonoObject *exc, unsigned long eip, unsigned long esp, gboolean rethrow)
{
- static void (*restore_context) (MonoContext *);
MonoContext ctx;
#ifdef DEBUG_EXCEPTIONS
@@ -182,9 +181,6 @@ throw_exception (MonoObject *exc, unsigned long eip, unsigned long esp, gboolean
exc, (void *)eip, (void *) esp, rethrow);
#endif
- if (!restore_context)
- restore_context = mono_get_restore_context ();
-
/* adjust eip so that it point into the call instruction */
eip -= 8;
@@ -207,7 +203,7 @@ throw_exception (MonoObject *exc, unsigned long eip, unsigned long esp, gboolean
(void *) ctx.sc_pc, (void *) ctx.sc_regs[mips_sp],
(void *) ctx.sc_regs[mips_fp], &ctx);
#endif
- restore_context (&ctx);
+ mono_restore_context (&ctx);
g_assert_not_reached ();
}
@@ -518,16 +514,12 @@ handle_signal_exception (gpointer obj)
{
MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
MonoContext ctx;
- static void (*restore_context) (MonoContext *);
-
- if (!restore_context)
- restore_context = mono_get_restore_context ();
memcpy (&ctx, &jit_tls->ex_ctx, sizeof (MonoContext));
mono_handle_exception (&ctx, obj);
- restore_context (&ctx);
+ mono_restore_context (&ctx);
}
/*
diff --git a/mono/mini/exceptions-ppc.c b/mono/mini/exceptions-ppc.c
index 7f786d99a39..80bbb3f9190 100644
--- a/mono/mini/exceptions-ppc.c
+++ b/mono/mini/exceptions-ppc.c
@@ -220,7 +220,7 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
mono_arch_flush_icache (start, code - start);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("restore_context"), start, code - start, ji, unwind_ops);
+ *info = mono_tramp_info_create ("restore_context", start, code - start, ji, unwind_ops);
return start;
}
@@ -308,7 +308,7 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
mono_arch_flush_icache (start, code - start);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("call_filter"), start, code - start, ji, unwind_ops);
+ *info = mono_tramp_info_create ("call_filter", start, code - start, ji, unwind_ops);
return start;
}
@@ -316,12 +316,8 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
void
mono_ppc_throw_exception (MonoObject *exc, unsigned long eip, unsigned long esp, mgreg_t *int_regs, gdouble *fp_regs, gboolean rethrow)
{
- static void (*restore_context) (MonoContext *);
MonoContext ctx;
- if (!restore_context)
- restore_context = mono_get_restore_context ();
-
/* adjust eip so that it point into the call instruction */
eip -= 4;
@@ -339,7 +335,7 @@ mono_ppc_throw_exception (MonoObject *exc, unsigned long eip, unsigned long esp,
mono_ex->stack_trace = NULL;
}
mono_handle_exception (&ctx, exc);
- restore_context (&ctx);
+ mono_restore_context (&ctx);
g_assert_not_reached ();
}
@@ -440,7 +436,7 @@ mono_arch_get_throw_exception_generic (int size, MonoTrampInfo **info, int corli
mono_arch_flush_icache (start, code - start);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf (corlib ? "throw_corlib_exception" : (rethrow ? "rethrow_exception" : "throw_exception")), start, code - start, ji, unwind_ops);
+ *info = mono_tramp_info_create (corlib ? "throw_corlib_exception" : (rethrow ? "rethrow_exception" : "throw_exception"), start, code - start, ji, unwind_ops);
return start;
}
@@ -540,7 +536,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
sframe = (MonoPPCStackFrame*)MONO_CONTEXT_GET_SP (ctx);
MONO_CONTEXT_SET_BP (new_ctx, sframe->sp);
- if (ji->method->save_lmf) {
+ if (jinfo_get_method (ji)->save_lmf) {
/* sframe->sp points just past the end of the LMF */
guint8 *lmf_addr = (guint8*)sframe->sp - sizeof (MonoLMF);
memcpy (&new_ctx->fregs, lmf_addr + G_STRUCT_OFFSET (MonoLMF, fregs), sizeof (double) * MONO_SAVED_FREGS);
@@ -669,13 +665,11 @@ mono_ppc_set_func_into_sigctx (void *sigctx, void *func)
static void
altstack_handle_and_restore (void *sigctx, gpointer obj)
{
- void (*restore_context) (MonoContext *);
MonoContext mctx;
- restore_context = mono_get_restore_context ();
mono_arch_sigctx_to_monoctx (sigctx, &mctx);
mono_handle_exception (&mctx, obj);
- restore_context (&mctx);
+ mono_restore_context (&mctx);
}
void
@@ -695,8 +689,8 @@ mono_arch_handle_altstack_exception (void *sigctx, gpointer fault_addr, gboolean
const char *method;
/* we don't do much now, but we can warn the user with a useful message */
fprintf (stderr, "Stack overflow: IP: %p, SP: %p\n", mono_arch_ip_from_context (sigctx), (gpointer)UCONTEXT_REG_Rn(uc, 1));
- if (ji && ji->method)
- method = mono_method_full_name (ji->method, TRUE);
+ if (ji && jinfo_get_method (ji))
+ method = mono_method_full_name (jinfo_get_method (ji), TRUE);
else
method = "Unmanaged";
fprintf (stderr, "At %s\n", method);
@@ -754,16 +748,12 @@ handle_signal_exception (gpointer obj)
{
MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
MonoContext ctx;
- static void (*restore_context) (MonoContext *);
-
- if (!restore_context)
- restore_context = mono_get_restore_context ();
memcpy (&ctx, &jit_tls->ex_ctx, sizeof (MonoContext));
mono_handle_exception (&ctx, obj);
- restore_context (&ctx);
+ mono_restore_context (&ctx);
}
static void
diff --git a/mono/mini/exceptions-s390x.c b/mono/mini/exceptions-s390x.c
index c46265b7fe4..17bb8b044d0 100644
--- a/mono/mini/exceptions-s390x.c
+++ b/mono/mini/exceptions-s390x.c
@@ -213,7 +213,7 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
g_assert ((code - start) < SZ_THROW);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf("call_filter"),
+ *info = mono_tramp_info_create ("call_filter",
start, code - start, ji,
unwind_ops);
@@ -237,11 +237,7 @@ throw_exception (MonoObject *exc, unsigned long ip, unsigned long sp,
{
MonoContext ctx;
int iReg;
- static void (*restore_context) (MonoContext *);
- if (!restore_context)
- restore_context = mono_get_restore_context();
-
memset(&ctx, 0, sizeof(ctx));
setup_context(&ctx);
@@ -267,7 +263,7 @@ throw_exception (MonoObject *exc, unsigned long ip, unsigned long sp,
}
// mono_arch_handle_exception (&ctx, exc, FALSE);
mono_handle_exception (&ctx, exc);
- restore_context(&ctx);
+ mono_restore_context(&ctx);
g_assert_not_reached ();
}
@@ -364,9 +360,9 @@ mono_arch_get_throw_exception_generic (int size, MonoTrampInfo **info,
g_assert ((code - start) < size);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf(corlib ? "throw_corlib_exception"
+ *info = mono_tramp_info_create (corlib ? "throw_corlib_exception"
: (rethrow ? "rethrow_exception"
- : "throw_exception")),
+ : "throw_exception"),
start, code - start, ji, unwind_ops);
return start;
diff --git a/mono/mini/exceptions-x86.c b/mono/mini/exceptions-x86.c
index a8c8c0f2bd4..2d8742d5d4c 100644
--- a/mono/mini/exceptions-x86.c
+++ b/mono/mini/exceptions-x86.c
@@ -8,6 +8,13 @@
*/
#include <config.h>
+
+#if _WIN32_WINNT < 0x0501
+/* Required for Vectored Exception Handling. */
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif /* _WIN32_WINNT < 0x0501 */
+
#include <glib.h>
#include <signal.h>
#include <string.h>
@@ -40,8 +47,9 @@ static MonoW32ExceptionHandler ill_handler;
static MonoW32ExceptionHandler segv_handler;
LPTOP_LEVEL_EXCEPTION_FILTER mono_old_win_toplevel_exception_filter;
-guint64 mono_win_chained_exception_filter_result;
-gboolean mono_win_chained_exception_filter_didrun;
+gpointer mono_win_vectored_exception_handle;
+extern gboolean mono_win_chained_exception_needs_run;
+extern int (*gUnhandledExceptionHandler)(EXCEPTION_POINTERS*);
#ifndef PROCESS_CALLBACK_FILTER_ENABLED
# define PROCESS_CALLBACK_FILTER_ENABLED 1
@@ -50,6 +58,19 @@ gboolean mono_win_chained_exception_filter_didrun;
#define W32_SEH_HANDLE_EX(_ex) \
if (_ex##_handler) _ex##_handler(0, ep, sctx)
+LONG CALLBACK seh_unhandled_exception_filter(EXCEPTION_POINTERS* ep)
+{
+#ifndef MONO_CROSS_COMPILE
+ if (mono_old_win_toplevel_exception_filter) {
+ return (*mono_old_win_toplevel_exception_filter)(ep);
+ }
+#endif
+
+ mono_handle_native_sigsegv (SIGSEGV, NULL);
+
+ return EXCEPTION_CONTINUE_SEARCH;
+}
+
/*
* mono_win32_get_handle_stackoverflow (void):
*
@@ -170,14 +191,14 @@ win32_handle_stack_overflow (EXCEPTION_POINTERS* ep, struct sigcontext *sctx)
* Unhandled Exception Filter
* Top-level per-process exception handler.
*/
-LONG CALLBACK seh_handler(EXCEPTION_POINTERS* ep)
+LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep)
{
EXCEPTION_RECORD* er;
CONTEXT* ctx;
struct sigcontext* sctx;
LONG res;
- mono_win_chained_exception_filter_didrun = FALSE;
+ mono_win_chained_exception_needs_run = FALSE;
res = EXCEPTION_CONTINUE_EXECUTION;
er = ep->ExceptionRecord;
@@ -217,21 +238,30 @@ LONG CALLBACK seh_handler(EXCEPTION_POINTERS* ep)
break;
}
- /* Copy context back */
- ctx->Eax = sctx->eax;
- ctx->Ebx = sctx->ebx;
- ctx->Ecx = sctx->ecx;
- ctx->Edx = sctx->edx;
- ctx->Ebp = sctx->ebp;
- ctx->Esp = sctx->esp;
- ctx->Esi = sctx->esi;
- ctx->Edi = sctx->edi;
- ctx->Eip = sctx->eip;
-
- g_free (sctx);
+ if (mono_win_chained_exception_needs_run) {
+ /* Don't copy context back if we chained exception
+ * as the handler may have modfied the EXCEPTION_POINTERS
+ * directly. We don't pass sigcontext to chained handlers.
+ * Return continue search so the UnhandledExceptionFilter
+ * can correctly chain the exception.
+ */
+ res = EXCEPTION_CONTINUE_SEARCH;
+ } else {
+ /* Copy context back */
+ ctx->Eax = sctx->eax;
+ ctx->Ebx = sctx->ebx;
+ ctx->Ecx = sctx->ecx;
+ ctx->Edx = sctx->edx;
+ ctx->Ebp = sctx->ebp;
+ ctx->Esp = sctx->esp;
+ ctx->Esi = sctx->esi;
+ ctx->Edi = sctx->edi;
+ ctx->Eip = sctx->eip;
+ }
- if (mono_win_chained_exception_filter_didrun)
- res = mono_win_chained_exception_filter_result;
+ /* TODO: Find right place to free this in stack overflow case */
+ if (er->ExceptionCode != EXCEPTION_STACK_OVERFLOW)
+ g_free (sctx);
return res;
}
@@ -242,12 +272,14 @@ void win32_seh_init()
if (!restore_stack)
restore_stack = mono_win32_get_handle_stackoverflow ();
- mono_old_win_toplevel_exception_filter = SetUnhandledExceptionFilter(seh_handler);
+ mono_old_win_toplevel_exception_filter = SetUnhandledExceptionFilter(seh_unhandled_exception_filter);
+ mono_win_vectored_exception_handle = AddVectoredExceptionHandler (1, seh_vectored_exception_handler);
}
void win32_seh_cleanup()
{
if (mono_old_win_toplevel_exception_filter) SetUnhandledExceptionFilter(mono_old_win_toplevel_exception_filter);
+ RemoveVectoredExceptionHandler (seh_unhandled_exception_filter);
}
void win32_seh_set_handler(int type, MonoW32ExceptionHandler handler)
@@ -289,34 +321,60 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
/* load ctx */
x86_mov_reg_membase (code, X86_EAX, X86_ESP, 4, 4);
- /* get return address, stored in ECX */
- x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoContext, eip), 4);
/* restore EBX */
x86_mov_reg_membase (code, X86_EBX, X86_EAX, G_STRUCT_OFFSET (MonoContext, ebx), 4);
+
/* restore EDI */
x86_mov_reg_membase (code, X86_EDI, X86_EAX, G_STRUCT_OFFSET (MonoContext, edi), 4);
+
/* restore ESI */
x86_mov_reg_membase (code, X86_ESI, X86_EAX, G_STRUCT_OFFSET (MonoContext, esi), 4);
- /* restore ESP */
- x86_mov_reg_membase (code, X86_ESP, X86_EAX, G_STRUCT_OFFSET (MonoContext, esp), 4);
- /* save the return addr to the restored stack */
- x86_push_reg (code, X86_ECX);
- /* restore EBP */
- x86_mov_reg_membase (code, X86_EBP, X86_EAX, G_STRUCT_OFFSET (MonoContext, ebp), 4);
- /* restore ECX */
- x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoContext, ecx), 4);
+
/* restore EDX */
x86_mov_reg_membase (code, X86_EDX, X86_EAX, G_STRUCT_OFFSET (MonoContext, edx), 4);
- /* restore EAX */
- x86_mov_reg_membase (code, X86_EAX, X86_EAX, G_STRUCT_OFFSET (MonoContext, eax), 4);
+ /*
+ * The context resides on the stack, in the stack frame of the
+ * caller of this function. The stack pointer that we need to
+ * restore is potentially many stack frames higher up, so the
+ * distance between them can easily be more than the red zone
+ * size. Hence the stack pointer can be restored only after
+ * we have finished loading everything from the context.
+ */
+
+ /* load ESP into EBP */
+ x86_mov_reg_membase (code, X86_EBP, X86_EAX, G_STRUCT_OFFSET (MonoContext, esp), 4);
+ /* load return address into ECX */
+ x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoContext, eip), 4);
+ /* save the return addr to the restored stack - 4 */
+ x86_mov_membase_reg (code, X86_EBP, -4, X86_ECX, 4);
+
+ /* load EBP into ECX */
+ x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoContext, ebp), 4);
+ /* save EBP to the restored stack - 8 */
+ x86_mov_membase_reg (code, X86_EBP, -8, X86_ECX, 4);
+
+ /* load EAX into ECX */
+ x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoContext, eax), 4);
+ /* save EAX to the restored stack - 12 */
+ x86_mov_membase_reg (code, X86_EBP, -12, X86_ECX, 4);
+
+ /* restore ECX */
+ x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoContext, ecx), 4);
+
+ /* restore ESP - 12 */
+ x86_lea_membase (code, X86_ESP, X86_EBP, -12);
+ /* restore EAX */
+ x86_pop_reg (code, X86_EAX);
+ /* restore EBP */
+ x86_pop_reg (code, X86_EBP);
/* jump to the saved IP */
x86_ret (code);
nacl_global_codeman_validate(&start, 128, &code);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("restore_context"), start, code - start, ji, unwind_ops);
+ *info = mono_tramp_info_create ("restore_context", start, code - start, ji, unwind_ops);
else {
GSList *l;
@@ -393,7 +451,7 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
nacl_global_codeman_validate(&start, kMaxCodeSize, &code);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("call_filter"), start, code - start, ji, unwind_ops);
+ *info = mono_tramp_info_create ("call_filter", start, code - start, ji, unwind_ops);
else {
GSList *l;
@@ -415,12 +473,8 @@ void
mono_x86_throw_exception (mgreg_t *regs, MonoObject *exc,
mgreg_t eip, gboolean rethrow)
{
- static void (*restore_context) (MonoContext *);
MonoContext ctx;
- if (!restore_context)
- restore_context = mono_get_restore_context ();
-
ctx.esp = regs [X86_ESP];
ctx.eip = eip;
ctx.ebp = regs [X86_EBP];
@@ -453,7 +507,7 @@ mono_x86_throw_exception (mgreg_t *regs, MonoObject *exc,
ctx_cp.eip = eip - 5;
if (mono_debugger_handle_exception (&ctx_cp, exc)) {
- restore_context (&ctx_cp);
+ mono_restore_context (&ctx_cp);
g_assert_not_reached ();
}
}
@@ -464,7 +518,7 @@ mono_x86_throw_exception (mgreg_t *regs, MonoObject *exc,
mono_handle_exception (&ctx, exc);
- restore_context (&ctx);
+ mono_restore_context (&ctx);
g_assert_not_reached ();
}
@@ -636,7 +690,7 @@ get_throw_trampoline (const char *name, gboolean rethrow, gboolean llvm, gboolea
g_assert ((code - start) < kMaxCodeSize);
if (info)
- *info = mono_tramp_info_create (g_strdup (name), start, code - start, ji, unwind_ops);
+ *info = mono_tramp_info_create (name, start, code - start, ji, unwind_ops);
else {
GSList *l;
@@ -801,9 +855,19 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
/* Adjust IP */
new_ctx->eip --;
- if (*lmf && (MONO_CONTEXT_GET_BP (ctx) >= (gpointer)(*lmf)->ebp)) {
- /* remove any unused lmf */
- *lmf = (gpointer)(((gsize)(*lmf)->previous_lmf) & ~3);
+ if (*lmf && ((*lmf) != jit_tls->first_lmf)) {
+ gboolean is_tramp = ((guint32)((*lmf)->previous_lmf) & 1);
+ gpointer lmf_esp;
+
+ if (is_tramp)
+ /* lmf->esp is only set in trampoline frames */
+ lmf_esp = (gpointer)(*lmf)->esp;
+ else
+ /* In non-trampoline frames, ebp is the frame pointer */
+ lmf_esp = (gpointer)(*lmf)->ebp;
+ if (MONO_CONTEXT_GET_SP (ctx) >= lmf_esp)
+ /* remove any unused lmf */
+ *lmf = (gpointer)(((gsize)(*lmf)->previous_lmf) & ~3);
}
/* Pop arguments off the stack */
@@ -931,10 +995,6 @@ handle_signal_exception (gpointer obj)
{
MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
MonoContext ctx;
- static void (*restore_context) (MonoContext *);
-
- if (!restore_context)
- restore_context = mono_get_restore_context ();
memcpy (&ctx, &jit_tls->ex_ctx, sizeof (MonoContext));
@@ -943,7 +1003,7 @@ handle_signal_exception (gpointer obj)
mono_handle_exception (&ctx, obj);
- restore_context (&ctx);
+ mono_restore_context (&ctx);
}
/*
@@ -981,7 +1041,7 @@ mono_x86_get_signal_exception_trampoline (MonoTrampInfo **info, gboolean aot)
g_assert ((code - start) < 128);
if (info)
- *info = mono_tramp_info_create (g_strdup ("x86_signal_exception_trampoline"), start, code - start, ji, unwind_ops);
+ *info = mono_tramp_info_create ("x86_signal_exception_trampoline", start, code - start, ji, unwind_ops);
else {
GSList *l;
@@ -1091,22 +1151,20 @@ prepare_for_guard_pages (MonoContext *mctx)
static void
altstack_handle_and_restore (MonoContext *ctx, gpointer obj, gboolean stack_ovf)
{
- void (*restore_context) (MonoContext *);
MonoContext mctx;
- restore_context = mono_get_restore_context ();
mctx = *ctx;
if (mono_debugger_handle_exception (&mctx, (MonoObject *)obj)) {
if (stack_ovf)
prepare_for_guard_pages (&mctx);
- restore_context (&mctx);
+ mono_restore_context (&mctx);
}
mono_handle_exception (&mctx, obj);
if (stack_ovf)
prepare_for_guard_pages (&mctx);
- restore_context (&mctx);
+ mono_restore_context (&mctx);
}
void
diff --git a/mono/mini/generics.cs b/mono/mini/generics.cs
index 17a70af71b8..fcf05c0653e 100644
--- a/mono/mini/generics.cs
+++ b/mono/mini/generics.cs
@@ -906,6 +906,20 @@ class Tests
return result;
}
+ class SyncClass<T> {
+ [MethodImpl(MethodImplOptions.Synchronized)]
+ public Type getInstance() {
+ return typeof (T);
+ }
+ }
+
+ static int test_0_synchronized_gshared () {
+ var c = new SyncClass<string> ();
+ if (c.getInstance () != typeof (string))
+ return 1;
+ return 0;
+ }
+
class Response {
}
diff --git a/mono/mini/gshared.cs b/mono/mini/gshared.cs
index 300965b5b2f..913baaf3c7c 100644
--- a/mono/mini/gshared.cs
+++ b/mono/mini/gshared.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
+using System.Threading.Tasks;
struct Foo {
public int i, j, k, l, m, n;
@@ -211,6 +212,17 @@ public class Tests
return 0;
}
+ public static int test_0_unbox_any_enum () {
+ IFaceUnbox iface = new ClassUnbox ();
+ AnEnum res = iface.Unbox<AnEnum, int> (AnEnum.One, 0, 1);
+ if (res != AnEnum.Two)
+ return 1;
+ res = iface.Unbox<AnEnum, int> (AnEnum.One, 0, AnEnum.Two);
+ if (res != AnEnum.Two)
+ return 2;
+ return 0;
+ }
+
[MethodImplAttribute (MethodImplOptions.NoInlining)]
static void ldfld_nongeneric<T> (GFoo<T>[] foo, int[] arr) {
arr [0] = foo [0].i;
@@ -913,7 +925,8 @@ public class Tests
}
enum AnEnum {
- One
+ One,
+ Two
};
public static int test_0_constrained_tostring () {
@@ -960,6 +973,26 @@ public class Tests
return 0;
}
+ interface IGetType {
+ Type gettype<T, T2>(T t, T2 t2);
+ }
+
+ public class CGetType : IGetType {
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public Type gettype<T, T2>(T t, T2 t2) {
+ return t.GetType ();
+ }
+ }
+
+ public static int test_0_constrained_gettype () {
+ IGetType c = new CGetType ();
+ if (c.gettype<int, int> (1, 1) != typeof (int))
+ return 1;
+ if (c.gettype<string, int> ("A", 1) != typeof (string))
+ return 2;
+ return 0;
+ }
+
struct Pair<T1, T2> {
public T1 First;
public T2 Second;
@@ -1211,6 +1244,193 @@ public class Tests
return 2;
return 0;
}
+
+ interface IConstrained {
+ void foo ();
+ void foo_ref_arg (string s);
+ }
+
+ interface IConstrained<T3> {
+ void foo_gsharedvt_arg (T3 s);
+ T3 foo_gsharedvt_ret (T3 s);
+ }
+
+ static object constrained_res;
+
+ struct ConsStruct : IConstrained {
+ public int i;
+
+ public void foo () {
+ constrained_res = i;
+ }
+
+ public void foo_ref_arg (string s) {
+ constrained_res = s == "A" ? 42 : 0;
+ }
+ }
+
+ class ConsClass : IConstrained {
+ public int i;
+
+ public void foo () {
+ constrained_res = i;
+ }
+
+ public void foo_ref_arg (string s) {
+ constrained_res = s == "A" ? 43 : 0;
+ }
+ }
+
+ struct ConsStruct<T> : IConstrained<T> {
+ public void foo_gsharedvt_arg (T s) {
+ constrained_res = s;
+ }
+
+ public T foo_gsharedvt_ret (T s) {
+ return s;
+ }
+ }
+
+ interface IFaceConstrained {
+ void constrained_void_iface_call<T, T2>(T t, T2 t2) where T2 : IConstrained;
+ void constrained_void_iface_call_ref_arg<T, T2>(T t, T2 t2) where T2 : IConstrained;
+ void constrained_void_iface_call_gsharedvt_arg<T, T2, T3>(T t, T2 t2, T3 t3) where T2 : IConstrained<T>;
+ T constrained_iface_call_gsharedvt_ret<T, T2, T3>(T t, T2 t2, T3 t3) where T2 : IConstrained<T>;
+ T2 constrained_normal_call<T, T2>(T t, T2 t2) where T2 : VClass;
+ }
+
+ class ClassConstrained : IFaceConstrained {
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public void constrained_void_iface_call<T, T2>(T t, T2 t2) where T2 : IConstrained {
+ t2.foo ();
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public void constrained_void_iface_call_ref_arg<T, T2>(T t, T2 t2) where T2 : IConstrained {
+ t2.foo_ref_arg ("A");
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public void constrained_void_iface_call_gsharedvt_arg<T, T2, T3>(T t, T2 t2, T3 t3) where T2 : IConstrained<T> {
+ t2.foo_gsharedvt_arg (t);
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public T constrained_iface_call_gsharedvt_ret<T, T2, T3>(T t, T2 t2, T3 t3) where T2 : IConstrained<T> {
+ return t2.foo_gsharedvt_ret (t);
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public T2 constrained_normal_call<T, T2>(T t, T2 t2) where T2 : VClass {
+ /* This becomes a constrained call even through 't2' is forced to be a reference type by the constraint */
+ return (T2)t2.foo (5);
+ }
+ }
+
+ class VClass {
+ public virtual VClass foo (int i) {
+ return this;
+ }
+ }
+
+ public static int test_0_constrained_void_iface_call () {
+ IFaceConstrained c = new ClassConstrained ();
+ var s = new ConsStruct () { i = 42 };
+ constrained_res = null;
+ c.constrained_void_iface_call<int, ConsStruct> (1, s);
+ if (!(constrained_res is int) || ((int)constrained_res) != 42)
+ return 1;
+ constrained_res = null;
+ c.constrained_void_iface_call_ref_arg<int, ConsStruct> (1, s);
+ if (!(constrained_res is int) || ((int)constrained_res) != 42)
+ return 2;
+ var s2 = new ConsClass () { i = 43 };
+ constrained_res = null;
+ c.constrained_void_iface_call<int, ConsClass> (1, s2);
+ if (!(constrained_res is int) || ((int)constrained_res) != 43)
+ return 3;
+ constrained_res = null;
+ c.constrained_void_iface_call_ref_arg<int, ConsClass> (1, s2);
+ if (!(constrained_res is int) || ((int)constrained_res) != 43)
+ return 4;
+ return 0;
+ }
+
+ public static int test_0_constrained_void_iface_call_gsharedvt_arg () {
+ // This tests constrained calls through interfaces with one gsharedvt arg, like IComparable<T>.CompareTo ()
+ IFaceConstrained c = new ClassConstrained ();
+
+ var s = new ConsStruct<int> ();
+ constrained_res = null;
+ c.constrained_void_iface_call_gsharedvt_arg<int, ConsStruct<int>, int> (42, s, 55);
+ if (!(constrained_res is int) || ((int)constrained_res) != 42)
+ return 1;
+
+ var s2 = new ConsStruct<string> ();
+ constrained_res = null;
+ c.constrained_void_iface_call_gsharedvt_arg<string, ConsStruct<string>, int> ("A", s2, 55);
+ if (!(constrained_res is string) || ((string)constrained_res) != "A")
+ return 2;
+
+ return 0;
+ }
+
+ public static int test_0_constrained_iface_call_gsharedvt_ret () {
+ IFaceConstrained c = new ClassConstrained ();
+
+ var s = new ConsStruct<int> ();
+ int ires = c.constrained_iface_call_gsharedvt_ret<int, ConsStruct<int>, int> (42, s, 55);
+ if (ires != 42)
+ return 1;
+
+ var s2 = new ConsStruct<string> ();
+ string sres = c.constrained_iface_call_gsharedvt_ret<string, ConsStruct<string>, int> ("A", s2, 55);
+ if (sres != "A")
+ return 2;
+
+ return 0;
+ }
+
+ public static int test_0_constrained_normal_call () {
+ IFaceConstrained c = new ClassConstrained ();
+
+ var o = new VClass ();
+ var res = c.constrained_normal_call<int, VClass> (1, o);
+ return res == o ? 0 : 1;
+ }
+
+ public static async Task<T> FooAsync<T> (int i, int j) {
+ Task<int> t = new Task<int> (delegate () { return 42; });
+ var response = await t;
+ return default(T);
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void call_async<T> (int i, int j) {
+ Task<T> t = FooAsync<T> (1, 2);
+ t.RunSynchronously ();
+ }
+
+ // In AOT mode, the async infrastructure depends on gsharedvt methods
+ public static int test_0_async_call_from_generic () {
+ call_async<string> (1, 2);
+ return 0;
+ }
+}
+
+// #13191
+public class MobileServiceCollection<TTable, TCol>
+{
+ public async Task<int> LoadMoreItemsAsync(int count = 0) {
+ await Task.Delay (1000);
+ int results = await ProcessQueryAsync ();
+ return results;
+ }
+
+ protected async virtual Task<int> ProcessQueryAsync() {
+ await Task.Delay (1000);
+ throw new Exception ();
+ }
}
#if !MOBILE
diff --git a/mono/mini/iltests.il.in b/mono/mini/iltests.il.in
index 8ea5c06d27d..0809851220f 100644
--- a/mono/mini/iltests.il.in
+++ b/mono/mini/iltests.il.in
@@ -348,7 +348,7 @@ PASS: ldc.i4.0
IL_000a: ret
}
- // Check that localloc can't be inlined
+ // Check that localloc cannot be inlined
.method static public int32 test_0_localloc_inline () cil managed {
.maxstack 16
.locals init (
diff --git a/mono/mini/ir-emit.h b/mono/mini/ir-emit.h
index b90c5a536a9..306dfde3a6f 100644
--- a/mono/mini/ir-emit.h
+++ b/mono/mini/ir-emit.h
@@ -44,13 +44,13 @@ alloc_lreg (MonoCompile *cfg)
static inline guint32
alloc_freg (MonoCompile *cfg)
{
-#ifdef MONO_ARCH_SOFT_FLOAT
- /* Allocate an lvreg so float ops can be decomposed into long ops */
- return alloc_lreg (cfg);
-#else
- /* Allocate these from the same pool as the int regs */
- return cfg->next_vreg ++;
-#endif
+ if (mono_arch_is_soft_float ()) {
+ /* Allocate an lvreg so float ops can be decomposed into long ops */
+ return alloc_lreg (cfg);
+ } else {
+ /* Allocate these from the same pool as the int regs */
+ return cfg->next_vreg ++;
+ }
}
static inline guint32
@@ -314,11 +314,7 @@ alloc_dreg (MonoCompile *cfg, MonoStackType stack_type)
if ((dest)->opcode == OP_VMOVE) (dest)->klass = mono_class_from_mono_type ((vartype)); \
} while (0)
-#ifdef MONO_ARCH_SOFT_FLOAT
-#define DECOMPOSE_INTO_REGPAIR(stack_type) ((stack_type) == STACK_I8 || (stack_type) == STACK_R8)
-#else
-#define DECOMPOSE_INTO_REGPAIR(stack_type) ((stack_type) == STACK_I8)
-#endif
+#define DECOMPOSE_INTO_REGPAIR(stack_type) (mono_arch_is_soft_float () ? ((stack_type) == STACK_I8 || (stack_type) == STACK_R8) : ((stack_type) == STACK_I8))
static inline void
handle_gsharedvt_ldaddr (MonoCompile *cfg)
@@ -341,6 +337,7 @@ handle_gsharedvt_ldaddr (MonoCompile *cfg)
(dest)->type = STACK_MP; \
(dest)->klass = (var)->klass; \
(dest)->dreg = alloc_dreg ((cfg), STACK_MP); \
+ (cfg)->has_indirection = TRUE; \
if (G_UNLIKELY (cfg->gsharedvt) && mini_is_gsharedvt_variable_type ((cfg), (var)->inst_vtype)) { handle_gsharedvt_ldaddr ((cfg)); } \
if (SIZEOF_REGISTER == 4 && DECOMPOSE_INTO_REGPAIR ((var)->type)) { MonoInst *var1 = get_vreg_to_inst (cfg, (var)->dreg + 1); MonoInst *var2 = get_vreg_to_inst (cfg, (var)->dreg + 2); g_assert (var1); g_assert (var2); var1->flags |= MONO_INST_INDIRECT; var2->flags |= MONO_INST_INDIRECT; } \
} while (0)
@@ -468,7 +465,7 @@ handle_gsharedvt_ldaddr (MonoCompile *cfg)
#define EMIT_NEW_VARLOADA(cfg,dest,var,vartype) do { NEW_VARLOADA ((cfg), (dest), (var), (vartype)); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
-#ifdef MONO_ARCH_SOFT_FLOAT
+#ifdef MONO_ARCH_SOFT_FLOAT_FALLBACK
/*
* Since the IL stack (and our vregs) contain double values, we have to do a conversion
@@ -476,33 +473,61 @@ handle_gsharedvt_ldaddr (MonoCompile *cfg)
*/
#define EMIT_NEW_VARLOAD_SFLOAT(cfg,dest,var,vartype) do { \
- if (COMPILE_SOFT_FLOAT ((cfg)) && !(vartype)->byref && (vartype)->type == MONO_TYPE_R4) { \
- MonoInst *iargs [1]; \
- EMIT_NEW_VARLOADA (cfg, iargs [0], (var), (vartype)); \
- (dest) = mono_emit_jit_icall (cfg, mono_fload_r4, iargs); \
- } else { \
- EMIT_NEW_VARLOAD ((cfg), (dest), (var), (vartype)); \
- } \
- } while (0)
+ if (!COMPILE_LLVM ((cfg)) && !(vartype)->byref && (vartype)->type == MONO_TYPE_R4) { \
+ MonoInst *iargs [1]; \
+ EMIT_NEW_VARLOADA (cfg, iargs [0], (var), (vartype)); \
+ (dest) = mono_emit_jit_icall (cfg, mono_fload_r4, iargs); \
+ } else { \
+ EMIT_NEW_VARLOAD ((cfg), (dest), (var), (vartype)); \
+ } \
+ } while (0)
#define EMIT_NEW_VARSTORE_SFLOAT(cfg,dest,var,vartype,inst) do { \
if (COMPILE_SOFT_FLOAT ((cfg)) && !(vartype)->byref && (vartype)->type == MONO_TYPE_R4) { \
- MonoInst *iargs [2]; \
- iargs [0] = (inst); \
- EMIT_NEW_VARLOADA (cfg, iargs [1], (var), (vartype)); \
- mono_emit_jit_icall (cfg, mono_fstore_r4, iargs); \
- } else { \
- EMIT_NEW_VARSTORE ((cfg), (dest), (var), (vartype), (inst)); \
- } \
- } while (0)
+ MonoInst *iargs [2]; \
+ iargs [0] = (inst); \
+ EMIT_NEW_VARLOADA (cfg, iargs [1], (var), (vartype)); \
+ mono_emit_jit_icall (cfg, mono_fstore_r4, iargs); \
+ } else { \
+ EMIT_NEW_VARSTORE ((cfg), (dest), (var), (vartype), (inst)); \
+ } \
+ } while (0)
-#define EMIT_NEW_ARGLOAD(cfg,dest,num) EMIT_NEW_VARLOAD_SFLOAT ((cfg), (dest), cfg->args [(num)], cfg->arg_types [(num)])
+#define EMIT_NEW_ARGLOAD(cfg,dest,num) do { \
+ if (mono_arch_is_soft_float ()) { \
+ EMIT_NEW_VARLOAD_SFLOAT ((cfg), (dest), cfg->args [(num)], cfg->arg_types [(num)]); \
+ } else { \
+ NEW_ARGLOAD ((cfg), (dest), (num)); \
+ MONO_ADD_INS ((cfg)->cbb, (dest)); \
+ } \
+ } while (0)
-#define EMIT_NEW_LOCLOAD(cfg,dest,num) EMIT_NEW_VARLOAD_SFLOAT ((cfg), (dest), cfg->locals [(num)], header->locals [(num)])
+#define EMIT_NEW_LOCLOAD(cfg,dest,num) do { \
+ if (mono_arch_is_soft_float ()) { \
+ EMIT_NEW_VARLOAD_SFLOAT ((cfg), (dest), cfg->locals [(num)], header->locals [(num)]); \
+ } else { \
+ NEW_LOCLOAD ((cfg), (dest), (num)); \
+ MONO_ADD_INS ((cfg)->cbb, (dest)); \
+ } \
+ } while (0)
-#define EMIT_NEW_LOCSTORE(cfg,dest,num,inst) EMIT_NEW_VARSTORE_SFLOAT ((cfg), (dest), (cfg)->locals [(num)], (cfg)->locals [(num)]->inst_vtype, (inst))
+#define EMIT_NEW_LOCSTORE(cfg,dest,num,inst) do { \
+ if (mono_arch_is_soft_float ()) { \
+ EMIT_NEW_VARSTORE_SFLOAT ((cfg), (dest), (cfg)->locals [(num)], (cfg)->locals [(num)]->inst_vtype, (inst)); \
+ } else { \
+ NEW_LOCSTORE ((cfg), (dest), (num), (inst)); \
+ MONO_ADD_INS ((cfg)->cbb, (dest)); \
+ } \
+ } while (0)
-#define EMIT_NEW_ARGSTORE(cfg,dest,num,inst) EMIT_NEW_VARSTORE_SFLOAT ((cfg), (dest), cfg->args [(num)], cfg->arg_types [(num)], (inst))
+#define EMIT_NEW_ARGSTORE(cfg,dest,num,inst) do { \
+ if (mono_arch_is_soft_float ()) { \
+ EMIT_NEW_VARSTORE_SFLOAT ((cfg), (dest), cfg->args [(num)], cfg->arg_types [(num)], (inst)); \
+ } else { \
+ NEW_ARGSTORE ((cfg), (dest), (num), (inst)); \
+ MONO_ADD_INS ((cfg)->cbb, (dest)); \
+ } \
+ } while (0)
#else
@@ -743,8 +768,8 @@ static int ccount = 0;
ins->inst_false_bb = NULL; \
mono_link_bblock ((cfg), (cfg)->cbb, (truebb)); \
MONO_ADD_INS ((cfg)->cbb, ins); \
- if (getenv ("COUNT2") && ccount == atoi (getenv ("COUNT2")) - 1) { printf ("HIT: %d\n", cfg->cbb->block_num); } \
- if (getenv ("COUNT2") && ccount < atoi (getenv ("COUNT2"))) { \
+ if (g_getenv ("COUNT2") && ccount == atoi (g_getenv ("COUNT2")) - 1) { printf ("HIT: %d\n", cfg->cbb->block_num); } \
+ if (g_getenv ("COUNT2") && ccount < atoi (g_getenv ("COUNT2"))) { \
cfg->cbb->extended = TRUE; \
} else { NEW_BBLOCK ((cfg), falsebb); ins->inst_false_bb = (falsebb); mono_link_bblock ((cfg), (cfg)->cbb, (falsebb)); MONO_START_BB ((cfg), falsebb); } \
} \
diff --git a/mono/mini/jit-icalls.c b/mono/mini/jit-icalls.c
index 78db84f7fd3..45c7689a58a 100644
--- a/mono/mini/jit-icalls.c
+++ b/mono/mini/jit-icalls.c
@@ -82,7 +82,7 @@ mono_helper_stelem_ref_check (MonoArray *array, MonoObject *val)
mono_raise_exception (mono_get_exception_array_type_mismatch ());
}
-#ifndef MONO_ARCH_NO_EMULATE_LONG_MUL_OPTS
+#if !defined(MONO_ARCH_NO_EMULATE_LONG_MUL_OPTS) || defined(MONO_ARCH_EMULATE_LONG_MUL_OVF_OPTS)
gint64
mono_llmult (gint64 a, gint64 b)
@@ -429,7 +429,7 @@ mono_imul_ovf_un (guint32 a, guint32 b)
}
#endif
-#if defined(MONO_ARCH_EMULATE_MUL_DIV) || defined(MONO_ARCH_SOFT_FLOAT)
+#if defined(MONO_ARCH_EMULATE_MUL_DIV) || defined(MONO_ARCH_SOFT_FLOAT_FALLBACK)
double
mono_fdiv (double a, double b)
{
@@ -439,7 +439,7 @@ mono_fdiv (double a, double b)
}
#endif
-#ifdef MONO_ARCH_SOFT_FLOAT
+#ifdef MONO_ARCH_SOFT_FLOAT_FALLBACK
double
mono_fsub (double a, double b)
@@ -871,6 +871,13 @@ guint32
mono_fconv_u4 (double v)
{
/* no need, no exceptions: MONO_ARCH_SAVE_REGS;*/
+
+ /* MS.NET behaves like this for some reason */
+#ifdef HAVE_ISINF
+ if (isinf (v) || isnan (v))
+ return 0;
+#endif
+
return (guint32)v;
}
@@ -915,7 +922,7 @@ mono_fconv_ovf_u8 (double v)
*
* To work around this issue we test for value boundaries instead.
*/
-#if defined(__arm__) && MONO_ARCH_SOFT_FLOAT
+#if defined(__arm__) && defined(MONO_ARCH_SOFT_FLOAT_FALLBACK)
if (isnan (v) || !(v >= -0.5 && v <= ULLONG_MAX+0.5)) {
mono_raise_exception (mono_get_exception_overflow ());
}
@@ -989,8 +996,7 @@ mono_helper_compile_generic_method (MonoObject *obj, MonoMethod *method, gpointe
addr = mono_compile_method (vmethod);
- if (mono_method_needs_static_rgctx_invoke (vmethod, FALSE))
- addr = mono_create_static_rgctx_trampoline (vmethod, addr);
+ addr = mini_add_method_trampoline (NULL, vmethod, addr, mono_method_needs_static_rgctx_invoke (vmethod, FALSE), FALSE);
/* Since this is a virtual call, have to unbox vtypes */
if (obj->vtable->klass->valuetype)
@@ -1052,7 +1058,7 @@ mono_create_corlib_exception_2 (guint32 token, MonoString *arg1, MonoString *arg
}
MonoObject*
-mono_object_castclass (MonoObject *obj, MonoClass *klass)
+mono_object_castclass_unbox (MonoObject *obj, MonoClass *klass)
{
MonoJitTlsData *jit_tls = NULL;
@@ -1064,6 +1070,8 @@ mono_object_castclass (MonoObject *obj, MonoClass *klass)
if (!obj)
return NULL;
+ if (klass->enumtype && obj->vtable->klass == klass->element_class)
+ return obj;
if (mono_object_isinst (obj, klass))
return obj;
@@ -1160,11 +1168,26 @@ constrained_gsharedvt_call_setup (gpointer mp, MonoMethod *cmethod, MonoClass *k
MonoMethod *m;
int vt_slot;
- /* Lookup the virtual method */
- mono_class_setup_vtable (klass);
- g_assert (klass->vtable);
- vt_slot = mono_method_get_vtable_slot (cmethod);
- m = klass->vtable [vt_slot];
+ if (klass->flags & TYPE_ATTRIBUTE_INTERFACE)
+ mono_raise_exception (mono_get_exception_execution_engine ("Not yet supported."));
+
+ if (mono_method_signature (cmethod)->pinvoke) {
+ /* Object.GetType () */
+ m = mono_marshal_get_native_wrapper (cmethod, TRUE, FALSE);
+ } else {
+ /* Lookup the virtual method */
+ mono_class_setup_vtable (klass);
+ g_assert (klass->vtable);
+ vt_slot = mono_method_get_vtable_slot (cmethod);
+ if (cmethod->klass->flags & TYPE_ATTRIBUTE_INTERFACE) {
+ int iface_offset;
+
+ iface_offset = mono_class_interface_offset (klass, cmethod->klass);
+ g_assert (iface_offset != -1);
+ vt_slot += iface_offset;
+ }
+ m = klass->vtable [vt_slot];
+ }
if (klass->valuetype && (m->klass == mono_defaults.object_class || m->klass == mono_defaults.enum_class->parent || m->klass == mono_defaults.enum_class))
/*
* Calling a non-vtype method with a vtype receiver, has to box.
@@ -1183,46 +1206,31 @@ constrained_gsharedvt_call_setup (gpointer mp, MonoMethod *cmethod, MonoClass *k
return m;
}
+/*
+ * mono_gsharedvt_constrained_call:
+ *
+ * Make a call to CMETHOD using the receiver MP, which is assumed to be of type KLASS. ARGS contains
+ * the arguments to the method in the format used by mono_runtime_invoke ().
+ */
MonoObject*
-mono_object_tostring_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass)
+mono_gsharedvt_constrained_call (gpointer mp, MonoMethod *cmethod, MonoClass *klass, gboolean deref_arg, gpointer *args)
{
MonoMethod *m;
gpointer this_arg;
+ gpointer new_args [16];
m = constrained_gsharedvt_call_setup (mp, cmethod, klass, &this_arg);
- return mono_runtime_invoke (m, this_arg, NULL, NULL);
-}
-
-int
-mono_object_gethashcode_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass)
-{
- MonoMethod *m;
- gpointer this_arg;
- MonoObject *res;
- gpointer p;
-
- m = constrained_gsharedvt_call_setup (mp, cmethod, klass, &this_arg);
- // FIXME: This boxes the result
- res = mono_runtime_invoke (m, this_arg, NULL, NULL);
- p = mono_object_unbox (res);
- return *(int*)p;
-}
-
-MonoBoolean
-mono_object_equals_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass, MonoObject *arg)
-{
- MonoMethod *m;
- gpointer this_arg;
- MonoObject *res;
- gpointer p;
- void **args;
-
- m = constrained_gsharedvt_call_setup (mp, cmethod, klass, &this_arg);
- // FIXME: This boxes the result
- args = (void**)&arg;
- res = mono_runtime_invoke (m, this_arg, args, NULL);
- p = mono_object_unbox (res);
- return *(MonoBoolean*)p;
+ if (args && deref_arg) {
+ new_args [0] = *(gpointer*)args [0];
+ args = new_args;
+ }
+ if (m->wrapper_type == MONO_WRAPPER_MANAGED_TO_NATIVE) {
+ /* Object.GetType () */
+ args = new_args;
+ args [0] = this_arg;
+ this_arg = NULL;
+ }
+ return mono_runtime_invoke (m, this_arg, args, NULL);
}
void
diff --git a/mono/mini/jit-icalls.h b/mono/mini/jit-icalls.h
index 29dc8e516fc..dd99e7c7635 100644
--- a/mono/mini/jit-icalls.h
+++ b/mono/mini/jit-icalls.h
@@ -165,7 +165,7 @@ MonoException *mono_create_corlib_exception_1 (guint32 token, MonoString *arg) M
MonoException *mono_create_corlib_exception_2 (guint32 token, MonoString *arg1, MonoString *arg2) MONO_INTERNAL;
-MonoObject* mono_object_castclass (MonoObject *obj, MonoClass *klass) MONO_INTERNAL;
+MonoObject* mono_object_castclass_unbox (MonoObject *obj, MonoClass *klass) MONO_INTERNAL;
gpointer mono_get_native_calli_wrapper (MonoImage *image, MonoMethodSignature *sig, gpointer func) MONO_INTERNAL;
@@ -175,11 +175,8 @@ mono_object_isinst_with_cache (MonoObject *obj, MonoClass *klass, gpointer *cach
MonoObject*
mono_object_castclass_with_cache (MonoObject *obj, MonoClass *klass, gpointer *cache);
-MonoObject* mono_object_tostring_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass) MONO_INTERNAL;
-
-int mono_object_gethashcode_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass) MONO_INTERNAL;
-
-MonoBoolean mono_object_equals_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass, MonoObject *arg) MONO_INTERNAL;
+MonoObject*
+mono_gsharedvt_constrained_call (gpointer mp, MonoMethod *cmethod, MonoClass *klass, gboolean deref_arg, gpointer *args) MONO_INTERNAL;
void mono_gsharedvt_value_copy (gpointer dest, gpointer src, MonoClass *klass) MONO_INTERNAL;
diff --git a/mono/mini/jit.h b/mono/mini/jit.h
index 080531b6076..95e690159ee 100644
--- a/mono/mini/jit.h
+++ b/mono/mini/jit.h
@@ -12,25 +12,25 @@
MONO_BEGIN_DECLS
-MonoDomain *
+MONO_API MonoDomain *
mono_jit_init (const char *file);
-MonoDomain *
+MONO_API MonoDomain *
mono_jit_init_version (const char *root_domain_name, const char *runtime_version);
-int
+MONO_API int
mono_jit_exec (MonoDomain *domain, MonoAssembly *assembly,
int argc, char *argv[]);
-void
+MONO_API void
mono_jit_cleanup (MonoDomain *domain);
-mono_bool
+MONO_API mono_bool
mono_jit_set_trace_options (const char* options);
-void
+MONO_API void
mono_set_signal_chaining (mono_bool chain_signals);
-void
+MONO_API void
mono_jit_set_aot_only (mono_bool aot_only);
/* Allow embedders to decide wherther to actually obey breakpoint instructions
@@ -50,12 +50,12 @@ typedef enum {
} MonoBreakPolicy;
typedef MonoBreakPolicy (*MonoBreakPolicyFunc) (MonoMethod *method);
-void mono_set_break_policy (MonoBreakPolicyFunc policy_callback);
+MONO_API void mono_set_break_policy (MonoBreakPolicyFunc policy_callback);
-void
+MONO_API void
mono_jit_parse_options (int argc, char * argv[]);
-char* mono_get_runtime_build_info (void);
+MONO_API char* mono_get_runtime_build_info (void);
MONO_END_DECLS
diff --git a/mono/mini/liveness.c b/mono/mini/liveness.c
index a1c0cbd4468..02e3c0857f4 100644
--- a/mono/mini/liveness.c
+++ b/mono/mini/liveness.c
@@ -848,7 +848,7 @@ mono_analyze_liveness2 (MonoCompile *cfg)
MonoInst **reverse;
if (disabled == -1)
- disabled = getenv ("DISABLED") != NULL;
+ disabled = g_getenv ("DISABLED") != NULL;
if (disabled)
return;
diff --git a/mono/mini/main.c b/mono/mini/main.c
index dc7c8264432..84c6f39c060 100644..100755
--- a/mono/mini/main.c
+++ b/mono/mini/main.c
@@ -14,7 +14,7 @@
static int
mono_main_with_options (int argc, char *argv [])
{
- const char *env_options = getenv ("MONO_ENV_OPTIONS");
+ const char *env_options = g_getenv ("MONO_ENV_OPTIONS");
if (env_options != NULL){
GPtrArray *array = g_ptr_array_new ();
GString *buffer = g_string_new ("");
@@ -94,7 +94,7 @@ mono_main_with_options (int argc, char *argv [])
#ifdef HOST_WIN32
int
-main ()
+main (void)
{
int argc;
gunichar2** argvw;
diff --git a/mono/mini/method-to-ir.c b/mono/mini/method-to-ir.c
index 83c7262caae..599138e6500 100644
--- a/mono/mini/method-to-ir.c
+++ b/mono/mini/method-to-ir.c
@@ -130,7 +130,7 @@ static int stind_to_store_membase (int opcode);
int mono_op_to_op_imm (int opcode);
int mono_op_to_op_imm_noemul (int opcode);
-MonoInst* mono_emit_native_call (MonoCompile *cfg, gconstpointer func, MonoMethodSignature *sig, MonoInst **args);
+MONO_API MonoInst* mono_emit_native_call (MonoCompile *cfg, gconstpointer func, MonoMethodSignature *sig, MonoInst **args);
/* helper methods signatures */
static MonoMethodSignature *helper_sig_class_init_trampoline = NULL;
@@ -608,7 +608,7 @@ mono_create_spvar_for_region (MonoCompile *cfg, int region)
var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
/* prevent it from being register allocated */
- var->flags |= MONO_INST_INDIRECT;
+ var->flags |= MONO_INST_VOLATILE;
g_hash_table_insert (cfg->spvars, GINT_TO_POINTER (region), var);
}
@@ -630,7 +630,7 @@ mono_create_exvar_for_offset (MonoCompile *cfg, int offset)
var = mono_compile_create_var (cfg, &mono_defaults.object_class->byval_arg, OP_LOCAL);
/* prevent it from being register allocated */
- var->flags |= MONO_INST_INDIRECT;
+ var->flags |= MONO_INST_VOLATILE;
g_hash_table_insert (cfg->exvars, GINT_TO_POINTER (offset), var);
@@ -1155,7 +1155,7 @@ mono_get_vtable_var (MonoCompile *cfg)
if (!cfg->rgctx_var) {
cfg->rgctx_var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
/* force the var to be stack allocated */
- cfg->rgctx_var->flags |= MONO_INST_INDIRECT;
+ cfg->rgctx_var->flags |= MONO_INST_VOLATILE;
}
return cfg->rgctx_var;
@@ -1868,6 +1868,118 @@ mini_emit_memcpy (MonoCompile *cfg, int destreg, int doffset, int srcreg, int so
}
}
+static void
+emit_tls_set (MonoCompile *cfg, int sreg1, int tls_key)
+{
+ MonoInst *ins, *c;
+
+ if (cfg->compile_aot) {
+ EMIT_NEW_TLS_OFFSETCONST (cfg, c, tls_key);
+ MONO_INST_NEW (cfg, ins, OP_TLS_SET_REG);
+ ins->sreg1 = sreg1;
+ ins->sreg2 = c->dreg;
+ MONO_ADD_INS (cfg->cbb, ins);
+ } else {
+ MONO_INST_NEW (cfg, ins, OP_TLS_SET);
+ ins->sreg1 = sreg1;
+ ins->inst_offset = mini_get_tls_offset (tls_key);
+ MONO_ADD_INS (cfg->cbb, ins);
+ }
+}
+
+/*
+ * emit_push_lmf:
+ *
+ * Emit IR to push the current LMF onto the LMF stack.
+ */
+static void
+emit_push_lmf (MonoCompile *cfg)
+{
+ /*
+ * Emit IR to push the LMF:
+ * lmf_addr = <lmf_addr from tls>
+ * lmf->lmf_addr = lmf_addr
+ * lmf->prev_lmf = *lmf_addr
+ * *lmf_addr = lmf
+ */
+ int lmf_reg, lmf_addr_reg, prev_lmf_reg;
+ MonoInst *ins, *lmf_ins;
+
+ if (!cfg->lmf_ir)
+ return;
+
+ if (cfg->lmf_ir_mono_lmf) {
+ /* Load current lmf */
+ lmf_ins = mono_get_lmf_intrinsic (cfg);
+ g_assert (lmf_ins);
+ MONO_ADD_INS (cfg->cbb, lmf_ins);
+ EMIT_NEW_VARLOADA (cfg, ins, cfg->lmf_var, NULL);
+ lmf_reg = ins->dreg;
+ /* Save previous_lmf */
+ EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, lmf_reg, G_STRUCT_OFFSET (MonoLMF, previous_lmf), lmf_ins->dreg);
+ /* Set new LMF */
+ emit_tls_set (cfg, lmf_reg, OP_TLS_SET_REG);
+ } else {
+ lmf_ins = mono_get_lmf_addr_intrinsic (cfg);
+ if (lmf_ins)
+ MONO_ADD_INS (cfg->cbb, lmf_ins);
+ else
+ lmf_ins = mono_emit_jit_icall (cfg, mono_get_lmf_addr, NULL);
+ lmf_addr_reg = lmf_ins->dreg;
+
+ EMIT_NEW_VARLOADA (cfg, ins, cfg->lmf_var, NULL);
+ lmf_reg = ins->dreg;
+ /* Save lmf_addr */
+ if (!cfg->lmf_addr_var)
+ cfg->lmf_addr_var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
+ EMIT_NEW_UNALU (cfg, ins, OP_MOVE, cfg->lmf_addr_var->dreg, lmf_ins->dreg);
+ prev_lmf_reg = alloc_preg (cfg);
+ /* Save previous_lmf */
+ EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, prev_lmf_reg, lmf_addr_reg, 0);
+ EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, lmf_reg, G_STRUCT_OFFSET (MonoLMF, previous_lmf), prev_lmf_reg);
+ /* Set new lmf */
+ EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, lmf_addr_reg, 0, lmf_reg);
+ }
+}
+
+/*
+ * emit_pop_lmf:
+ *
+ * Emit IR to pop the current LMF from the LMF stack.
+ */
+static void
+emit_pop_lmf (MonoCompile *cfg)
+{
+ int lmf_reg, lmf_addr_reg, prev_lmf_reg;
+ MonoInst *ins;
+
+ if (!cfg->lmf_ir)
+ return;
+
+ EMIT_NEW_VARLOADA (cfg, ins, cfg->lmf_var, NULL);
+ lmf_reg = ins->dreg;
+
+ if (cfg->lmf_ir_mono_lmf) {
+ /* Load previous_lmf */
+ prev_lmf_reg = alloc_preg (cfg);
+ EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, prev_lmf_reg, lmf_reg, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+ /* Set new LMF */
+ emit_tls_set (cfg, prev_lmf_reg, OP_TLS_SET_REG);
+ } else {
+ /*
+ * Emit IR to pop the LMF:
+ * *(lmf->lmf_addr) = lmf->prev_lmf
+ */
+ /* This could be called before emit_push_lmf () */
+ if (!cfg->lmf_addr_var)
+ cfg->lmf_addr_var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
+ lmf_addr_reg = cfg->lmf_addr_var->dreg;
+ prev_lmf_reg = alloc_preg (cfg);
+ EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, prev_lmf_reg, lmf_reg, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+ EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, lmf_addr_reg, 0, prev_lmf_reg);
+ }
+}
+
static int
ret_type_to_call_opcode (MonoType *type, int calli, int virt, MonoGenericSharingContext *gsctx)
{
@@ -2336,8 +2448,9 @@ inline static MonoCallInst *
mono_emit_call_args (MonoCompile *cfg, MonoMethodSignature *sig,
MonoInst **args, int calli, int virtual, int tail, int rgctx, int unbox_trampoline)
{
+ MonoType *sig_ret;
MonoCallInst *call;
-#ifdef MONO_ARCH_SOFT_FLOAT
+#ifdef MONO_ARCH_SOFT_FLOAT_FALLBACK
int i;
#endif
@@ -2349,16 +2462,17 @@ mono_emit_call_args (MonoCompile *cfg, MonoMethodSignature *sig,
call->args = args;
call->signature = sig;
call->rgctx_reg = rgctx;
+ sig_ret = sig->ret;
- type_to_eval_stack_type ((cfg), sig->ret, &call->inst);
+ type_to_eval_stack_type ((cfg), sig_ret, &call->inst);
if (tail) {
- if (mini_type_is_vtype (cfg, sig->ret)) {
+ if (mini_type_is_vtype (cfg, sig_ret)) {
call->vret_var = cfg->vret_addr;
//g_assert_not_reached ();
}
- } else if (mini_type_is_vtype (cfg, sig->ret)) {
- MonoInst *temp = mono_compile_create_var (cfg, sig->ret, OP_LOCAL);
+ } else if (mini_type_is_vtype (cfg, sig_ret)) {
+ MonoInst *temp = mono_compile_create_var (cfg, sig_ret, OP_LOCAL);
MonoInst *loada;
temp->backend.is_pinvoke = sig->pinvoke;
@@ -2381,10 +2495,10 @@ mono_emit_call_args (MonoCompile *cfg, MonoMethodSignature *sig,
call->inst.dreg = temp->dreg;
call->vret_var = loada;
- } else if (!MONO_TYPE_IS_VOID (sig->ret))
+ } else if (!MONO_TYPE_IS_VOID (sig_ret))
call->inst.dreg = alloc_dreg (cfg, call->inst.type);
-#ifdef MONO_ARCH_SOFT_FLOAT
+#ifdef MONO_ARCH_SOFT_FLOAT_FALLBACK
if (COMPILE_SOFT_FLOAT (cfg)) {
/*
* If the call has a float argument, we would need to do an r8->r4 conversion using
@@ -2790,7 +2904,7 @@ create_write_barrier_bitmap (MonoCompile *cfg, MonoClass *klass, unsigned *wb_bi
}
static void
-emit_write_barrier (MonoCompile *cfg, MonoInst *ptr, MonoInst *value, int value_reg)
+emit_write_barrier (MonoCompile *cfg, MonoInst *ptr, MonoInst *value)
{
int card_table_shift_bits;
gpointer card_table_mask;
@@ -2816,10 +2930,7 @@ emit_write_barrier (MonoCompile *cfg, MonoInst *ptr, MonoInst *value, int value_
MONO_INST_NEW (cfg, wbarrier, OP_CARD_TABLE_WBARRIER);
wbarrier->sreg1 = ptr->dreg;
- if (value)
- wbarrier->sreg2 = value->dreg;
- else
- wbarrier->sreg2 = value_reg;
+ wbarrier->sreg2 = value->dreg;
MONO_ADD_INS (cfg->cbb, wbarrier);
} else if (card_table) {
int offset_reg = alloc_preg (cfg);
@@ -2849,13 +2960,7 @@ emit_write_barrier (MonoCompile *cfg, MonoInst *ptr, MonoInst *value, int value_
mono_emit_method_call (cfg, write_barrier, &ptr, NULL);
}
- if (value) {
- EMIT_NEW_DUMMY_USE (cfg, dummy_use, value);
- } else {
- MONO_INST_NEW (cfg, dummy_use, OP_DUMMY_USE);
- dummy_use->sreg1 = value_reg;
- MONO_ADD_INS (cfg->cbb, dummy_use);
- }
+ EMIT_NEW_DUMMY_USE (cfg, dummy_use, value);
}
static gboolean
@@ -2900,11 +3005,17 @@ mono_emit_wb_aware_memcpy (MonoCompile *cfg, MonoClass *klass, MonoInst *iargs[4
EMIT_NEW_UNALU (cfg, iargs [0], OP_MOVE, dest_ptr_reg, destreg);
while (size >= SIZEOF_VOID_P) {
- MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOAD_MEMBASE, tmp_reg, srcreg, offset);
+ MonoInst *load_inst;
+ MONO_INST_NEW (cfg, load_inst, OP_LOAD_MEMBASE);
+ load_inst->dreg = tmp_reg;
+ load_inst->inst_basereg = srcreg;
+ load_inst->inst_offset = offset;
+ MONO_ADD_INS (cfg->cbb, load_inst);
+
MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, dest_ptr_reg, 0, tmp_reg);
if (need_wb & 0x1)
- emit_write_barrier (cfg, iargs [0], NULL, tmp_reg);
+ emit_write_barrier (cfg, iargs [0], load_inst);
offset += SIZEOF_VOID_P;
size -= SIZEOF_VOID_P;
@@ -3331,25 +3442,36 @@ emit_generic_class_init (MonoCompile *cfg, MonoClass *klass)
}
static void
-emit_seq_point (MonoCompile *cfg, MonoMethod *method, guint8* ip, gboolean intr_loc)
+emit_seq_point (MonoCompile *cfg, MonoMethod *method, guint8* ip, gboolean intr_loc, gboolean nonempty_stack)
{
MonoInst *ins;
if (cfg->gen_seq_points && cfg->method == method) {
NEW_SEQ_POINT (cfg, ins, ip - cfg->header->code, intr_loc);
+ if (nonempty_stack)
+ ins->flags |= MONO_INST_NONEMPTY_STACK;
MONO_ADD_INS (cfg->cbb, ins);
}
}
static void
-save_cast_details (MonoCompile *cfg, MonoClass *klass, int obj_reg)
+save_cast_details (MonoCompile *cfg, MonoClass *klass, int obj_reg, gboolean null_check, MonoBasicBlock **out_bblock)
{
if (mini_get_debug_options ()->better_cast_details) {
int to_klass_reg = alloc_preg (cfg);
int vtable_reg = alloc_preg (cfg);
int klass_reg = alloc_preg (cfg);
- MonoInst *tls_get = mono_get_jit_tls_intrinsic (cfg);
+ MonoBasicBlock *is_null_bb = NULL;
+ MonoInst *tls_get;
+
+ if (null_check) {
+ NEW_BBLOCK (cfg, is_null_bb);
+
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, obj_reg, 0);
+ MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBEQ, is_null_bb);
+ }
+ tls_get = mono_get_jit_tls_intrinsic (cfg);
if (!tls_get) {
fprintf (stderr, "error: --debug=casts not supported on this platform.\n.");
exit (1);
@@ -3362,6 +3484,12 @@ save_cast_details (MonoCompile *cfg, MonoClass *klass, int obj_reg)
MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, tls_get->dreg, G_STRUCT_OFFSET (MonoJitTlsData, class_cast_from), klass_reg);
MONO_EMIT_NEW_PCONST (cfg, to_klass_reg, klass);
MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, tls_get->dreg, G_STRUCT_OFFSET (MonoJitTlsData, class_cast_to), to_klass_reg);
+
+ if (null_check) {
+ MONO_START_BB (cfg, is_null_bb);
+ if (out_bblock)
+ *out_bblock = cfg->cbb;
+ }
}
}
@@ -3389,7 +3517,7 @@ mini_emit_check_array_type (MonoCompile *cfg, MonoInst *obj, MonoClass *array_cl
context_used = mini_class_check_context_used (cfg, array_class);
- save_cast_details (cfg, array_class, obj->dreg);
+ save_cast_details (cfg, array_class, obj->dreg, FALSE, NULL);
MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vtable_reg, obj->dreg, G_STRUCT_OFFSET (MonoObject, vtable));
@@ -3506,7 +3634,7 @@ handle_unbox (MonoCompile *cfg, MonoClass *klass, MonoInst **sp, int context_use
MONO_EMIT_NEW_BIALU (cfg, OP_COMPARE, -1, eclass_reg, element_class->dreg);
MONO_EMIT_NEW_COND_EXC (cfg, NE_UN, "InvalidCastException");
} else {
- save_cast_details (cfg, klass->element_class, obj_reg);
+ save_cast_details (cfg, klass->element_class, obj_reg, FALSE, NULL);
mini_emit_class_check (cfg, eclass_reg, klass->element_class);
reset_cast_details (cfg);
}
@@ -3520,7 +3648,7 @@ handle_unbox (MonoCompile *cfg, MonoClass *klass, MonoInst **sp, int context_use
}
static MonoInst*
-handle_unbox_gsharedvt (MonoCompile *cfg, int context_used, MonoClass *klass, MonoInst *obj, MonoBasicBlock **out_cbb)
+handle_unbox_gsharedvt (MonoCompile *cfg, MonoClass *klass, MonoInst *obj, MonoBasicBlock **out_cbb)
{
MonoInst *addr, *klass_inst, *is_ref, *args[16];
MonoBasicBlock *is_ref_bb, *is_nullable_bb, *end_bb;
@@ -3536,7 +3664,7 @@ handle_unbox_gsharedvt (MonoCompile *cfg, int context_used, MonoClass *klass, Mo
args [1] = klass_inst;
/* CASTCLASS */
- obj = mono_emit_jit_icall (cfg, mono_object_castclass, args);
+ obj = mono_emit_jit_icall (cfg, mono_object_castclass_unbox, args);
NEW_BBLOCK (cfg, is_ref_bb);
NEW_BBLOCK (cfg, is_nullable_bb);
@@ -3875,7 +4003,7 @@ handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, obj_reg, 0);
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBEQ, is_null_bb);
- save_cast_details (cfg, klass, obj_reg);
+ save_cast_details (cfg, klass, obj_reg, FALSE, NULL);
if (klass->flags & TYPE_ATTRIBUTE_INTERFACE) {
MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
@@ -4185,7 +4313,7 @@ handle_ccastclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src)
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, obj_reg, 0);
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBEQ, ok_result_bb);
- save_cast_details (cfg, klass, obj_reg);
+ save_cast_details (cfg, klass, obj_reg, FALSE, NULL);
if (klass->flags & TYPE_ATTRIBUTE_INTERFACE) {
#ifndef DISABLE_REMOTING
@@ -4286,7 +4414,7 @@ handle_delegate_ctor (MonoCompile *cfg, MonoClass *klass, MonoInst *target, Mono
if (cfg->gen_write_barriers) {
dreg = alloc_preg (cfg);
EMIT_NEW_BIALU_IMM (cfg, ptr, OP_PADD_IMM, dreg, obj->dreg, G_STRUCT_OFFSET (MonoDelegate, target));
- emit_write_barrier (cfg, ptr, target, 0);
+ emit_write_barrier (cfg, ptr, target);
}
}
@@ -4296,7 +4424,7 @@ handle_delegate_ctor (MonoCompile *cfg, MonoClass *klass, MonoInst *target, Mono
if (cfg->gen_write_barriers) {
dreg = alloc_preg (cfg);
EMIT_NEW_BIALU_IMM (cfg, ptr, OP_PADD_IMM, dreg, obj->dreg, G_STRUCT_OFFSET (MonoDelegate, method));
- emit_write_barrier (cfg, ptr, method_ins, 0);
+ emit_write_barrier (cfg, ptr, method_ins);
}
/*
* To avoid looking up the compiled code belonging to the target method
@@ -4399,7 +4527,7 @@ mono_method_check_inlining (MonoCompile *cfg, MonoMethod *method)
{
MonoMethodHeaderSummary header;
MonoVTable *vtable;
-#ifdef MONO_ARCH_SOFT_FLOAT
+#ifdef MONO_ARCH_SOFT_FLOAT_FALLBACK
MonoMethodSignature *sig = mono_method_signature (method);
int i;
#endif
@@ -4431,8 +4559,8 @@ mono_method_check_inlining (MonoCompile *cfg, MonoMethod *method)
/* also consider num_locals? */
/* Do the size check early to avoid creating vtables */
if (!inline_limit_inited) {
- if (getenv ("MONO_INLINELIMIT"))
- inline_limit = atoi (getenv ("MONO_INLINELIMIT"));
+ if (g_getenv ("MONO_INLINELIMIT"))
+ inline_limit = atoi (g_getenv ("MONO_INLINELIMIT"));
else
inline_limit = INLINE_LENGTH_LIMIT;
inline_limit_inited = TRUE;
@@ -4447,7 +4575,13 @@ mono_method_check_inlining (MonoCompile *cfg, MonoMethod *method)
* inside the inlined code
*/
if (!(cfg->opt & MONO_OPT_SHARED)) {
- if (method->klass->flags & TYPE_ATTRIBUTE_BEFORE_FIELD_INIT) {
+ /* The AggressiveInlining hint is a good excuse to force that cctor to run. */
+ if (method->iflags & METHOD_IMPL_ATTRIBUTE_AGGRESSIVE_INLINING) {
+ vtable = mono_class_vtable (cfg->domain, method->klass);
+ if (!vtable)
+ return FALSE;
+ mono_runtime_class_init (vtable);
+ } else if (method->klass->flags & TYPE_ATTRIBUTE_BEFORE_FIELD_INIT) {
if (cfg->run_cctors && method->klass->has_cctor) {
/*FIXME it would easier and lazier to just use mono_class_try_get_vtable */
if (!method->klass->runtime_info)
@@ -4490,31 +4624,36 @@ mono_method_check_inlining (MonoCompile *cfg, MonoMethod *method)
if (mono_security_method_has_declsec (method))
return FALSE;
-#ifdef MONO_ARCH_SOFT_FLOAT
- /* FIXME: */
- if (sig->ret && sig->ret->type == MONO_TYPE_R4)
- return FALSE;
- for (i = 0; i < sig->param_count; ++i)
- if (!sig->params [i]->byref && sig->params [i]->type == MONO_TYPE_R4)
+#ifdef MONO_ARCH_SOFT_FLOAT_FALLBACK
+ if (mono_arch_is_soft_float ()) {
+ /* FIXME: */
+ if (sig->ret && sig->ret->type == MONO_TYPE_R4)
return FALSE;
+ for (i = 0; i < sig->param_count; ++i)
+ if (!sig->params [i]->byref && sig->params [i]->type == MONO_TYPE_R4)
+ return FALSE;
+ }
#endif
return TRUE;
}
static gboolean
-mini_field_access_needs_cctor_run (MonoCompile *cfg, MonoMethod *method, MonoVTable *vtable)
+mini_field_access_needs_cctor_run (MonoCompile *cfg, MonoMethod *method, MonoClass *klass, MonoVTable *vtable)
{
- if (vtable->initialized && !cfg->compile_aot)
- return FALSE;
+ if (!cfg->compile_aot) {
+ g_assert (vtable);
+ if (vtable->initialized)
+ return FALSE;
+ }
- if (vtable->klass->flags & TYPE_ATTRIBUTE_BEFORE_FIELD_INIT)
+ if (klass->flags & TYPE_ATTRIBUTE_BEFORE_FIELD_INIT)
return FALSE;
- if (!mono_class_needs_cctor_run (vtable->klass, method))
+ if (!mono_class_needs_cctor_run (klass, method))
return FALSE;
- if (! (method->flags & METHOD_ATTRIBUTE_STATIC) && (vtable->klass == method->klass))
+ if (! (method->flags & METHOD_ATTRIBUTE_STATIC) && (klass == method->klass))
/* The initialization is already done before the method is called */
return FALSE;
@@ -4759,7 +4898,7 @@ emit_array_generic_access (MonoCompile *cfg, MonoMethodSignature *fsig, MonoInst
EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, load, &eklass->byval_arg, args [2]->dreg, 0);
EMIT_NEW_STORE_MEMBASE_TYPE (cfg, store, &eklass->byval_arg, addr->dreg, 0, load->dreg);
if (mini_type_is_reference (cfg, fsig->params [2]))
- emit_write_barrier (cfg, addr, load, -1);
+ emit_write_barrier (cfg, addr, load);
} else {
EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, load, &eklass->byval_arg, addr->dreg, 0);
EMIT_NEW_STORE_MEMBASE_TYPE (cfg, store, &eklass->byval_arg, args [2]->dreg, 0, load->dreg);
@@ -4819,7 +4958,7 @@ emit_array_store (MonoCompile *cfg, MonoClass *klass, MonoInst **sp, gboolean sa
MonoInst *addr = mini_emit_ldelema_1_ins (cfg, klass, sp [0], sp [1], safety_checks);
EMIT_NEW_STORE_MEMBASE_TYPE (cfg, ins, &klass->byval_arg, addr->dreg, 0, sp [2]->dreg);
if (generic_class_is_reference_type (cfg, klass))
- emit_write_barrier (cfg, addr, sp [2], -1);
+ emit_write_barrier (cfg, addr, sp [2]);
}
return ins;
}
@@ -5316,7 +5455,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
}
if (cfg->gen_write_barriers && is_ref)
- emit_write_barrier (cfg, args [0], args [1], -1);
+ emit_write_barrier (cfg, args [0], args [1]);
}
#endif /* MONO_ARCH_HAVE_ATOMIC_EXCHANGE */
@@ -5350,7 +5489,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
/* g_assert_not_reached (); */
}
if (cfg->gen_write_barriers && is_ref)
- emit_write_barrier (cfg, args [0], args [1], -1);
+ emit_write_barrier (cfg, args [0], args [1]);
}
#endif /* MONO_ARCH_HAVE_ATOMIC_CAS */
@@ -5385,6 +5524,35 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
* all inputs:
* http://everything2.com/?node_id=1051618
*/
+ } else if ((!strcmp (cmethod->klass->image->assembly->aname.name, "MonoMac") || !strcmp (cmethod->klass->image->assembly->aname.name, "monotouch")) && !strcmp (cmethod->klass->name, "Selector") && !strcmp (cmethod->name, "GetHandle") && cfg->compile_aot && (args [0]->opcode == OP_GOT_ENTRY || args[0]->opcode == OP_AOTCONST)) {
+#ifdef MONO_ARCH_HAVE_OBJC_GET_SELECTOR
+ MonoInst *pi;
+ MonoJumpInfoToken *ji;
+ MonoString *s;
+
+ cfg->disable_llvm = TRUE;
+
+ if (args [0]->opcode == OP_GOT_ENTRY) {
+ pi = args [0]->inst_p1;
+ g_assert (pi->opcode == OP_PATCH_INFO);
+ g_assert ((int)pi->inst_p1 == MONO_PATCH_INFO_LDSTR);
+ ji = pi->inst_p0;
+ } else {
+ g_assert ((int)args [0]->inst_p1 == MONO_PATCH_INFO_LDSTR);
+ ji = args [0]->inst_p0;
+ }
+
+ NULLIFY_INS (args [0]);
+
+ // FIXME: Ugly
+ s = mono_ldstr (cfg->domain, ji->image, mono_metadata_token_index (ji->token));
+ MONO_INST_NEW (cfg, ins, OP_OBJC_GET_SELECTOR);
+ ins->dreg = mono_alloc_ireg (cfg);
+ // FIXME: Leaks
+ ins->inst_p0 = mono_string_to_utf8 (s);
+ MONO_ADD_INS (cfg->cbb, ins);
+ return ins;
+#endif
}
#ifdef MONO_ARCH_SIMD_INTRINSICS
@@ -5467,15 +5635,15 @@ static gboolean
check_inline_called_method_name_limit (MonoMethod *called_method)
{
int strncmp_result;
- static char *limit = NULL;
+ static const char *limit = NULL;
if (limit == NULL) {
- char *limit_string = getenv ("MONO_INLINE_CALLED_METHOD_NAME_LIMIT");
+ const char *limit_string = g_getenv ("MONO_INLINE_CALLED_METHOD_NAME_LIMIT");
if (limit_string != NULL)
limit = limit_string;
else
- limit = (char *) "";
+ limit = "";
}
if (limit [0] != '\0') {
@@ -5497,14 +5665,14 @@ static gboolean
check_inline_caller_method_name_limit (MonoMethod *caller_method)
{
int strncmp_result;
- static char *limit = NULL;
+ static const char *limit = NULL;
if (limit == NULL) {
- char *limit_string = getenv ("MONO_INLINE_CALLER_METHOD_NAME_LIMIT");
+ const char *limit_string = g_getenv ("MONO_INLINE_CALLER_METHOD_NAME_LIMIT");
if (limit_string != NULL) {
limit = limit_string;
} else {
- limit = (char *) "";
+ limit = "";
}
}
@@ -5523,35 +5691,48 @@ check_inline_caller_method_name_limit (MonoMethod *caller_method)
#endif
static void
-emit_init_rvar (MonoCompile *cfg, MonoInst *rvar, MonoType *rtype)
+emit_init_rvar (MonoCompile *cfg, int dreg, MonoType *rtype)
{
static double r8_0 = 0.0;
MonoInst *ins;
- switch (rvar->type) {
- case STACK_I4:
- MONO_EMIT_NEW_ICONST (cfg, rvar->dreg, 0);
- break;
- case STACK_I8:
- MONO_EMIT_NEW_I8CONST (cfg, rvar->dreg, 0);
- break;
- case STACK_PTR:
- case STACK_MP:
- case STACK_OBJ:
- MONO_EMIT_NEW_PCONST (cfg, rvar->dreg, 0);
- break;
- case STACK_R8:
+ int t = rtype->type;
+
+ if (t == MONO_TYPE_VALUETYPE && rtype->data.klass->enumtype)
+ t = mono_class_enum_basetype (rtype->data.klass)->type;
+ if (rtype->byref) {
+ MONO_EMIT_NEW_PCONST (cfg, dreg, NULL);
+ } else if (t >= MONO_TYPE_BOOLEAN && t <= MONO_TYPE_U4) {
+ MONO_EMIT_NEW_ICONST (cfg, dreg, 0);
+ } else if (t == MONO_TYPE_I8 || t == MONO_TYPE_U8) {
+ MONO_EMIT_NEW_I8CONST (cfg, dreg, 0);
+ } else if (t == MONO_TYPE_R4 || t == MONO_TYPE_R8) {
MONO_INST_NEW (cfg, ins, OP_R8CONST);
ins->type = STACK_R8;
ins->inst_p0 = (void*)&r8_0;
- ins->dreg = rvar->dreg;
+ ins->dreg = dreg;
MONO_ADD_INS (cfg->cbb, ins);
- break;
- case STACK_VTYPE:
- MONO_EMIT_NEW_VZERO (cfg, rvar->dreg, mono_class_from_mono_type (rtype));
- break;
- default:
- g_assert_not_reached ();
+ } else if ((t == MONO_TYPE_VALUETYPE) || (t == MONO_TYPE_TYPEDBYREF) ||
+ ((t == MONO_TYPE_GENERICINST) && mono_type_generic_inst_is_valuetype (rtype))) {
+ MONO_EMIT_NEW_VZERO (cfg, dreg, mono_class_from_mono_type (rtype));
+ } else if (((t == MONO_TYPE_VAR) || (t == MONO_TYPE_MVAR)) && mini_type_var_is_vt (cfg, rtype)) {
+ MONO_EMIT_NEW_VZERO (cfg, dreg, mono_class_from_mono_type (rtype));
+ } else {
+ MONO_EMIT_NEW_PCONST (cfg, dreg, NULL);
+ }
+}
+
+static void
+emit_init_local (MonoCompile *cfg, int local, MonoType *type)
+{
+ MonoInst *var = cfg->locals [local];
+ if (COMPILE_SOFT_FLOAT (cfg)) {
+ MonoInst *store;
+ int reg = alloc_dreg (cfg, var->type);
+ emit_init_rvar (cfg, reg, type);
+ EMIT_NEW_LOCSTORE (cfg, store, local, cfg->cbb->last_ins);
+ } else {
+ emit_init_rvar (cfg, var->dreg, type);
}
}
@@ -5716,7 +5897,7 @@ inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig,
if (bb->last_ins && bb->last_ins->opcode == OP_NOT_REACHED) {
cfg->cbb = bb;
- emit_init_rvar (cfg, rvar, fsig->ret);
+ emit_init_rvar (cfg, rvar->dreg, fsig->ret);
}
}
}
@@ -5730,7 +5911,7 @@ inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig,
* set, so set it to a dummy value.
*/
if (!ret_var_set)
- emit_init_rvar (cfg, rvar, fsig->ret);
+ emit_init_rvar (cfg, rvar->dreg, fsig->ret);
EMIT_NEW_TEMPLOAD (cfg, ins, rvar->inst_c0);
*sp++ = ins;
@@ -6184,6 +6365,7 @@ emit_optimized_ldloca_ir (MonoCompile *cfg, unsigned char *ip, unsigned char *en
{
int local, token;
MonoClass *klass;
+ MonoType *type;
if (size == 1) {
local = ip [1];
@@ -6194,22 +6376,13 @@ emit_optimized_ldloca_ir (MonoCompile *cfg, unsigned char *ip, unsigned char *en
}
if (ip + 6 < end && (ip [0] == CEE_PREFIX1) && (ip [1] == CEE_INITOBJ) && ip_in_bb (cfg, cfg->cbb, ip + 1)) {
- gboolean skip = FALSE;
-
/* From the INITOBJ case */
token = read32 (ip + 2);
klass = mini_get_class (cfg->current_method, token, cfg->generic_context);
CHECK_TYPELOAD (klass);
- if (mini_type_is_reference (cfg, &klass->byval_arg)) {
- MONO_EMIT_NEW_PCONST (cfg, cfg->locals [local]->dreg, NULL);
- } else if (MONO_TYPE_ISSTRUCT (&klass->byval_arg)) {
- MONO_EMIT_NEW_VZERO (cfg, cfg->locals [local]->dreg, klass);
- } else {
- skip = TRUE;
- }
-
- if (!skip)
- return ip + 6;
+ type = &klass->byval_arg;
+ emit_init_local (cfg, local, type);
+ return ip + 6;
}
load_error:
return NULL;
@@ -6290,13 +6463,13 @@ is_jit_optimizer_disabled (MonoMethod *m)
}
static gboolean
-is_supported_tail_call (MonoCompile *cfg, MonoMethod *method, MonoMethod *cmethod, MonoMethodSignature *fsig)
+is_supported_tail_call (MonoCompile *cfg, MonoMethod *method, MonoMethod *cmethod, MonoMethodSignature *fsig, int call_opcode)
{
gboolean supported_tail_call;
int i;
-#ifdef MONO_ARCH_USE_OP_TAIL_CALL
- supported_tail_call = MONO_ARCH_USE_OP_TAIL_CALL (mono_method_signature (method), mono_method_signature (cmethod));
+#ifdef MONO_ARCH_HAVE_OP_TAIL_CALL
+ supported_tail_call = mono_arch_tail_call_supported (mono_method_signature (method), mono_method_signature (cmethod));
#else
supported_tail_call = mono_metadata_signature_equal (mono_method_signature (method), mono_method_signature (cmethod)) && !MONO_TYPE_ISSTRUCT (mono_method_signature (cmethod)->ret);
#endif
@@ -6315,6 +6488,8 @@ is_supported_tail_call (MonoCompile *cfg, MonoMethod *method, MonoMethod *cmetho
supported_tail_call = FALSE;
if (cmethod->wrapper_type && cmethod->wrapper_type != MONO_WRAPPER_DYNAMIC_METHOD)
supported_tail_call = FALSE;
+ if (call_opcode != CEE_CALL)
+ supported_tail_call = FALSE;
/* Debugging support */
#if 0
@@ -6428,7 +6603,6 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
MonoClass *klass;
MonoClass *constrained_call = NULL;
unsigned char *ip, *end, *target, *err_pos;
- static double r8_0 = 0.0;
MonoMethodSignature *sig;
MonoGenericContext *generic_context = NULL;
MonoGenericContainer *generic_container = NULL;
@@ -6515,6 +6689,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
if (il_offsets [i] < header->code_size)
mono_bitset_set_fast (seq_point_locs, il_offsets [i]);
}
+ g_free (il_offsets);
+ g_free (line_numbers);
}
}
@@ -6619,7 +6795,12 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
tblock->real_offset = clause->handler_offset;
tblock->flags |= BB_EXCEPTION_HANDLER;
- link_bblock (cfg, try_bb, tblock);
+ /*
+ * Linking the try block with the EH block hinders inlining as we won't be able to
+ * merge the bblocks from inlining and produce an artificial hole for no good reason.
+ */
+ if (COMPILE_LLVM (cfg))
+ link_bblock (cfg, try_bb, tblock);
if (*(ip + clause->handler_offset) == CEE_POP)
tblock->flags |= BB_EXCEPTION_DEAD_OBJ;
@@ -6795,7 +6976,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
/* prevent it from being register allocated */
- //var->flags |= MONO_INST_INDIRECT;
+ //var->flags |= MONO_INST_VOLATILE;
cfg->gsharedvt_info_var = var;
ins = emit_get_rgctx_gsharedvt_method (cfg, mini_method_check_context_used (cfg, method), method, info);
@@ -6804,7 +6985,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
/* Allocate locals */
locals_var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
/* prevent it from being register allocated */
- //locals_var->flags |= MONO_INST_INDIRECT;
+ //locals_var->flags |= MONO_INST_VOLATILE;
cfg->gsharedvt_locals_var = locals_var;
dreg = alloc_ireg (cfg);
@@ -6878,6 +7059,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
}
}
+ CHECK_CFG_EXCEPTION;
+
if (header->code_size == 0)
UNVERIFIED;
@@ -6907,7 +7090,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
/* FIXME: Is there a better way to do this?
We need the variable live for the duration
of the whole method. */
- cfg->args [0]->flags |= MONO_INST_INDIRECT;
+ cfg->args [0]->flags |= MONO_INST_VOLATILE;
}
}
@@ -7029,6 +7212,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
// FIXME: Enable this
//if (!(cfg->cbb->last_ins && cfg->cbb->last_ins->opcode == OP_SEQ_POINT)) {
NEW_SEQ_POINT (cfg, ins, ip - header->code, intr_loc);
+ if (sp != stack_start)
+ ins->flags |= MONO_INST_NONEMPTY_STACK;
MONO_ADD_INS (cfg->cbb, ins);
if (sym_seq_points)
@@ -7367,8 +7552,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
if (mono_security_cas_enabled ())
CHECK_CFG_EXCEPTION;
-#ifdef MONO_ARCH_USE_OP_TAIL_CALL
- {
+ if (ARCH_HAVE_OP_TAIL_CALL) {
MonoMethodSignature *fsig = mono_method_signature (cmethod);
int i, n;
@@ -7386,17 +7570,16 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
mono_arch_emit_call (cfg, call);
MONO_ADD_INS (bblock, (MonoInst*)call);
- }
-#else
- for (i = 0; i < num_args; ++i)
- /* Prevent arguments from being optimized away */
- arg_array [i]->flags |= MONO_INST_VOLATILE;
+ } else {
+ for (i = 0; i < num_args; ++i)
+ /* Prevent arguments from being optimized away */
+ arg_array [i]->flags |= MONO_INST_VOLATILE;
- MONO_INST_NEW_CALL (cfg, call, OP_JMP);
- ins = (MonoInst*)call;
- ins->inst_p0 = cmethod;
- MONO_ADD_INS (bblock, ins);
-#endif
+ MONO_INST_NEW_CALL (cfg, call, OP_JMP);
+ ins = (MonoInst*)call;
+ ins->inst_p0 = cmethod;
+ MONO_ADD_INS (bblock, ins);
+ }
ip += 5;
start_new_bblock = 1;
@@ -7536,7 +7719,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
if (fsig->pinvoke) {
MonoMethod *wrapper = mono_marshal_get_native_wrapper (cmethod,
- check_for_pending_exc, FALSE);
+ check_for_pending_exc, cfg->compile_aot);
fsig = mono_method_signature (wrapper);
} else if (constrained_call) {
fsig = mono_method_signature (cmethod);
@@ -7547,7 +7730,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
mono_save_token_info (cfg, image, token, cil_method);
- if (!MONO_TYPE_IS_VOID (fsig->ret) && !sym_seq_points) {
+ if (!MONO_TYPE_IS_VOID (fsig->ret)) {
/*
* Need to emit an implicit seq point after every non-void call so single stepping through nested calls like
* foo (bar (), baz ())
@@ -7558,7 +7741,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
* int i = foo ();
*/
/* Special case a few common successor opcodes */
- if (!(ip + 5 < end && ip [5] == CEE_POP))
+ if (!(ip + 5 < end && (ip [5] == CEE_POP || ip [5] == CEE_NOP)) && !(seq_point_locs && mono_bitset_test_fast (seq_point_locs, ip + 5 - header->code)))
need_seq_point = TRUE;
}
@@ -7599,27 +7782,73 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
/*
* Constrained calls need to behave differently at runtime dependending on whenever the receiver is instantiated as ref type or as a vtype.
*/
- /* Special case Object methods as they are easy to implement */
- if (cmethod->klass == mono_defaults.object_class) {
+ if ((cmethod->klass != mono_defaults.object_class) && constrained_call->valuetype && cmethod->klass->valuetype) {
+ /* The 'Own method' case below */
+ } else if (cmethod->klass->image != mono_defaults.corlib && !(cmethod->klass->flags & TYPE_ATTRIBUTE_INTERFACE) && !cmethod->klass->valuetype) {
+ /* 'The type parameter is instantiated as a reference type' case below. */
+ } else if (((cmethod->klass == mono_defaults.object_class) || (cmethod->klass->flags & TYPE_ATTRIBUTE_INTERFACE) || (!cmethod->klass->valuetype && cmethod->klass->image != mono_defaults.corlib)) &&
+ (MONO_TYPE_IS_VOID (fsig->ret) || MONO_TYPE_IS_PRIMITIVE (fsig->ret) || MONO_TYPE_IS_REFERENCE (fsig->ret) || mini_is_gsharedvt_type (cfg, fsig->ret)) &&
+ (fsig->param_count == 0 || (!fsig->hasthis && fsig->param_count == 1) || (fsig->param_count == 1 && (MONO_TYPE_IS_REFERENCE (fsig->params [0]) || mini_is_gsharedvt_type (cfg, fsig->params [0]))))) {
MonoInst *args [16];
+ /*
+ * This case handles calls to
+ * - object:ToString()/Equals()/GetHashCode(),
+ * - System.IComparable<T>:CompareTo()
+ * - System.IEquatable<T>:Equals ()
+ * plus some simple interface calls enough to support AsyncTaskMethodBuilder.
+ */
+
args [0] = sp [0];
- EMIT_NEW_METHODCONST (cfg, args [1], cmethod);
+ if (mono_method_check_context_used (cmethod))
+ args [1] = emit_get_rgctx_method (cfg, mono_method_check_context_used (cmethod), cmethod, MONO_RGCTX_INFO_METHOD);
+ else
+ EMIT_NEW_METHODCONST (cfg, args [1], cmethod);
args [2] = emit_get_rgctx_klass (cfg, mono_class_check_context_used (constrained_call), constrained_call, MONO_RGCTX_INFO_KLASS);
- if (!strcmp (cmethod->name, "ToString")) {
- ins = mono_emit_jit_icall (cfg, mono_object_tostring_gsharedvt, args);
- } else if (!strcmp (cmethod->name, "Equals")) {
- args [3] = sp [1];
- ins = mono_emit_jit_icall (cfg, mono_object_equals_gsharedvt, args);
- } else if (!strcmp (cmethod->name, "GetHashCode")) {
- ins = mono_emit_jit_icall (cfg, mono_object_gethashcode_gsharedvt, args);
+ /* !fsig->hasthis is for the wrapper for the Object.GetType () icall */
+ if (fsig->hasthis && fsig->param_count) {
+ /* Pass the arguments using a localloc-ed array using the format expected by runtime_invoke () */
+ MONO_INST_NEW (cfg, ins, OP_LOCALLOC_IMM);
+ ins->dreg = alloc_preg (cfg);
+ ins->inst_imm = fsig->param_count * sizeof (mgreg_t);
+ MONO_ADD_INS (cfg->cbb, ins);
+ args [4] = ins;
+
+ if (mini_is_gsharedvt_type (cfg, fsig->params [0])) {
+ int addr_reg;
+
+ args [3] = emit_get_gsharedvt_info_klass (cfg, mono_class_from_mono_type (fsig->params [0]), MONO_RGCTX_INFO_CLASS_BOX_TYPE);
+
+ EMIT_NEW_VARLOADA_VREG (cfg, ins, sp [1]->dreg, fsig->params [0]);
+ addr_reg = ins->dreg;
+ EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, args [4]->dreg, 0, addr_reg);
+ } else {
+ EMIT_NEW_ICONST (cfg, args [3], 0);
+ EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, args [4]->dreg, 0, sp [1]->dreg);
+ }
} else {
- GSHAREDVT_FAILURE (*ip);
+ EMIT_NEW_ICONST (cfg, args [3], 0);
+ EMIT_NEW_ICONST (cfg, args [4], 0);
+ }
+ ins = mono_emit_jit_icall (cfg, mono_gsharedvt_constrained_call, args);
+ emit_widen = FALSE;
+
+ if (mini_is_gsharedvt_type (cfg, fsig->ret)) {
+ ins = handle_unbox_gsharedvt (cfg, mono_class_from_mono_type (fsig->ret), ins, &bblock);
+ } else if (MONO_TYPE_IS_PRIMITIVE (fsig->ret)) {
+ MonoInst *add;
+
+ /* Unbox */
+ NEW_BIALU_IMM (cfg, add, OP_ADD_IMM, alloc_dreg (cfg, STACK_MP), ins->dreg, sizeof (MonoObject));
+ MONO_ADD_INS (cfg->cbb, add);
+ /* Load value */
+ NEW_LOAD_MEMBASE_TYPE (cfg, ins, fsig->ret, add->dreg, 0);
+ MONO_ADD_INS (cfg->cbb, ins);
+ /* ins represents the call result */
}
+
goto call_end;
- } else if (constrained_call->valuetype && cmethod->klass->valuetype) {
- /* The 'Own method' case below */
} else {
GSHAREDVT_FAILURE (*ip);
}
@@ -8084,7 +8313,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
addr = mini_emit_ldelema_ins (cfg, cmethod, sp, ip, TRUE);
EMIT_NEW_STORE_MEMBASE_TYPE (cfg, ins, fsig->params [fsig->param_count - 1], addr->dreg, 0, val->dreg);
if (cfg->gen_write_barriers && val->type == STACK_OBJ && !(val->opcode == OP_PCONST && val->inst_c0 == 0))
- emit_write_barrier (cfg, addr, val, 0);
+ emit_write_barrier (cfg, addr, val);
} else if (strcmp (cmethod->name, "Get") == 0) { /* array Get */
addr = mini_emit_ldelema_ins (cfg, cmethod, sp, ip, FALSE);
@@ -8115,12 +8344,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
/* FIXME: runtime generic context pointer for jumps? */
/* FIXME: handle this for generic sharing eventually */
if (cmethod && (ins_flag & MONO_INST_TAILCALL) &&
- !vtable_arg && !cfg->generic_sharing_context && is_supported_tail_call (cfg, method, cmethod, fsig))
+ !vtable_arg && !cfg->generic_sharing_context && is_supported_tail_call (cfg, method, cmethod, fsig, call_opcode))
supported_tail_call = TRUE;
- if (supported_tail_call) {
- if (call_opcode != CEE_CALL)
- supported_tail_call = FALSE;
- }
if (supported_tail_call) {
MonoCallInst *call;
@@ -8130,7 +8355,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
//printf ("HIT: %s -> %s\n", mono_method_full_name (cfg->method, TRUE), mono_method_full_name (cmethod, TRUE));
- if (ARCH_USE_OP_TAIL_CALL) {
+ if (ARCH_HAVE_OP_TAIL_CALL) {
/* Handle tail calls similarly to normal calls */
tail_call = TRUE;
} else {
@@ -8178,8 +8403,11 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
* change the called method to a dummy wrapper, and resolve that wrapper
* to the real method in mono_jit_compile_method ().
*/
- if (cfg->method->wrapper_type == MONO_WRAPPER_SYNCHRONIZED && mono_marshal_method_from_wrapper (cfg->method) == cmethod)
- cmethod = mono_marshal_get_synchronized_inner_wrapper (cmethod);
+ if (cfg->method->wrapper_type == MONO_WRAPPER_SYNCHRONIZED) {
+ MonoMethod *orig = mono_marshal_method_from_wrapper (cfg->method);
+ if (cmethod == orig || (cmethod->is_inflated && mono_method_get_declaring_generic_method (cmethod) == orig))
+ cmethod = mono_marshal_get_synchronized_inner_wrapper (cmethod);
+ }
/* Common call */
INLINE_FAILURE ("call");
@@ -8231,7 +8459,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
ins_flag = 0;
constrained_call = NULL;
if (need_seq_point)
- emit_seq_point (cfg, method, ip, FALSE);
+ emit_seq_point (cfg, method, ip, FALSE, TRUE);
break;
}
case CEE_RET:
@@ -8258,6 +8486,9 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
cfg->ret_var_set = TRUE;
}
} else {
+ if (cfg->lmf_var && cfg->cbb->in_count)
+ emit_pop_lmf (cfg);
+
if (cfg->ret) {
MonoType *ret_type = mono_method_signature (method)->ret;
@@ -8294,7 +8525,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
ins->klass = mono_class_from_mono_type (ret_type);
}
} else {
-#ifdef MONO_ARCH_SOFT_FLOAT
+#ifdef MONO_ARCH_SOFT_FLOAT_FALLBACK
if (COMPILE_SOFT_FLOAT (cfg) && !ret_type->byref && ret_type->type == MONO_TYPE_R4) {
MonoInst *iargs [1];
MonoInst *conv;
@@ -8640,7 +8871,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
MONO_ADD_INS (bblock, ins);
if (cfg->gen_write_barriers && *ip == CEE_STIND_REF && method->wrapper_type != MONO_WRAPPER_WRITE_BARRIER && !((sp [1]->opcode == OP_PCONST) && (sp [1]->inst_p0 == 0)))
- emit_write_barrier (cfg, sp [0], sp [1], -1);
+ emit_write_barrier (cfg, sp [0], sp [1]);
inline_costs += 1;
++ip;
@@ -8851,7 +9082,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
MONO_ADD_INS (cfg->cbb, store);
if (cfg->gen_write_barriers && cfg->method->wrapper_type != MONO_WRAPPER_WRITE_BARRIER)
- emit_write_barrier (cfg, sp [0], sp [1], -1);
+ emit_write_barrier (cfg, sp [0], sp [1]);
} else {
mini_emit_stobj (cfg, sp [0], sp [1], klass, FALSE);
}
@@ -9132,7 +9363,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
if (cmethod->klass->valuetype) {
iargs [0] = mono_compile_create_var (cfg, &cmethod->klass->byval_arg, OP_LOCAL);
- MONO_EMIT_NEW_VZERO (cfg, iargs [0]->dreg, cmethod->klass);
+ emit_init_rvar (cfg, iargs [0]->dreg, &cmethod->klass->byval_arg);
EMIT_NEW_TEMPLOADA (cfg, *sp, iargs [0]->inst_c0);
alloc = NULL;
@@ -9146,8 +9377,10 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
alloc = handle_alloc (cfg, cmethod->klass, FALSE, context_used);
*sp = alloc;
} else {
- MonoVTable *vtable = mono_class_vtable (cfg->domain, cmethod->klass);
+ MonoVTable *vtable = NULL;
+ if (!cfg->compile_aot)
+ vtable = mono_class_vtable (cfg->domain, cmethod->klass);
CHECK_TYPELOAD (cmethod->klass);
/*
@@ -9155,11 +9388,11 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
* call in mono_jit_runtime_invoke () can abort the finalizer thread.
* As a workaround, we call class cctors before allocating objects.
*/
- if (mini_field_access_needs_cctor_run (cfg, method, vtable) && !(g_slist_find (class_inits, vtable))) {
- mono_emit_abs_call (cfg, MONO_PATCH_INFO_CLASS_INIT, vtable->klass, helper_sig_class_init_trampoline, NULL);
+ if (mini_field_access_needs_cctor_run (cfg, method, cmethod->klass, vtable) && !(g_slist_find (class_inits, cmethod->klass))) {
+ mono_emit_abs_call (cfg, MONO_PATCH_INFO_CLASS_INIT, cmethod->klass, helper_sig_class_init_trampoline, NULL);
if (cfg->verbose_level > 2)
printf ("class %s.%s needs init call for ctor\n", cmethod->klass->name_space, cmethod->klass->name);
- class_inits = g_slist_prepend (class_inits, vtable);
+ class_inits = g_slist_prepend (class_inits, cmethod->klass);
}
alloc = handle_alloc (cfg, cmethod->klass, FALSE, 0);
@@ -9265,7 +9498,10 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
EMIT_NEW_PCONST (cfg, args [2], mono_domain_alloc0 (cfg->domain, sizeof (gpointer)));
/*The wrapper doesn't inline well so the bloat of inlining doesn't pay off.*/
+
+ save_cast_details (cfg, klass, sp [0]->dreg, TRUE, &bblock);
*sp++ = mono_emit_method_call (cfg, mono_castclass, args, NULL);
+ reset_cast_details (cfg);
ip += 5;
inline_costs += 2;
} else if (!context_used && (mono_class_is_marshalbyref (klass) || klass->flags & TYPE_ATTRIBUTE_INTERFACE)) {
@@ -9276,8 +9512,10 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
mono_castclass = mono_marshal_get_castclass (klass);
iargs [0] = sp [0];
+ save_cast_details (cfg, klass, sp [0]->dreg, TRUE, &bblock);
costs = inline_method (cfg, mono_castclass, mono_method_signature (mono_castclass),
iargs, ip, cfg->real_offset, dont_inline, TRUE);
+ reset_cast_details (cfg);
CHECK_CFG_EXCEPTION;
g_assert (costs > 0);
@@ -9371,7 +9609,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
context_used = mini_class_check_context_used (cfg, klass);
if (mini_is_gsharedvt_klass (cfg, klass)) {
- *sp = handle_unbox_gsharedvt (cfg, context_used, klass, *sp, &bblock);
+ *sp = handle_unbox_gsharedvt (cfg, klass, *sp, &bblock);
sp ++;
ip += 5;
@@ -9739,7 +9977,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
dreg = alloc_ireg_mp (cfg);
EMIT_NEW_BIALU_IMM (cfg, ptr, OP_PADD_IMM, dreg, sp [0]->dreg, foffset);
- emit_write_barrier (cfg, ptr, sp [1], -1);
+ emit_write_barrier (cfg, ptr, sp [1]);
}
store->flags |= ins_flag;
@@ -9983,16 +10221,19 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
EMIT_NEW_FIELDCONST (cfg, iargs [1], field);
ins = mono_emit_jit_icall (cfg, mono_class_static_field_address, iargs);
} else {
- MonoVTable *vtable = mono_class_vtable (cfg->domain, klass);
+ MonoVTable *vtable = NULL;
+ if (!cfg->compile_aot)
+ vtable = mono_class_vtable (cfg->domain, klass);
CHECK_TYPELOAD (klass);
+
if (!addr) {
- if (mini_field_access_needs_cctor_run (cfg, method, vtable)) {
- if (!(g_slist_find (class_inits, vtable))) {
- mono_emit_abs_call (cfg, MONO_PATCH_INFO_CLASS_INIT, vtable->klass, helper_sig_class_init_trampoline, NULL);
+ if (mini_field_access_needs_cctor_run (cfg, method, klass, vtable)) {
+ if (!(g_slist_find (class_inits, klass))) {
+ mono_emit_abs_call (cfg, MONO_PATCH_INFO_CLASS_INIT, klass, helper_sig_class_init_trampoline, NULL);
if (cfg->verbose_level > 2)
printf ("class %s.%s needs init call for %s\n", klass->name_space, klass->name, mono_field_get_name (field));
- class_inits = g_slist_prepend (class_inits, vtable);
+ class_inits = g_slist_prepend (class_inits, klass);
}
} else {
if (cfg->run_cctors) {
@@ -10000,6 +10241,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
/* This makes so that inline cannot trigger */
/* .cctors: too many apps depend on them */
/* running with a specific order... */
+ g_assert (vtable);
if (! vtable->initialized)
INLINE_FAILURE ("class init");
ex = mono_runtime_class_init_full (vtable, FALSE);
@@ -10009,12 +10251,13 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
}
}
}
- addr = (char*)mono_vtable_get_static_field_data (vtable) + field->offset;
-
if (cfg->compile_aot)
EMIT_NEW_SFLDACONST (cfg, ins, field);
- else
+ else {
+ g_assert (vtable);
+ addr = (char*)mono_vtable_get_static_field_data (vtable) + field->offset;
EMIT_NEW_PCONST (cfg, ins, addr);
+ }
} else {
MonoInst *iargs [1];
EMIT_NEW_ICONST (cfg, iargs [0], GPOINTER_TO_UINT (addr));
@@ -10145,7 +10388,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
if (cfg->gen_write_barriers && cfg->method->wrapper_type != MONO_WRAPPER_WRITE_BARRIER &&
generic_class_is_reference_type (cfg, klass)) {
/* insert call to write barrier */
- emit_write_barrier (cfg, sp [0], sp [1], -1);
+ emit_write_barrier (cfg, sp [0], sp [1]);
}
ins_flag = 0;
ip += 5;
@@ -10173,7 +10416,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
context_used = mini_class_check_context_used (cfg, klass);
if (sp [0]->type == STACK_I8 || (SIZEOF_VOID_P == 8 && sp [0]->type == STACK_PTR)) {
- MONO_INST_NEW (cfg, ins, OP_LCONV_TO_I4);
+ MONO_INST_NEW (cfg, ins, OP_LCONV_TO_OVF_U4);
ins->sreg1 = sp [0]->dreg;
ins->type = STACK_I4;
ins->dreg = alloc_ireg (cfg);
@@ -10573,7 +10816,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
if ((ip + 5 < end) && ip_in_bb (cfg, bblock, ip + 5) &&
((ip [5] == CEE_CALL) || (ip [5] == CEE_CALLVIRT)) &&
(cmethod = mini_get_method (cfg, method, read32 (ip + 6), NULL, generic_context)) &&
- (cmethod->klass == mono_defaults.monotype_class->parent) &&
+ (cmethod->klass == mono_defaults.systemtype_class) &&
(strcmp (cmethod->name, "GetTypeFromHandle") == 0)) {
MonoClass *tclass = mono_class_from_mono_type (handle);
@@ -10652,7 +10895,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
case CEE_ENDFINALLY:
/* mono_save_seq_point_info () depends on this */
if (sp != stack_start)
- emit_seq_point (cfg, method, ip, FALSE);
+ emit_seq_point (cfg, method, ip, FALSE, FALSE);
MONO_INST_NEW (cfg, ins, OP_ENDFINALLY);
MONO_ADD_INS (bblock, ins);
ip++;
@@ -11008,17 +11251,31 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
bblock->out_of_line = TRUE;
ip += 2;
break;
- case CEE_MONO_TLS:
+ case CEE_MONO_TLS: {
+ int key;
+
CHECK_STACK_OVF (1);
CHECK_OPSIZE (6);
- MONO_INST_NEW (cfg, ins, OP_TLS_GET);
- ins->dreg = alloc_preg (cfg);
- ins->inst_offset = (gint32)read32 (ip + 2);
+ key = (gint32)read32 (ip + 2);
+ g_assert (key < TLS_KEY_NUM);
+
+ ins = mono_create_tls_get (cfg, key);
+ if (!ins) {
+ if (cfg->compile_aot) {
+ cfg->disable_aot = TRUE;
+ MONO_INST_NEW (cfg, ins, OP_TLS_GET);
+ ins->dreg = alloc_preg (cfg);
+ ins->type = STACK_PTR;
+ } else {
+ g_assert_not_reached ();
+ }
+ }
ins->type = STACK_PTR;
MONO_ADD_INS (bblock, ins);
*sp++ = ins;
ip += 6;
break;
+ }
case CEE_MONO_DYN_CALL: {
MonoCallInst *call;
@@ -11030,7 +11287,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
if (!cfg->dyn_call_var) {
cfg->dyn_call_var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
/* prevent it from being register allocated */
- cfg->dyn_call_var->flags |= MONO_INST_INDIRECT;
+ cfg->dyn_call_var->flags |= MONO_INST_VOLATILE;
}
/* Has to use a call inst since it local regalloc expects it */
@@ -11619,6 +11876,11 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
bblock->next_bb = end_bblock;
}
+ if (cfg->lmf_var) {
+ cfg->cbb = init_localsbb;
+ emit_push_lmf (cfg);
+ }
+
if (cfg->method == method && cfg->domainvar) {
MonoInst *store;
MonoInst *get_domain;
@@ -11646,38 +11908,10 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
mono_emit_load_got_addr (cfg);
if (init_locals) {
- MonoInst *store;
-
cfg->cbb = init_localsbb;
cfg->ip = NULL;
for (i = 0; i < header->num_locals; ++i) {
- MonoType *ptype = header->locals [i];
- int t = ptype->type;
- dreg = cfg->locals [i]->dreg;
-
- if (t == MONO_TYPE_VALUETYPE && ptype->data.klass->enumtype)
- t = mono_class_enum_basetype (ptype->data.klass)->type;
- if (ptype->byref) {
- MONO_EMIT_NEW_PCONST (cfg, dreg, NULL);
- } else if (t >= MONO_TYPE_BOOLEAN && t <= MONO_TYPE_U4) {
- MONO_EMIT_NEW_ICONST (cfg, cfg->locals [i]->dreg, 0);
- } else if (t == MONO_TYPE_I8 || t == MONO_TYPE_U8) {
- MONO_EMIT_NEW_I8CONST (cfg, cfg->locals [i]->dreg, 0);
- } else if (t == MONO_TYPE_R4 || t == MONO_TYPE_R8) {
- MONO_INST_NEW (cfg, ins, OP_R8CONST);
- ins->type = STACK_R8;
- ins->inst_p0 = (void*)&r8_0;
- ins->dreg = alloc_dreg (cfg, STACK_R8);
- MONO_ADD_INS (init_localsbb, ins);
- EMIT_NEW_LOCSTORE (cfg, store, i, ins);
- } else if ((t == MONO_TYPE_VALUETYPE) || (t == MONO_TYPE_TYPEDBYREF) ||
- ((t == MONO_TYPE_GENERICINST) && mono_type_generic_inst_is_valuetype (ptype))) {
- MONO_EMIT_NEW_VZERO (cfg, dreg, mono_class_from_mono_type (ptype));
- } else if (((t == MONO_TYPE_VAR) || (t == MONO_TYPE_MVAR)) && mini_type_var_is_vt (cfg, ptype)) {
- MONO_EMIT_NEW_VZERO (cfg, dreg, mono_class_from_mono_type (ptype));
- } else {
- MONO_EMIT_NEW_PCONST (cfg, dreg, NULL);
- }
+ emit_init_local (cfg, i, header->locals [i]);
}
}
@@ -12405,10 +12639,13 @@ mono_handle_global_vregs (MonoCompile *cfg)
#if SIZEOF_REGISTER == 8
case STACK_I8:
#endif
-#if !defined(TARGET_X86) && !defined(MONO_ARCH_SOFT_FLOAT)
+#if !defined(TARGET_X86)
/* Enabling this screws up the fp stack on x86 */
case STACK_R8:
#endif
+ if (mono_arch_is_soft_float ())
+ break;
+
/* Arguments are implicitly global */
/* Putting R4 vars into registers doesn't work currently */
/* The gsharedvt vars are implicitly referenced by ldaddr opcodes, but those opcodes are only generated later */
diff --git a/mono/mini/mini-amd64.c b/mono/mini/mini-amd64.c
index eb60841a81f..a82c21bb1b9 100644
--- a/mono/mini/mini-amd64.c
+++ b/mono/mini/mini-amd64.c
@@ -30,6 +30,7 @@
#include <mono/utils/mono-mmap.h>
#include <mono/utils/mono-memory-model.h>
#include <mono/utils/mono-tls.h>
+#include <mono/utils/mono-hwcap-x86.h>
#include "trace.h"
#include "ir-emit.h"
@@ -1003,7 +1004,7 @@ get_call_info (MonoGenericSharingContext *gsctx, MonoMemPool *mp, MonoMethodSign
case MONO_TYPE_VALUETYPE: {
guint32 tmp_gr = 0, tmp_fr = 0, tmp_stacksize = 0;
- add_valuetype (gsctx, sig, &cinfo->ret, sig->ret, TRUE, &tmp_gr, &tmp_fr, &tmp_stacksize);
+ add_valuetype (gsctx, sig, &cinfo->ret, ret_type, TRUE, &tmp_gr, &tmp_fr, &tmp_stacksize);
if (cinfo->ret.storage == ArgOnStack) {
cinfo->vtype_retaddr = TRUE;
/* The caller passes the address where the value is stored */
@@ -1019,7 +1020,7 @@ get_call_info (MonoGenericSharingContext *gsctx, MonoMemPool *mp, MonoMethodSign
case MONO_TYPE_VOID:
break;
default:
- g_error ("Can't handle as return value 0x%x", sig->ret->type);
+ g_error ("Can't handle as return value 0x%x", ret_type->type);
}
}
@@ -1203,15 +1204,17 @@ mono_arch_get_argument_info (MonoGenericSharingContext *gsctx, MonoMethodSignatu
}
gboolean
-mono_amd64_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig)
+mono_arch_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig)
{
CallInfo *c1, *c2;
gboolean res;
+ MonoType *callee_ret;
c1 = get_call_info (NULL, NULL, caller_sig);
c2 = get_call_info (NULL, NULL, callee_sig);
res = c1->stack_usage >= c2->stack_usage;
- if (callee_sig->ret && MONO_TYPE_ISSTRUCT (callee_sig->ret) && c2->ret.storage != ArgValuetypeInReg)
+ callee_ret = callee_sig->ret;
+ if (callee_ret && MONO_TYPE_ISSTRUCT (callee_ret) && c2->ret.storage != ArgValuetypeInReg)
/* An address on the callee's stack is passed as the first argument */
res = FALSE;
@@ -1221,28 +1224,6 @@ mono_amd64_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSigna
return res;
}
-static int
-cpuid (int id, int* p_eax, int* p_ebx, int* p_ecx, int* p_edx)
-{
-#if defined(MONO_CROSS_COMPILE)
- return 0;
-#else
-#ifndef _MSC_VER
- __asm__ __volatile__ ("cpuid"
- : "=a" (*p_eax), "=b" (*p_ebx), "=c" (*p_ecx), "=d" (*p_edx)
- : "a" (id));
-#else
- int info[4];
- __cpuid(info, id);
- *p_eax = info[0];
- *p_ebx = info[1];
- *p_ecx = info[2];
- *p_edx = info[3];
-#endif
- return 1;
-#endif
-}
-
/*
* Initialize the cpu to execute managed code.
*/
@@ -1325,20 +1306,19 @@ mono_arch_cleanup (void)
guint32
mono_arch_cpu_optimizations (guint32 *exclude_mask)
{
- int eax, ebx, ecx, edx;
guint32 opts = 0;
*exclude_mask = 0;
- /* Feature Flags function, flags returned in EDX. */
- if (cpuid (1, &eax, &ebx, &ecx, &edx)) {
- if (edx & (1 << 15)) {
- opts |= MONO_OPT_CMOV;
- if (edx & 1)
- opts |= MONO_OPT_FCMOV;
- else
- *exclude_mask |= MONO_OPT_FCMOV;
- } else
- *exclude_mask |= MONO_OPT_CMOV;
+
+ if (mono_hwcap_x86_has_cmov) {
+ opts |= MONO_OPT_CMOV;
+
+ if (mono_hwcap_x86_has_fcmov)
+ opts |= MONO_OPT_FCMOV;
+ else
+ *exclude_mask |= MONO_OPT_FCMOV;
+ } else {
+ *exclude_mask |= MONO_OPT_CMOV;
}
return opts;
@@ -1353,37 +1333,30 @@ mono_arch_cpu_optimizations (guint32 *exclude_mask)
guint32
mono_arch_cpu_enumerate_simd_versions (void)
{
- int eax, ebx, ecx, edx;
guint32 sse_opts = 0;
- if (cpuid (1, &eax, &ebx, &ecx, &edx)) {
- if (edx & (1 << 25))
- sse_opts |= SIMD_VERSION_SSE1;
- if (edx & (1 << 26))
- sse_opts |= SIMD_VERSION_SSE2;
- if (ecx & (1 << 0))
- sse_opts |= SIMD_VERSION_SSE3;
- if (ecx & (1 << 9))
- sse_opts |= SIMD_VERSION_SSSE3;
- if (ecx & (1 << 19))
- sse_opts |= SIMD_VERSION_SSE41;
- if (ecx & (1 << 20))
- sse_opts |= SIMD_VERSION_SSE42;
- }
-
- /* Yes, all this needs to be done to check for sse4a.
- See: "Amd: CPUID Specification"
- */
- if (cpuid (0x80000000, &eax, &ebx, &ecx, &edx)) {
- /* eax greater or equal than 0x80000001, ebx = 'htuA', ecx = DMAc', edx = 'itne'*/
- if ((((unsigned int) eax) >= 0x80000001) && (ebx == 0x68747541) && (ecx == 0x444D4163) && (edx == 0x69746E65)) {
- cpuid (0x80000001, &eax, &ebx, &ecx, &edx);
- if (ecx & (1 << 6))
- sse_opts |= SIMD_VERSION_SSE4a;
- }
- }
+ if (mono_hwcap_x86_has_sse1)
+ sse_opts |= SIMD_VERSION_SSE1;
+
+ if (mono_hwcap_x86_has_sse2)
+ sse_opts |= SIMD_VERSION_SSE2;
+
+ if (mono_hwcap_x86_has_sse3)
+ sse_opts |= SIMD_VERSION_SSE3;
+
+ if (mono_hwcap_x86_has_ssse3)
+ sse_opts |= SIMD_VERSION_SSSE3;
- return sse_opts;
+ if (mono_hwcap_x86_has_sse41)
+ sse_opts |= SIMD_VERSION_SSE41;
+
+ if (mono_hwcap_x86_has_sse42)
+ sse_opts |= SIMD_VERSION_SSE42;
+
+ if (mono_hwcap_x86_has_sse4a)
+ sse_opts |= SIMD_VERSION_SSE4a;
+
+ return sse_opts;
}
#ifndef DISABLE_JIT
@@ -1637,6 +1610,7 @@ mono_arch_regalloc_cost (MonoCompile *cfg, MonoMethodVar *vmv)
void
mono_arch_fill_argument_info (MonoCompile *cfg)
{
+ MonoType *sig_ret;
MonoMethodSignature *sig;
MonoMethodHeader *header;
MonoInst *ins;
@@ -1648,19 +1622,19 @@ mono_arch_fill_argument_info (MonoCompile *cfg)
sig = mono_method_signature (cfg->method);
cinfo = cfg->arch.cinfo;
-
+ sig_ret = sig->ret;
/*
* Contrary to mono_arch_allocate_vars (), the information should describe
* where the arguments are at the beginning of the method, not where they can be
* accessed during the execution of the method. The later makes no sense for the
* global register allocator, since a variable can be in more than one location.
*/
- if (sig->ret->type != MONO_TYPE_VOID) {
+ if (sig_ret->type != MONO_TYPE_VOID) {
switch (cinfo->ret.storage) {
case ArgInIReg:
case ArgInFloatSSEReg:
case ArgInDoubleSSEReg:
- if ((MONO_TYPE_ISSTRUCT (sig->ret) && !mono_class_from_mono_type (sig->ret)->enumtype) || ((sig->ret->type == MONO_TYPE_TYPEDBYREF) && cinfo->vtype_retaddr)) {
+ if ((MONO_TYPE_ISSTRUCT (sig_ret) && !mono_class_from_mono_type (sig_ret)->enumtype) || ((sig_ret->type == MONO_TYPE_TYPEDBYREF) && cinfo->vtype_retaddr)) {
cfg->vret_addr->opcode = OP_REGVAR;
cfg->vret_addr->inst_c0 = cinfo->ret.reg;
}
@@ -1715,6 +1689,7 @@ mono_arch_fill_argument_info (MonoCompile *cfg)
void
mono_arch_allocate_vars (MonoCompile *cfg)
{
+ MonoType *sig_ret;
MonoMethodSignature *sig;
MonoMethodHeader *header;
MonoInst *ins;
@@ -1728,6 +1703,7 @@ mono_arch_allocate_vars (MonoCompile *cfg)
sig = mono_method_signature (cfg->method);
cinfo = cfg->arch.cinfo;
+ sig_ret = sig->ret;
mono_arch_compute_omit_fp (cfg);
@@ -1769,12 +1745,12 @@ mono_arch_allocate_vars (MonoCompile *cfg)
}
}
- if (sig->ret->type != MONO_TYPE_VOID) {
+ if (sig_ret->type != MONO_TYPE_VOID) {
switch (cinfo->ret.storage) {
case ArgInIReg:
case ArgInFloatSSEReg:
case ArgInDoubleSSEReg:
- if ((MONO_TYPE_ISSTRUCT (sig->ret) && !mono_class_from_mono_type (sig->ret)->enumtype) || ((sig->ret->type == MONO_TYPE_TYPEDBYREF) && cinfo->vtype_retaddr)) {
+ if ((MONO_TYPE_ISSTRUCT (sig_ret) && !mono_class_from_mono_type (sig_ret)->enumtype) || ((sig_ret->type == MONO_TYPE_TYPEDBYREF) && cinfo->vtype_retaddr)) {
if (cfg->globalra) {
cfg->vret_addr->opcode = OP_REGVAR;
cfg->vret_addr->inst_c0 = cinfo->ret.reg;
@@ -2165,10 +2141,10 @@ mono_arch_get_llvm_call_info (MonoCompile *cfg, MonoMethodSignature *sig)
ArgInfo *ainfo;
int j;
LLVMCallInfo *linfo;
- MonoType *t;
+ MonoType *t, *sig_ret;
n = sig->param_count + sig->hasthis;
-
+ sig_ret = sig->ret;
cinfo = get_call_info (cfg->generic_sharing_context, cfg->mempool, sig);
linfo = mono_mempool_alloc0 (cfg->mempool, sizeof (LLVMCallInfo) + (sizeof (LLVMArgInfo) * n));
@@ -2191,7 +2167,7 @@ mono_arch_get_llvm_call_info (MonoCompile *cfg, MonoMethodSignature *sig)
linfo->ret.pair_storage [j] = arg_storage_to_llvm_arg_storage (cfg, cinfo->ret.pair_storage [j]);
}
- if (MONO_TYPE_ISSTRUCT (sig->ret) && cinfo->ret.storage == ArgInIReg) {
+ if (MONO_TYPE_ISSTRUCT (sig_ret) && cinfo->ret.storage == ArgInIReg) {
/* Vtype returned using a hidden argument */
linfo->ret.storage = LLVMArgVtypeRetAddr;
linfo->vret_arg_index = cinfo->vret_arg_index;
@@ -2255,6 +2231,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
{
MonoInst *arg, *in;
MonoMethodSignature *sig;
+ MonoType *sig_ret;
int i, n, stack_size;
CallInfo *cinfo;
ArgInfo *ainfo;
@@ -2266,6 +2243,8 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
cinfo = get_call_info (cfg->generic_sharing_context, cfg->mempool, sig);
+ sig_ret = sig->ret;
+
if (COMPILE_LLVM (cfg)) {
/* We shouldn't be called in the llvm case */
cfg->disable_llvm = TRUE;
@@ -2423,7 +2402,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
if (!sig->pinvoke && (sig->call_convention == MONO_CALL_VARARG) && (n == sig->sentinelpos))
emit_sig_cookie (cfg, call, cinfo);
- if (sig->ret && MONO_TYPE_ISSTRUCT (sig->ret)) {
+ if (sig_ret && MONO_TYPE_ISSTRUCT (sig_ret)) {
MonoInst *vtarg;
if (cinfo->ret.storage == ArgValuetypeInReg) {
@@ -2468,7 +2447,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
}
#ifdef HOST_WIN32
- if (call->inst.opcode != OP_JMP && OP_TAILCALL != call->inst.opcode) {
+ if (call->inst.opcode != OP_TAILCALL) {
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_SUB_IMM, X86_ESP, X86_ESP, 0x20);
}
#endif
@@ -2523,6 +2502,7 @@ mono_arch_emit_outarg_vt (MonoCompile *cfg, MonoInst *ins, MonoInst *src)
g_assert (!cfg->arch.no_pushes);
MONO_INST_NEW (cfg, load, OP_LDADDR);
+ cfg->has_indirection = TRUE;
load->inst_p0 = vtaddr;
vtaddr->flags |= MONO_INST_INDIRECT;
load->type = STACK_MP;
@@ -2862,8 +2842,9 @@ mono_arch_finish_dyn_call (MonoDynCallInfo *info, guint8 *buf)
MonoMethodSignature *sig = dinfo->sig;
guint8 *ret = ((DynCallArgs*)buf)->ret;
mgreg_t res = ((DynCallArgs*)buf)->res;
+ MonoType *sig_ret = mono_type_get_underlying_type (sig->ret);
- switch (mono_type_get_underlying_type (sig->ret)->type) {
+ switch (sig_ret->type) {
case MONO_TYPE_VOID:
*(gpointer*)ret = NULL;
break;
@@ -2904,7 +2885,7 @@ mono_arch_finish_dyn_call (MonoDynCallInfo *info, guint8 *buf)
*(guint64*)ret = res;
break;
case MONO_TYPE_GENERICINST:
- if (MONO_TYPE_IS_REFERENCE (sig->ret)) {
+ if (MONO_TYPE_IS_REFERENCE (sig_ret)) {
*(gpointer*)ret = GREG_TO_PTR(res);
break;
} else {
@@ -3666,6 +3647,39 @@ mono_amd64_emit_tls_get (guint8* code, int dreg, int tls_offset)
return code;
}
+static guint8*
+emit_tls_get_reg (guint8* code, int dreg, int offset_reg)
+{
+#ifdef TARGET_OSX
+ // FIXME: tls_gs_offset can change too, do these when calculating the tls offset
+ if (dreg != offset_reg)
+ amd64_mov_reg_reg (code, dreg, offset_reg, sizeof (gpointer));
+ amd64_shift_reg_imm (code, X86_SHL, dreg, 3);
+ if (tls_gs_offset)
+ amd64_alu_reg_imm (code, X86_ADD, dreg, tls_gs_offset);
+ x86_prefix (code, X86_GS_PREFIX);
+ amd64_mov_reg_membase (code, dreg, dreg, 0, sizeof (gpointer));
+#elif defined(__linux__)
+ int tmpreg = -1;
+
+ if (dreg == offset_reg) {
+ /* Use a temporary reg by saving it to the redzone */
+ tmpreg = dreg == AMD64_RAX ? AMD64_RCX : AMD64_RAX;
+ amd64_mov_membase_reg (code, AMD64_RSP, -8, tmpreg, 8);
+ amd64_mov_reg_reg (code, tmpreg, offset_reg, sizeof (gpointer));
+ offset_reg = tmpreg;
+ }
+ x86_prefix (code, X86_FS_PREFIX);
+ amd64_mov_reg_mem (code, dreg, 0, 8);
+ amd64_mov_reg_memindex (code, dreg, dreg, 0, offset_reg, 0, 8);
+ if (tmpreg != -1)
+ amd64_mov_reg_membase (code, tmpreg, AMD64_RSP, -8, 8);
+#else
+ g_assert_not_reached ();
+#endif
+ return code;
+}
+
/*
* emit_setup_lmf:
*
@@ -5593,18 +5607,8 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
break;
}
case OP_TLS_GET_REG:
-#ifdef TARGET_OSX
- // FIXME: tls_gs_offset can change too, do these when calculating the tls offset
- if (ins->dreg != ins->sreg1)
- amd64_mov_reg_reg (code, ins->dreg, ins->sreg1, sizeof (gpointer));
- amd64_shift_reg_imm (code, X86_SHL, ins->dreg, 3);
- if (tls_gs_offset)
- amd64_alu_reg_imm (code, X86_ADD, ins->dreg, tls_gs_offset);
- x86_prefix (code, X86_GS_PREFIX);
- amd64_mov_reg_membase (code, ins->dreg, ins->dreg, 0, sizeof (gpointer));
-#else
- g_assert_not_reached ();
-#endif
+ code = emit_tls_get_reg (code, ins->dreg, ins->sreg1);
+ break;
break;
case OP_MEMORY_BARRIER: {
switch (ins->backend.memory_barrier_kind) {
@@ -5742,7 +5746,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
case OP_CARD_TABLE_WBARRIER: {
int ptr = ins->sreg1;
int value = ins->sreg2;
- guchar *br;
+ guchar *br = 0;
int nursery_shift, card_table_shift;
gpointer card_table_mask;
size_t nursery_size;
@@ -5807,6 +5811,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
amd64_alu_reg_membase (code, X86_ADD, AMD64_RDX, AMD64_RIP, 0);
amd64_mov_membase_imm (code, AMD64_RDX, 0, 1, 1);
+
if (mono_gc_card_table_nursery_check ())
x86_patch (br, code);
break;
@@ -6492,8 +6497,6 @@ mono_arch_patch_code (MonoMethod *method, MonoDomain *domain, guint8 *code, Mono
unsigned char *ip = patch_info->ip.i + code;
unsigned char *target;
- target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors);
-
if (compile_aot) {
switch (patch_info->type) {
case MONO_PATCH_INFO_BB:
@@ -6505,6 +6508,8 @@ mono_arch_patch_code (MonoMethod *method, MonoDomain *domain, guint8 *code, Mono
}
}
+ target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors);
+
switch (patch_info->type) {
case MONO_PATCH_INFO_NONE:
continue;
@@ -7169,7 +7174,7 @@ mono_arch_emit_epilog (MonoCompile *cfg)
if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
code = mono_arch_instrument_epilog (cfg, mono_trace_leave_method, code, TRUE);
- /* the code restoring the registers must be kept in sync with OP_JMP */
+ /* the code restoring the registers must be kept in sync with OP_TAILCALL */
pos = 0;
if (method->save_lmf) {
@@ -7956,13 +7961,16 @@ mono_arch_get_delegate_invoke_impls (void)
guint8 *code;
guint32 code_len;
int i;
+ char *tramp_name;
code = get_delegate_invoke_impl (TRUE, 0, &code_len);
- res = g_slist_prepend (res, mono_tramp_info_create (g_strdup ("delegate_invoke_impl_has_target"), code, code_len, NULL, NULL));
+ res = g_slist_prepend (res, mono_tramp_info_create ("delegate_invoke_impl_has_target", code, code_len, NULL, NULL));
for (i = 0; i < MAX_ARCH_DELEGATE_PARAMS; ++i) {
code = get_delegate_invoke_impl (FALSE, i, &code_len);
- res = g_slist_prepend (res, mono_tramp_info_create (g_strdup_printf ("delegate_invoke_impl_target_%d", i), code, code_len, NULL, NULL));
+ tramp_name = g_strdup_printf ("delegate_invoke_impl_target_%d", i);
+ res = g_slist_prepend (res, mono_tramp_info_create (tramp_name, code, code_len, NULL, NULL));
+ g_free (tramp_name);
}
return res;
@@ -8384,12 +8392,7 @@ mono_arch_context_get_int_reg (MonoContext *ctx, int reg)
case AMD64_RBP: return ctx->rbp;
case AMD64_RSP: return ctx->rsp;
default:
- if (reg < 8)
- return _CTX_REG (ctx, rax, reg);
- else if (reg >= 12)
- return _CTX_REG (ctx, r12, reg - 12);
- else
- g_assert_not_reached ();
+ return _CTX_REG (ctx, rax, reg);
}
}
@@ -8413,12 +8416,7 @@ mono_arch_context_set_int_reg (MonoContext *ctx, int reg, mgreg_t val)
ctx->rsp = val;
break;
default:
- if (reg < 8)
- _CTX_REG (ctx, rax, reg) = val;
- else if (reg >= 12)
- _CTX_REG (ctx, r12, reg - 12) = val;
- else
- g_assert_not_reached ();
+ _CTX_REG (ctx, rax, reg) = val;
}
}
diff --git a/mono/mini/mini-amd64.h b/mono/mini/mini-amd64.h
index fd84eab3798..d58b8e6ddae 100644
--- a/mono/mini/mini-amd64.h
+++ b/mono/mini/mini-amd64.h
@@ -396,16 +396,12 @@ typedef struct MonoCompileArch {
#define MONO_ARCH_HAVE_CONTEXT_SET_INT_REG 1
#define MONO_ARCH_HAVE_SETUP_ASYNC_CALLBACK 1
#define MONO_ARCH_HAVE_CREATE_LLVM_NATIVE_THUNK 1
+#define MONO_ARCH_HAVE_OP_TAIL_CALL 1
-#ifdef TARGET_OSX
+#if defined(TARGET_OSX) || defined(__linux__)
#define MONO_ARCH_HAVE_TLS_GET_REG 1
#endif
-gboolean
-mono_amd64_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig) MONO_INTERNAL;
-
-#define MONO_ARCH_USE_OP_TAIL_CALL(caller_sig, callee_sig) mono_amd64_tail_call_supported (caller_sig, callee_sig)
-
/* Used for optimization, not complete */
#define MONO_ARCH_IS_OP_MEMBASE(opcode) ((opcode) == OP_X86_PUSH_MEMBASE)
diff --git a/mono/mini/mini-arm.c b/mono/mini/mini-arm.c
index 00953df7245..8e69537f14d 100644
--- a/mono/mini/mini-arm.c
+++ b/mono/mini/mini-arm.c
@@ -12,13 +12,10 @@
#include "mini.h"
#include <string.h>
-#if !defined(__APPLE__) && !defined(PLATFORM_ANDROID)
-#include <sys/auxv.h>
-#endif
-
#include <mono/metadata/appdomain.h>
#include <mono/metadata/debug-helpers.h>
#include <mono/utils/mono-mmap.h>
+#include <mono/utils/mono-hwcap-arm.h>
#include "mini-arm.h"
#include "cpu-arm.h"
@@ -33,24 +30,16 @@
#error "ARM_FPU_NONE is defined while one of ARM_FPU_VFP/ARM_FPU_VFP_HARD is defined"
#endif
-#if defined(__ARM_EABI__) && defined(__linux__) && !defined(PLATFORM_ANDROID) && !defined(__native_client__)
-#define HAVE_AEABI_READ_TP 1
-#endif
-
-#ifdef ARM_FPU_VFP_HARD
-#define ARM_FPU_VFP 1
-#endif
-
-#ifdef ARM_FPU_VFP
-#define IS_VFP 1
+#if defined(MONO_ARCH_SOFT_FLOAT_FALLBACK)
+#define IS_SOFT_FLOAT (mono_arch_is_soft_float ())
+#define IS_VFP (!mono_arch_is_soft_float ())
#else
-#define IS_VFP 0
+#define IS_SOFT_FLOAT (FALSE)
+#define IS_VFP (TRUE)
#endif
-#ifdef MONO_ARCH_SOFT_FLOAT
-#define IS_SOFT_FLOAT 1
-#else
-#define IS_SOFT_FLOAT 0
+#if defined(__ARM_EABI__) && defined(__linux__) && !defined(PLATFORM_ANDROID) && !defined(__native_client__)
+#define HAVE_AEABI_READ_TP 1
#endif
#ifdef __native_client_codegen__
@@ -101,10 +90,6 @@ static gboolean thumb2_supported = FALSE;
*/
static gboolean eabi_supported = FALSE;
-/*
- * Whenever we are on arm/darwin aka the iphone.
- */
-static gboolean darwin = FALSE;
/*
* Whenever to use the iphone ABI extensions:
* http://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iPhoneOSABIReference/index.html
@@ -623,13 +608,16 @@ mono_arch_get_delegate_invoke_impls (void)
guint8 *code;
guint32 code_len;
int i;
+ char *tramp_name;
code = get_delegate_invoke_impl (TRUE, 0, &code_len);
- res = g_slist_prepend (res, mono_tramp_info_create (g_strdup ("delegate_invoke_impl_has_target"), code, code_len, NULL, NULL));
+ res = g_slist_prepend (res, mono_tramp_info_create ("delegate_invoke_impl_has_target", code, code_len, NULL, NULL));
for (i = 0; i <= MAX_ARCH_DELEGATE_PARAMS; ++i) {
code = get_delegate_invoke_impl (FALSE, i, &code_len);
- res = g_slist_prepend (res, mono_tramp_info_create (g_strdup_printf ("delegate_invoke_impl_target_%d", i), code, code_len, NULL, NULL));
+ tramp_name = g_strdup_printf ("delegate_invoke_impl_target_%d", i);
+ res = g_slist_prepend (res, mono_tramp_info_create (tramp_name, code, code_len, NULL, NULL));
+ g_free (tramp_name);
}
return res;
@@ -703,13 +691,10 @@ mono_arch_get_this_arg_from_call (mgreg_t *regs, guint8 *code)
void
mono_arch_cpu_init (void)
{
-#if defined(__ARM_EABI__)
- eabi_supported = TRUE;
-#endif
#if defined(__APPLE__)
- i8_align = 4;
+ i8_align = 4;
#else
- i8_align = __alignof__ (gint64);
+ i8_align = __alignof__ (gint64);
#endif
}
@@ -785,6 +770,8 @@ create_function_wrapper (gpointer function)
void
mono_arch_init (void)
{
+ const char *cpu_arch;
+
InitializeCriticalSection (&mini_arch_mutex);
#ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED
if (mini_get_debug_options ()->soft_breakpoints) {
@@ -806,13 +793,55 @@ mono_arch_init (void)
mono_aot_register_jit_icall ("mono_arm_start_gsharedvt_call", mono_arm_start_gsharedvt_call);
#endif
+#if defined(__ARM_EABI__)
+ eabi_supported = TRUE;
+#endif
+
#if defined(ARM_FPU_VFP_HARD)
arm_fpu = MONO_ARM_FPU_VFP_HARD;
-#elif defined(ARM_FPU_VFP)
+#else
arm_fpu = MONO_ARM_FPU_VFP;
+
+#if defined(ARM_FPU_NONE) && !defined(__APPLE__)
+ /* If we're compiling with a soft float fallback and it
+ turns out that no VFP unit is available, we need to
+ switch to soft float. We don't do this for iOS, since
+ iOS devices always have a VFP unit. */
+ if (!mono_hwcap_arm_has_vfp)
+ arm_fpu = MONO_ARM_FPU_NONE;
+#endif
+#endif
+
+ v5_supported = mono_hwcap_arm_is_v5;
+ v6_supported = mono_hwcap_arm_is_v6;
+ v7_supported = mono_hwcap_arm_is_v7;
+ v7s_supported = mono_hwcap_arm_is_v7s;
+
+#if defined(__APPLE__)
+ /* iOS is special-cased here because we don't yet
+ have a way to properly detect CPU features on it. */
+ thumb_supported = TRUE;
+ iphone_abi = TRUE;
#else
- arm_fpu = MONO_ARM_FPU_NONE;
+ thumb_supported = mono_hwcap_arm_has_thumb;
+ thumb2_supported = mono_hwcap_arm_has_thumb2;
#endif
+
+ /* Format: armv(5|6|7[s])[-thumb[2]] */
+ cpu_arch = g_getenv ("MONO_CPU_ARCH");
+
+ /* Do this here so it overrides any detection. */
+ if (cpu_arch) {
+ if (strncmp (cpu_arch, "armv", 4) == 0) {
+ v5_supported = cpu_arch [4] >= '5';
+ v6_supported = cpu_arch [4] >= '6';
+ v7_supported = cpu_arch [4] >= '7';
+ v7s_supported = strncmp (cpu_arch, "armv7s", 6) == 0;
+ }
+
+ thumb_supported = strstr (cpu_arch, "thumb") != NULL;
+ thumb2_supported = strstr (cpu_arch, "thumb2") != NULL;
+ }
}
/*
@@ -829,115 +858,9 @@ mono_arch_cleanup (void)
guint32
mono_arch_cpu_optimizations (guint32 *exclude_mask)
{
- guint32 opts = 0;
-
- /* Format: armv(5|6|7[s])[-thumb[2]] */
- const char *cpu_arch = getenv ("MONO_CPU_ARCH");
- if (cpu_arch != NULL) {
- if (strncmp (cpu_arch, "armv", 4) == 0) {
- v5_supported = cpu_arch [4] >= '5';
- v6_supported = cpu_arch [4] >= '6';
- v7_supported = cpu_arch [4] >= '7';
- v7s_supported = strncmp (cpu_arch, "armv7s", 6) == 0;
- }
- thumb_supported = strstr (cpu_arch, "thumb") != NULL;
- thumb2_supported = strstr (cpu_arch, "thumb2") != NULL;
- } else {
-#if __APPLE__
- thumb_supported = TRUE;
- v5_supported = TRUE;
- darwin = TRUE;
- iphone_abi = TRUE;
-#elif defined(PLATFORM_ANDROID)
- /* Android is awesome and doesn't make most of /proc (including
- * /proc/self/auxv) available to regular processes. So we use
- * /proc/cpuinfo instead.... */
- char buf [512];
- char *line;
- FILE *file = fopen ("/proc/cpuinfo", "r");
- if (file) {
- while ((line = fgets (buf, 512, file))) {
- if (strncmp (line, "Processor", 9) == 0) {
- char *ver = strstr (line, "(v");
- if (ver) {
- if (ver [2] >= '5')
- v5_supported = TRUE;
- if (ver [2] >= '6')
- v6_supported = TRUE;
- if (ver [2] >= '7')
- v7_supported = TRUE;
- /* TODO: Find a way to detect v7s. */
- }
- continue;
- }
- if (strncmp (line, "Features", 8) == 0) {
- /* TODO: Find a way to detect Thumb 2. */
- char *th = strstr (line, "thumb");
- if (th) {
- thumb_supported = TRUE;
- if (v5_supported)
- break;
- }
- continue;
- }
- }
-
- fclose (file);
- /*printf ("features: v5: %d, thumb: %d\n", v5_supported, thumb_supported);*/
- }
-#else
- /* This solution is neat because it uses the dynamic linker
- * instead of the kernel. Thus, it works in QEMU chroots. */
- unsigned long int hwcap;
- unsigned long int platform;
-
- if ((hwcap = getauxval(AT_HWCAP))) {
- /* We use hardcoded values to avoid depending on a
- * specific version of the hwcap.h header. */
-
- /* HWCAP_ARM_THUMB */
- if ((hwcap & 4) != 0)
- /* TODO: Find a way to detect Thumb 2. */
- thumb_supported = TRUE;
- }
-
- if ((platform = getauxval(AT_PLATFORM))) {
- /* Actually a pointer to the platform string. */
- const char *str = (const char *) platform;
-
- /* Possible CPU name values (from kernel sources):
- *
- * - v4
- * - v5
- * - v5t
- * - v6
- * - v7
- *
- * Value is suffixed with the endianness ('b' or 'l').
- * We only support little endian anyway.
- */
-
- if (str [1] >= '5')
- v5_supported = TRUE;
-
- if (str [1] >= '6')
- v6_supported = TRUE;
-
- if (str [1] >= '7')
- v7_supported = TRUE;
-
- /* TODO: Find a way to detect v7s. */
- }
-
- /*printf ("hwcap = %i, platform = %s\n", (int) hwcap, (const char *) platform);
- printf ("thumb = %i, thumb2 = %i, v5 = %i, v6 = %i, v7 = %i, v7s = %i\n",
- thumb_supported, thumb2_supported, v5_supported, v6_supported, v7_supported, v7s_supported);*/
-#endif
- }
-
/* no arm-specific optimizations yet */
*exclude_mask = 0;
- return opts;
+ return 0;
}
/*
@@ -973,6 +896,14 @@ mono_arch_opcode_needs_emulation (MonoCompile *cfg, int opcode)
return TRUE;
}
+#ifdef MONO_ARCH_SOFT_FLOAT_FALLBACK
+gboolean
+mono_arch_is_soft_float (void)
+{
+ return arm_fpu == MONO_ARM_FPU_NONE;
+}
+#endif
+
static gboolean
is_regsize_var (MonoGenericSharingContext *gsctx, MonoType *t) {
if (t->byref)
@@ -1052,7 +983,7 @@ mono_arch_get_global_int_regs (MonoCompile *cfg)
regs = g_list_prepend (regs, GUINT_TO_POINTER (ARMREG_V1));
regs = g_list_prepend (regs, GUINT_TO_POINTER (ARMREG_V2));
regs = g_list_prepend (regs, GUINT_TO_POINTER (ARMREG_V3));
- if (darwin)
+ if (iphone_abi)
/* V4=R7 is used as a frame pointer, but V7=R10 is preserved */
regs = g_list_prepend (regs, GUINT_TO_POINTER (ARMREG_V7));
else
@@ -4353,6 +4284,14 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
/* Load the value from the GOT */
ARM_LDR_REG_REG (code, ins->dreg, ARMREG_PC, ins->dreg);
break;
+ case OP_OBJC_GET_SELECTOR:
+ mono_add_patch_info (cfg, offset, MONO_PATCH_INFO_OBJC_SELECTOR_REF, ins->inst_p0);
+ ARM_LDR_IMM (code, ins->dreg, ARMREG_PC, 0);
+ ARM_B (code, 0);
+ *(gpointer*)code = NULL;
+ code += 4;
+ ARM_LDR_REG_REG (code, ins->dreg, ARMREG_PC, ins->dreg);
+ break;
case OP_ICONV_TO_I4:
case OP_ICONV_TO_U4:
case OP_MOVE:
@@ -4780,8 +4719,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
break;
/* floating point opcodes */
-#if defined(ARM_FPU_VFP)
-
case OP_R8CONST:
if (cfg->compile_aot) {
ARM_FLDD (code, ins->dreg, ARMREG_PC, 0);
@@ -4863,9 +4800,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
ARM_FMRRD (code, ARMREG_R0, ARMREG_R1, ins->sreg1);
}
break;
-
-#endif
-
case OP_FCONV_TO_I1:
code = emit_float_to_int (cfg, code, ins->dreg, ins->sreg1, 1, TRUE);
break;
@@ -4927,7 +4861,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
ARM_MOV_REG_REG (code, ins->dreg, ins->sreg1);
break;
}
-#if defined(ARM_FPU_VFP)
case OP_FADD:
ARM_VFP_ADDD (code, ins->dreg, ins->sreg1, ins->sreg2);
break;
@@ -4943,7 +4876,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
case OP_FNEG:
ARM_NEGD (code, ins->dreg, ins->sreg1);
break;
-#endif
case OP_FREM:
/* emulated */
g_assert_not_reached ();
@@ -5146,7 +5078,6 @@ mono_arch_patch_code (MonoMethod *method, MonoDomain *domain, guint8 *code, Mono
jt [i] = code + (int)patch_info->data.table->table [i];
continue;
}
- target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors);
if (compile_aot) {
switch (patch_info->type) {
@@ -5159,6 +5090,8 @@ mono_arch_patch_code (MonoMethod *method, MonoDomain *domain, guint8 *code, Mono
}
}
+ target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors);
+
switch (patch_info->type) {
case MONO_PATCH_INFO_IP:
g_assert_not_reached ();
@@ -5258,7 +5191,6 @@ mono_arch_emit_prolog (MonoCompile *cfg)
* the frame, so we keep using our own frame pointer.
* FIXME: Optimize this.
*/
- g_assert (darwin);
ARM_PUSH (code, (1 << ARMREG_R7) | (1 << ARMREG_LR));
ARM_MOV_REG_REG (code, ARMREG_R7, ARMREG_SP);
prev_sp_offset += 8; /* r7 and lr */
@@ -5759,30 +5691,6 @@ mono_arch_emit_epilog (MonoCompile *cfg)
}
-/* remove once throw_exception_by_name is eliminated */
-static int
-exception_id_by_name (const char *name)
-{
- if (strcmp (name, "IndexOutOfRangeException") == 0)
- return MONO_EXC_INDEX_OUT_OF_RANGE;
- if (strcmp (name, "OverflowException") == 0)
- return MONO_EXC_OVERFLOW;
- if (strcmp (name, "ArithmeticException") == 0)
- return MONO_EXC_ARITHMETIC;
- if (strcmp (name, "DivideByZeroException") == 0)
- return MONO_EXC_DIVIDE_BY_ZERO;
- if (strcmp (name, "InvalidCastException") == 0)
- return MONO_EXC_INVALID_CAST;
- if (strcmp (name, "NullReferenceException") == 0)
- return MONO_EXC_NULL_REF;
- if (strcmp (name, "ArrayTypeMismatchException") == 0)
- return MONO_EXC_ARRAY_TYPE_MISMATCH;
- if (strcmp (name, "ArgumentException") == 0)
- return MONO_EXC_ARGUMENT;
- g_error ("Unknown intrinsic exception %s\n", name);
- return -1;
-}
-
void
mono_arch_emit_exceptions (MonoCompile *cfg)
{
@@ -5805,7 +5713,7 @@ mono_arch_emit_exceptions (MonoCompile *cfg)
*/
for (patch_info = cfg->patch_info; patch_info; patch_info = patch_info->next) {
if (patch_info->type == MONO_PATCH_INFO_EXC) {
- i = exception_id_by_name (patch_info->data.target);
+ i = mini_exception_id_by_name (patch_info->data.target);
if (!exc_throw_found [i]) {
max_epilog_size += 32;
exc_throw_found [i] = TRUE;
@@ -5828,7 +5736,7 @@ mono_arch_emit_exceptions (MonoCompile *cfg)
MonoClass *exc_class;
unsigned char *ip = patch_info->ip.i + cfg->native_code;
- i = exception_id_by_name (patch_info->data.target);
+ i = mini_exception_id_by_name (patch_info->data.target);
if (exc_throw_pos [i]) {
arm_patch (ip, exc_throw_pos [i]);
patch_info->type = MONO_PATCH_INFO_NONE;
@@ -5904,12 +5812,16 @@ mono_arch_print_tree (MonoInst *tree, int arity)
return 0;
}
+#ifndef DISABLE_JIT
+
MonoInst*
mono_arch_get_domain_intrinsic (MonoCompile* cfg)
{
return mono_get_domain_intrinsic (cfg);
}
+#endif
+
guint32
mono_arch_get_patch_offset (guint8 *code)
{
@@ -6651,23 +6563,29 @@ mono_arch_set_target (char *mtriple)
{
/* The GNU target triple format is not very well documented */
if (strstr (mtriple, "armv7")) {
+ v5_supported = TRUE;
v6_supported = TRUE;
v7_supported = TRUE;
}
if (strstr (mtriple, "armv6")) {
+ v5_supported = TRUE;
v6_supported = TRUE;
}
if (strstr (mtriple, "armv7s")) {
v7s_supported = TRUE;
}
if (strstr (mtriple, "thumbv7s")) {
+ v5_supported = TRUE;
+ v6_supported = TRUE;
+ v7_supported = TRUE;
v7s_supported = TRUE;
+ thumb_supported = TRUE;
thumb2_supported = TRUE;
}
if (strstr (mtriple, "darwin") || strstr (mtriple, "ios")) {
v5_supported = TRUE;
+ v6_supported = TRUE;
thumb_supported = TRUE;
- darwin = TRUE;
iphone_abi = TRUE;
}
if (strstr (mtriple, "gnueabi"))
diff --git a/mono/mini/mini-arm.h b/mono/mini/mini-arm.h
index 86859aaf37b..93a256b5632 100644
--- a/mono/mini/mini-arm.h
+++ b/mono/mini/mini-arm.h
@@ -15,8 +15,8 @@
#define kNaClLengthOfCallImm 4
#endif
-#if defined(ARM_FPU_NONE) || (defined(__ARM_EABI__) && !defined(ARM_FPU_VFP) && !defined(ARM_FPU_VFP_HARD))
-#define MONO_ARCH_SOFT_FLOAT 1
+#if defined(ARM_FPU_NONE)
+#define MONO_ARCH_SOFT_FLOAT_FALLBACK 1
#endif
#ifdef ARM_FPU_VFP_HARD
@@ -36,9 +36,9 @@
#if defined(ARM_FPU_VFP)
#define ARM_FP_MODEL "vfp"
#elif defined(ARM_FPU_NONE)
-#define ARM_FP_MODEL "soft-float"
+#define ARM_FP_MODEL "vfp+fallback"
#elif defined(ARM_FPU_VFP_HARD)
-#define ARM_FP_MODEL "vfp(hardfp-abi)"
+#define ARM_FP_MODEL "vfp+hard"
#else
#error "At least one of ARM_FPU_NONE, ARM_FPU_VFP or ARM_FPU_VFP_HARD must be defined."
#endif
@@ -71,12 +71,8 @@
#define MONO_ARCH_CALLEE_REGS ((1<<ARMREG_R0) | (1<<ARMREG_R1) | (1<<ARMREG_R2) | (1<<ARMREG_R3) | (1<<ARMREG_IP))
#define MONO_ARCH_CALLEE_SAVED_REGS ((1<<ARMREG_V1) | (1<<ARMREG_V2) | (1<<ARMREG_V3) | (1<<ARMREG_V4) | (1<<ARMREG_V5) | (1<<ARMREG_V6) | (1<<ARMREG_V7))
-#if defined(ARM_FPU_VFP) || defined(ARM_FPU_VFP_HARD)
/* Every double precision vfp register, d0/d1 is reserved for a scratch reg */
#define MONO_ARCH_CALLEE_FREGS 0x55555550
-#else
-#define MONO_ARCH_CALLEE_FREGS 0xf
-#endif
#define MONO_ARCH_CALLEE_SAVED_FREGS 0
#define MONO_ARCH_USE_FPSTACK FALSE
@@ -84,16 +80,22 @@
#define MONO_ARCH_INST_SREG2_MASK(ins) (0)
-#ifdef MONO_ARCH_SOFT_FLOAT
-#define MONO_ARCH_INST_FIXED_REG(desc) (((desc) == 'l' || (desc == 'f') || (desc == 'g')) ? ARM_LSW_REG: (((desc) == 'a') ? ARMREG_R0 : -1))
-#define MONO_ARCH_INST_IS_REGPAIR(desc) ((desc) == 'l' || (desc) == 'L' || (desc) == 'f' || (desc) == 'g')
-#define MONO_ARCH_INST_IS_FLOAT(desc) (FALSE)
-#else
-#define MONO_ARCH_INST_FIXED_REG(desc) (((desc) == 'l')? ARM_LSW_REG: (((desc) == 'a') ? ARMREG_R0 : -1))
-#define MONO_ARCH_INST_IS_REGPAIR(desc) (desc == 'l' || desc == 'L')
-#define MONO_ARCH_INST_IS_FLOAT(desc) ((desc == 'f') || (desc == 'g'))
-#endif
-#define MONO_ARCH_INST_REGPAIR_REG2(desc,hreg1) (desc == 'l' || (desc == 'f') || (desc == 'g')? ARM_MSW_REG : -1)
+#define MONO_ARCH_INST_FIXED_REG(desc) \
+ (mono_arch_is_soft_float () ? \
+ ((desc) == 'l' || (desc) == 'f' || (desc) == 'g' ? ARM_LSW_REG : (desc) == 'a' ? ARMREG_R0 : -1) : \
+ ((desc) == 'l' ? ARM_LSW_REG : (desc) == 'a' ? ARMREG_R0 : -1))
+
+#define MONO_ARCH_INST_IS_REGPAIR(desc) \
+ (mono_arch_is_soft_float () ? \
+ ((desc) == 'l' || (desc) == 'L' || (desc) == 'f' || (desc) == 'g') : \
+ ((desc) == 'l' || (desc) == 'L'))
+
+#define MONO_ARCH_INST_IS_FLOAT(desc) \
+ (mono_arch_is_soft_float () ? \
+ (FALSE) : \
+ ((desc) == 'f' || (desc) == 'g'))
+
+#define MONO_ARCH_INST_REGPAIR_REG2(desc,hreg1) ((desc) == 'l' || (desc) == 'f' || (desc) == 'g' ? ARM_MSW_REG : -1)
#define MONO_ARCH_FRAME_ALIGNMENT 8
@@ -229,6 +231,7 @@ typedef struct MonoCompileArch {
#define MONO_ARCH_GSHAREDVT_SUPPORTED 1
#define MONO_ARCH_HAVE_GENERAL_RGCTX_LAZY_FETCH_TRAMPOLINE 1
#define MONO_ARCH_HAVE_OPCODE_NEEDS_EMULATION 1
+#define MONO_ARCH_HAVE_OBJC_GET_SELECTOR 1
#if defined(__native_client__)
#undef MONO_ARCH_SOFT_DEBUG_SUPPORTED
diff --git a/mono/mini/mini-codegen.c b/mono/mini/mini-codegen.c
index 83057869f3a..e82c07974ef 100644
--- a/mono/mini/mini-codegen.c
+++ b/mono/mini/mini-codegen.c
@@ -409,7 +409,7 @@ typedef struct {
regmask_t preferred_mask; /* the hreg where the register should be allocated, or 0 */
} RegTrack;
-#ifndef DISABLE_LOGGING
+#if !defined(DISABLE_LOGGING) && !defined(DISABLE_JIT)
static const char* const patch_info_str[] = {
#define PATCH_INFO(a,b) "" #a,
@@ -716,7 +716,7 @@ void
mono_print_ins_index (int i, MonoInst *ins)
{
}
-#endif /* DISABLE_LOGGING */
+#endif /* !defined(DISABLE_LOGGING) && !defined(DISABLE_JIT) */
void
mono_print_ins (MonoInst *ins)
@@ -1790,7 +1790,7 @@ mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb)
continue;
s = regmask (j);
- if ((clob_mask & s) && !(rs->free_mask [cur_bank] & s) && (j != ins->sreg1)) {
+ if ((clob_mask & s) && !(rs->free_mask [cur_bank] & s)) {
if (j != dreg)
free_up_hreg (cfg, bb, tmp, ins, j, cur_bank);
else if (rs->symbolic [cur_bank] [j])
@@ -2697,4 +2697,27 @@ mono_peephole_ins (MonoBasicBlock *bb, MonoInst *ins)
}
}
+int
+mini_exception_id_by_name (const char *name)
+{
+ if (strcmp (name, "IndexOutOfRangeException") == 0)
+ return MONO_EXC_INDEX_OUT_OF_RANGE;
+ if (strcmp (name, "OverflowException") == 0)
+ return MONO_EXC_OVERFLOW;
+ if (strcmp (name, "ArithmeticException") == 0)
+ return MONO_EXC_ARITHMETIC;
+ if (strcmp (name, "DivideByZeroException") == 0)
+ return MONO_EXC_DIVIDE_BY_ZERO;
+ if (strcmp (name, "InvalidCastException") == 0)
+ return MONO_EXC_INVALID_CAST;
+ if (strcmp (name, "NullReferenceException") == 0)
+ return MONO_EXC_NULL_REF;
+ if (strcmp (name, "ArrayTypeMismatchException") == 0)
+ return MONO_EXC_ARRAY_TYPE_MISMATCH;
+ if (strcmp (name, "ArgumentException") == 0)
+ return MONO_EXC_ARGUMENT;
+ g_error ("Unknown intrinsic exception %s\n", name);
+ return -1;
+}
+
#endif /* DISABLE_JIT */
diff --git a/mono/mini/mini-exceptions.c b/mono/mini/mini-exceptions.c
index 21b48d04205..3438f2d9086 100644
--- a/mono/mini/mini-exceptions.c
+++ b/mono/mini/mini-exceptions.c
@@ -87,25 +87,13 @@ mono_exceptions_init (void)
MonoTrampInfo *info;
restore_context_func = mono_arch_get_restore_context (&info, FALSE);
- if (info) {
- mono_save_trampoline_xdebug_info (info);
- mono_tramp_info_free (info);
- }
+ mono_tramp_info_register (info);
call_filter_func = mono_arch_get_call_filter (&info, FALSE);
- if (info) {
- mono_save_trampoline_xdebug_info (info);
- mono_tramp_info_free (info);
- }
+ mono_tramp_info_register (info);
throw_exception_func = mono_arch_get_throw_exception (&info, FALSE);
- if (info) {
- mono_save_trampoline_xdebug_info (info);
- mono_tramp_info_free (info);
- }
+ mono_tramp_info_register (info);
rethrow_exception_func = mono_arch_get_rethrow_exception (&info, FALSE);
- if (info) {
- mono_save_trampoline_xdebug_info (info);
- mono_tramp_info_free (info);
- }
+ mono_tramp_info_register (info);
}
#ifdef MONO_ARCH_HAVE_RESTORE_STACK_SUPPORT
try_more_restore_tramp = mono_create_specific_trampoline (try_more_restore, MONO_TRAMPOLINE_RESTORE_STACK_PROT, mono_domain_get (), NULL);
@@ -166,10 +154,7 @@ mono_get_throw_corlib_exception (void)
code = mono_aot_get_trampoline ("throw_corlib_exception");
else {
code = mono_arch_get_throw_corlib_exception (&info, FALSE);
- if (info) {
- mono_save_trampoline_xdebug_info (info);
- mono_tramp_info_free (info);
- }
+ mono_tramp_info_register (info);
}
mono_memory_barrier ();
@@ -244,7 +229,7 @@ find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, MonoJitInfo *res, Mo
return frame.ji;
else {
memset (res, 0, sizeof (MonoJitInfo));
- res->method = frame.method;
+ res->d.method = frame.method;
return res;
}
case FRAME_TYPE_DEBUGGER_INVOKE: {
@@ -281,6 +266,7 @@ mono_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, MonoJitInfo *re
gboolean managed2;
gpointer ip = MONO_CONTEXT_GET_IP (ctx);
MonoJitInfo *ji;
+ MonoMethod *method = NULL;
if (trace)
*trace = NULL;
@@ -296,7 +282,10 @@ mono_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, MonoJitInfo *re
if (ji == (gpointer)-1)
return ji;
- if (managed2 || (ji && ji->method->wrapper_type)) {
+ if (ji)
+ method = jinfo_get_method (ji);
+
+ if (managed2 || (ji && method->wrapper_type)) {
const char *real_ip, *start;
gint32 offset;
@@ -316,14 +305,14 @@ mono_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, MonoJitInfo *re
*native_offset = offset;
if (managed)
- if (!ji->method->wrapper_type || ji->method->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD)
+ if (!method->wrapper_type || method->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD)
*managed = TRUE;
if (trace)
- *trace = mono_debug_print_stack_frame (ji->method, offset, domain);
+ *trace = mono_debug_print_stack_frame (method, offset, domain);
} else {
if (trace) {
- char *fname = mono_method_full_name (res->method, TRUE);
+ char *fname = mono_method_full_name (jinfo_get_method (res), TRUE);
*trace = g_strdup_printf ("in (unmanaged) %s", fname);
g_free (fname);
}
@@ -345,6 +334,8 @@ mono_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, MonoJitInfo *re
* On return, it will be filled with the locations where callee saved registers are saved
* by the current frame. This is returned outside of StackFrameInfo because it can be
* quite large on some platforms.
+ * If ASYNC true, this function will be async safe, but some fields of frame and frame->ji will
+ * not be set.
*/
gboolean
mono_find_jit_info_ext (MonoDomain *domain, MonoJitTlsData *jit_tls,
@@ -357,6 +348,8 @@ mono_find_jit_info_ext (MonoDomain *domain, MonoJitTlsData *jit_tls,
gpointer ip = MONO_CONTEXT_GET_IP (ctx);
MonoJitInfo *ji;
MonoDomain *target_domain = domain;
+ MonoMethod *method = NULL;
+ gboolean async = mono_thread_info_is_async_context ();
if (trace)
*trace = NULL;
@@ -377,8 +370,11 @@ mono_find_jit_info_ext (MonoDomain *domain, MonoJitTlsData *jit_tls,
if (!err)
return FALSE;
- if (frame->type == FRAME_TYPE_MANAGED) {
- if (!frame->ji->method->wrapper_type || frame->ji->method->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD)
+ if (frame->ji && !frame->ji->async)
+ method = jinfo_get_method (frame->ji);
+
+ if (frame->type == FRAME_TYPE_MANAGED && method) {
+ if (!method->wrapper_type || method->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD)
frame->managed = TRUE;
}
@@ -393,13 +389,14 @@ mono_find_jit_info_ext (MonoDomain *domain, MonoJitTlsData *jit_tls,
frame->native_offset = -1;
frame->domain = target_domain;
+ frame->async_context = async;
ji = frame->ji;
if (frame->type == FRAME_TYPE_MANAGED)
- frame->method = ji->method;
+ frame->method = method;
- if (ji && (frame->managed || ji->method->wrapper_type)) {
+ if (ji && (frame->managed || (method && method->wrapper_type))) {
const char *real_ip, *start;
start = (const char *)ji->code_start;
@@ -415,7 +412,7 @@ mono_find_jit_info_ext (MonoDomain *domain, MonoJitTlsData *jit_tls,
frame->native_offset = -1;
if (trace)
- *trace = mono_debug_print_stack_frame (ji->method, frame->native_offset, domain);
+ *trace = mono_debug_print_stack_frame (method, frame->native_offset, domain);
} else {
if (trace && frame->method) {
char *fname = mono_method_full_name (frame->method, TRUE);
@@ -431,6 +428,7 @@ static gpointer
get_generic_info_from_stack_frame (MonoJitInfo *ji, MonoContext *ctx)
{
MonoGenericJitInfo *gi;
+ MonoMethod *method;
gpointer info;
if (!ji->has_generic_jit_info)
@@ -469,9 +467,10 @@ get_generic_info_from_stack_frame (MonoJitInfo *ji, MonoContext *ctx)
gi->this_offset);
}
- if (mono_method_get_context (ji->method)->method_inst) {
+ method = jinfo_get_method (ji);
+ if (mono_method_get_context (method)->method_inst) {
return info;
- } else if ((ji->method->flags & METHOD_ATTRIBUTE_STATIC) || ji->method->klass->valuetype) {
+ } else if ((method->flags & METHOD_ATTRIBUTE_STATIC) || method->klass->valuetype) {
return info;
} else {
/* Avoid returning a managed object */
@@ -486,17 +485,19 @@ get_generic_context_from_stack_frame (MonoJitInfo *ji, gpointer generic_info)
{
MonoGenericContext context = { NULL, NULL };
MonoClass *class, *method_container_class;
+ MonoMethod *method;
g_assert (generic_info);
- g_assert (ji->method->is_inflated);
- if (mono_method_get_context (ji->method)->method_inst) {
+ method = jinfo_get_method (ji);
+ g_assert (method->is_inflated);
+ if (mono_method_get_context (method)->method_inst) {
MonoMethodRuntimeGenericContext *mrgctx = generic_info;
class = mrgctx->class_vtable->klass;
context.method_inst = mrgctx->method_inst;
g_assert (context.method_inst);
- } else if ((ji->method->flags & METHOD_ATTRIBUTE_STATIC) || ji->method->klass->valuetype) {
+ } else if ((method->flags & METHOD_ATTRIBUTE_STATIC) || method->klass->valuetype) {
MonoVTable *vtable = generic_info;
class = vtable->klass;
@@ -504,14 +505,14 @@ get_generic_context_from_stack_frame (MonoJitInfo *ji, gpointer generic_info)
class = generic_info;
}
- //g_assert (!ji->method->klass->generic_container);
- if (ji->method->klass->generic_class)
- method_container_class = ji->method->klass->generic_class->container_class;
+ //g_assert (!method->klass->generic_container);
+ if (method->klass->generic_class)
+ method_container_class = method->klass->generic_class->container_class;
else
- method_container_class = ji->method->klass;
+ method_container_class = method->klass;
- /* class might refer to a subclass of ji->method's class */
- while (!(class == ji->method->klass || (class->generic_class && class->generic_class->container_class == method_container_class))) {
+ /* class might refer to a subclass of method's class */
+ while (!(class == method->klass || (class->generic_class && class->generic_class->container_class == method_container_class))) {
class = class->parent;
g_assert (class);
}
@@ -534,10 +535,11 @@ get_method_from_stack_frame (MonoJitInfo *ji, gpointer generic_info)
MonoMethod *method;
if (!ji->has_generic_jit_info || !mono_jit_info_get_generic_jit_info (ji)->has_this)
- return ji->method;
+ return jinfo_get_method (ji);
context = get_generic_context_from_stack_frame (ji, generic_info);
- method = mono_method_get_declaring_generic_method (ji->method);
+ method = jinfo_get_method (ji);
+ method = mono_method_get_declaring_generic_method (method);
method = mono_class_inflate_generic_method (method, &context);
return method;
@@ -663,7 +665,7 @@ ves_icall_get_trace (MonoException *exc, gint32 skip, MonoBoolean need_file_info
g_assert (ji != NULL);
method = get_method_from_stack_frame (ji, generic_info);
- if (ji->method->wrapper_type) {
+ if (jinfo_get_method (ji)->wrapper_type) {
char *s;
sf->method = NULL;
@@ -680,7 +682,7 @@ ves_icall_get_trace (MonoException *exc, gint32 skip, MonoBoolean need_file_info
* and the IL offset. Note that computing the IL offset is already an expensive
* operation, so we shouldn't call this method twice.
*/
- location = mono_debug_lookup_source_location (ji->method, sf->native_offset, domain);
+ location = mono_debug_lookup_source_location (jinfo_get_method (ji), sf->native_offset, domain);
if (location)
sf->il_offset = location->il_offset;
else
@@ -761,6 +763,7 @@ mono_walk_stack_with_state (MonoJitStackWalk func, MonoThreadUnwindState *state,
{
MonoThreadUnwindState extra_state;
if (!state) {
+ g_assert (!mono_thread_info_is_async_context ());
if (!mono_thread_state_init_from_current (&extra_state))
return;
state = &extra_state;
@@ -810,6 +813,7 @@ mono_walk_stack_full (MonoJitStackWalk func, MonoContext *start_ctx, MonoDomain
mgreg_t *reg_locations [MONO_MAX_IREGS];
mgreg_t *new_reg_locations [MONO_MAX_IREGS];
gboolean get_reg_locations = unwind_options & MONO_UNWIND_REG_LOCATIONS;
+ gboolean async = mono_thread_info_is_async_context ();
g_assert (start_ctx);
g_assert (domain);
@@ -817,6 +821,9 @@ mono_walk_stack_full (MonoJitStackWalk func, MonoContext *start_ctx, MonoDomain
/*The LMF will be null if the target have no managed frames.*/
/* g_assert (lmf); */
+ if (async)
+ g_assert (unwind_options == MONO_UNWIND_NONE);
+
memcpy (&ctx, start_ctx, sizeof (MonoContext));
memset (reg_locations, 0, sizeof (reg_locations));
@@ -829,7 +836,7 @@ mono_walk_stack_full (MonoJitStackWalk func, MonoContext *start_ctx, MonoDomain
if ((unwind_options & MONO_UNWIND_LOOKUP_IL_OFFSET) && frame.ji) {
MonoDebugSourceLocation *source;
- source = mono_debug_lookup_source_location (frame.ji->method, frame.native_offset, domain);
+ source = mono_debug_lookup_source_location (jinfo_get_method (frame.ji), frame.native_offset, domain);
il_offset = source ? source->il_offset : -1;
mono_debug_free_source_location (source);
} else
@@ -871,7 +878,7 @@ ves_icall_get_frame_info (gint32 skip, MonoBoolean need_file_info,
MonoJitInfo *ji = NULL;
MonoContext ctx, new_ctx;
MonoDebugSourceLocation *location;
- MonoMethod *actual_method;
+ MonoMethod *jmethod = NULL, *actual_method;
StackFrameInfo frame;
gboolean res;
@@ -899,7 +906,8 @@ ves_icall_get_frame_info (gint32 skip, MonoBoolean need_file_info,
*native_offset = frame.native_offset;
/* The skip count passed by the caller depends on us not filtering out MANAGED_TO_NATIVE */
- if (ji->method->wrapper_type != MONO_WRAPPER_NONE && ji->method->wrapper_type != MONO_WRAPPER_DYNAMIC_METHOD && ji->method->wrapper_type != MONO_WRAPPER_MANAGED_TO_NATIVE)
+ jmethod = jinfo_get_method (ji);
+ if (jmethod->wrapper_type != MONO_WRAPPER_NONE && jmethod->wrapper_type != MONO_WRAPPER_DYNAMIC_METHOD && jmethod->wrapper_type != MONO_WRAPPER_MANAGED_TO_NATIVE)
continue;
skip--;
} while (skip >= 0);
@@ -908,7 +916,7 @@ ves_icall_get_frame_info (gint32 skip, MonoBoolean need_file_info,
mono_gc_wbarrier_generic_store (method, (MonoObject*) mono_method_get_object (domain, actual_method, NULL));
- location = mono_debug_lookup_source_location (ji->method, *native_offset, domain);
+ location = mono_debug_lookup_source_location (jmethod, *native_offset, domain);
if (location)
*iloffset = location->il_offset;
else
@@ -940,16 +948,18 @@ callback_get_first_frame_security_info (StackFrameInfo *frame, MonoContext *ctx,
{
MonoFrameSecurityInfo *si = (MonoFrameSecurityInfo*) data;
MonoJitInfo *ji = frame->ji;
+ MonoMethod *method;
if (!ji)
return FALSE;
/* FIXME: skip all wrappers ?? probably not - case by case testing is required */
- if (ji->method->wrapper_type == MONO_WRAPPER_RUNTIME_INVOKE ||
- ji->method->wrapper_type == MONO_WRAPPER_XDOMAIN_INVOKE ||
- ji->method->wrapper_type == MONO_WRAPPER_XDOMAIN_DISPATCH ||
- ji->method->wrapper_type == MONO_WRAPPER_REMOTING_INVOKE_WITH_CHECK ||
- ji->method->wrapper_type == MONO_WRAPPER_REMOTING_INVOKE) {
+ method = jinfo_get_method (ji);
+ if (method->wrapper_type == MONO_WRAPPER_RUNTIME_INVOKE ||
+ method->wrapper_type == MONO_WRAPPER_XDOMAIN_INVOKE ||
+ method->wrapper_type == MONO_WRAPPER_XDOMAIN_DISPATCH ||
+ method->wrapper_type == MONO_WRAPPER_REMOTING_INVOKE_WITH_CHECK ||
+ method->wrapper_type == MONO_WRAPPER_REMOTING_INVOKE) {
return FALSE;
}
@@ -1014,16 +1024,18 @@ callback_get_stack_frames_security_info (StackFrameInfo *frame, MonoContext *ctx
{
MonoSecurityStack *ss = (MonoSecurityStack*) data;
MonoJitInfo *ji = frame->ji;
+ MonoMethod *method;
if (!ji)
return FALSE;
/* FIXME: skip all wrappers ?? probably not - case by case testing is required */
- if (ji->method->wrapper_type == MONO_WRAPPER_RUNTIME_INVOKE ||
- ji->method->wrapper_type == MONO_WRAPPER_XDOMAIN_INVOKE ||
- ji->method->wrapper_type == MONO_WRAPPER_XDOMAIN_DISPATCH ||
- ji->method->wrapper_type == MONO_WRAPPER_REMOTING_INVOKE_WITH_CHECK ||
- ji->method->wrapper_type == MONO_WRAPPER_REMOTING_INVOKE) {
+ method = jinfo_get_method (ji);
+ if (method->wrapper_type == MONO_WRAPPER_RUNTIME_INVOKE ||
+ method->wrapper_type == MONO_WRAPPER_XDOMAIN_INVOKE ||
+ method->wrapper_type == MONO_WRAPPER_XDOMAIN_DISPATCH ||
+ method->wrapper_type == MONO_WRAPPER_REMOTING_INVOKE_WITH_CHECK ||
+ method->wrapper_type == MONO_WRAPPER_REMOTING_INVOKE) {
return FALSE;
}
@@ -1149,6 +1161,9 @@ mini_jit_info_table_find (MonoDomain *domain, char *addr, MonoDomain **out_domai
}
}
+ if (!t)
+ return NULL;
+
refs = (t->appdomain_refs) ? *(gpointer *) t->appdomain_refs : NULL;
for (; refs && *refs; refs++) {
if (*refs != domain && *refs != mono_get_root_domain ()) {
@@ -1292,6 +1307,7 @@ mono_handle_exception_internal_first_pass (MonoContext *ctx, gpointer obj, gint3
MonoException *mono_ex;
gboolean stack_overflow = FALSE;
MonoContext initial_ctx;
+ MonoMethod *method;
int frame_count = 0;
gboolean has_dynamic_methods = FALSE;
gint32 filter_idx;
@@ -1355,15 +1371,16 @@ mono_handle_exception_internal_first_pass (MonoContext *ctx, gpointer obj, gint3
}
frame_count ++;
- //printf ("M: %s %d.\n", mono_method_full_name (ji->method, TRUE), frame_count);
+ method = jinfo_get_method (ji);
+ //printf ("M: %s %d.\n", mono_method_full_name (method, TRUE), frame_count);
- if (mini_get_debug_options ()->reverse_pinvoke_exceptions && ji->method->wrapper_type == MONO_WRAPPER_NATIVE_TO_MANAGED) {
+ if (mini_get_debug_options ()->reverse_pinvoke_exceptions && method->wrapper_type == MONO_WRAPPER_NATIVE_TO_MANAGED) {
g_error ("A native frame was found while unwinding the stack after an exception.\n"
"The native frame called the managed method:\n%s\n",
- mono_method_full_name (ji->method, TRUE));
+ mono_method_full_name (method, TRUE));
}
- if (ji->method->wrapper_type != MONO_WRAPPER_RUNTIME_INVOKE && mono_ex) {
+ if (method->wrapper_type != MONO_WRAPPER_RUNTIME_INVOKE && mono_ex) {
/*
* Avoid overwriting the stack trace if the exception is
* rethrown. Also avoid giant stack traces during a stack
@@ -1376,7 +1393,7 @@ mono_handle_exception_internal_first_pass (MonoContext *ctx, gpointer obj, gint3
}
}
- if (ji->method->dynamic)
+ if (method->dynamic)
has_dynamic_methods = TRUE;
if (stack_overflow) {
@@ -1407,13 +1424,13 @@ mono_handle_exception_internal_first_pass (MonoContext *ctx, gpointer obj, gint3
* Have to unwrap RuntimeWrappedExceptions if the
* method's assembly doesn't have a RuntimeCompatibilityAttribute.
*/
- if (non_exception && !wrap_non_exception_throws (ji->method))
+ if (non_exception && !wrap_non_exception_throws (method))
ex_obj = non_exception;
else
ex_obj = obj;
if (ei->flags == MONO_EXCEPTION_CLAUSE_FILTER) {
- gboolean is_user_frame = ji->method->wrapper_type == MONO_WRAPPER_NONE || ji->method->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD;
+ gboolean is_user_frame = method->wrapper_type == MONO_WRAPPER_NONE || method->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD;
#ifndef DISABLE_PERFCOUNTERS
mono_perfcounters->exceptions_filters++;
#endif
@@ -1488,12 +1505,12 @@ mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gboolean resume,
MonoDomain *domain = mono_domain_get ();
MonoJitInfo *ji, *prev_ji;
static int (*call_filter) (MonoContext *, gpointer) = NULL;
- static void (*restore_context) (void *);
MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
MonoLMF *lmf = mono_get_lmf ();
MonoException *mono_ex;
gboolean stack_overflow = FALSE;
MonoContext initial_ctx;
+ MonoMethod *method;
int frame_count = 0;
gint32 filter_idx, first_filter_idx;
int i;
@@ -1558,9 +1575,6 @@ mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gboolean resume,
if (!call_filter)
call_filter = mono_get_call_filter ();
- if (!restore_context)
- restore_context = mono_get_restore_context ();
-
g_assert (jit_tls->end_of_stack);
g_assert (jit_tls->abort_func);
@@ -1627,10 +1641,10 @@ mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gboolean resume,
* FIXME: The check below is hackish, but its hard to distinguish these runtime invoke calls from others
* in the runtime.
*/
- if (ji && ji->method->wrapper_type == MONO_WRAPPER_RUNTIME_INVOKE) {
+ if (ji && jinfo_get_method (ji)->wrapper_type == MONO_WRAPPER_RUNTIME_INVOKE) {
if (prev_ji) {
MonoInternalThread *thread = mono_thread_internal_current ();
- if (prev_ji->method == thread->async_invoke_method)
+ if (jinfo_get_method (prev_ji) == thread->async_invoke_method)
unhandled = TRUE;
}
}
@@ -1681,8 +1695,9 @@ mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gboolean resume,
g_assert_not_reached ();
}
+ method = jinfo_get_method (ji);
frame_count ++;
- //printf ("M: %s %d.\n", mono_method_full_name (ji->method, TRUE), frame_count);
+ //printf ("M: %s %d.\n", mono_method_full_name (method, TRUE), frame_count);
if (stack_overflow) {
if (DOES_STACK_GROWS_UP)
@@ -1712,7 +1727,7 @@ mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gboolean resume,
* Have to unwrap RuntimeWrappedExceptions if the
* method's assembly doesn't have a RuntimeCompatibilityAttribute.
*/
- if (non_exception && !wrap_non_exception_throws (ji->method))
+ if (non_exception && !wrap_non_exception_throws (method))
ex_obj = non_exception;
else
ex_obj = obj;
@@ -1776,10 +1791,10 @@ mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gboolean resume,
}
}
- if (mono_trace_is_enabled () && mono_trace_eval (ji->method))
- g_print ("EXCEPTION: catch found at clause %d of %s\n", i, mono_method_full_name (ji->method, TRUE));
+ if (mono_trace_is_enabled () && mono_trace_eval (method))
+ g_print ("EXCEPTION: catch found at clause %d of %s\n", i, mono_method_full_name (method, TRUE));
jit_tls->orig_ex_ctx_set = TRUE;
- mono_profiler_exception_clause_handler (ji->method, ei->flags, i);
+ mono_profiler_exception_clause_handler (method, ei->flags, i);
jit_tls->orig_ex_ctx_set = FALSE;
mono_debugger_call_exception_handler (ei->handler_start, MONO_CONTEXT_GET_SP (ctx), ex_obj);
MONO_CONTEXT_SET_IP (ctx, ei->handler_start);
@@ -1794,20 +1809,20 @@ mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gboolean resume,
}
if (is_address_protected (ji, ei, MONO_CONTEXT_GET_IP (ctx)) &&
(ei->flags == MONO_EXCEPTION_CLAUSE_FAULT)) {
- if (mono_trace_is_enabled () && mono_trace_eval (ji->method))
- g_print ("EXCEPTION: fault clause %d of %s\n", i, mono_method_full_name (ji->method, TRUE));
+ if (mono_trace_is_enabled () && mono_trace_eval (method))
+ g_print ("EXCEPTION: fault clause %d of %s\n", i, mono_method_full_name (method, TRUE));
jit_tls->orig_ex_ctx_set = TRUE;
- mono_profiler_exception_clause_handler (ji->method, ei->flags, i);
+ mono_profiler_exception_clause_handler (method, ei->flags, i);
jit_tls->orig_ex_ctx_set = FALSE;
mono_debugger_call_exception_handler (ei->handler_start, MONO_CONTEXT_GET_SP (ctx), ex_obj);
call_filter (ctx, ei->handler_start);
}
if (is_address_protected (ji, ei, MONO_CONTEXT_GET_IP (ctx)) &&
(ei->flags == MONO_EXCEPTION_CLAUSE_FINALLY)) {
- if (mono_trace_is_enabled () && mono_trace_eval (ji->method))
- g_print ("EXCEPTION: finally clause %d of %s\n", i, mono_method_full_name (ji->method, TRUE));
+ if (mono_trace_is_enabled () && mono_trace_eval (method))
+ g_print ("EXCEPTION: finally clause %d of %s\n", i, mono_method_full_name (method, TRUE));
jit_tls->orig_ex_ctx_set = TRUE;
- mono_profiler_exception_clause_handler (ji->method, ei->flags, i);
+ mono_profiler_exception_clause_handler (method, ei->flags, i);
jit_tls->orig_ex_ctx_set = FALSE;
mono_debugger_call_exception_handler (ei->handler_start, MONO_CONTEXT_GET_SP (ctx), ex_obj);
#ifndef DISABLE_PERFCOUNTERS
@@ -1841,7 +1856,7 @@ mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gboolean resume,
}
jit_tls->orig_ex_ctx_set = TRUE;
- mono_profiler_exception_method_leave (ji->method);
+ mono_profiler_exception_method_leave (method);
jit_tls->orig_ex_ctx_set = FALSE;
*ctx = new_ctx;
@@ -1892,7 +1907,7 @@ mono_debugger_handle_exception (MonoContext *ctx, MonoObject *obj)
*/
ret = mono_handle_exception_internal_first_pass (&ctx_cp, obj, NULL, &ji, NULL, NULL);
- if (ret && (ji != NULL) && (ji->method->wrapper_type == MONO_WRAPPER_RUNTIME_INVOKE)) {
+ if (ret && (ji != NULL) && (jinfo_get_method (ji)->wrapper_type == MONO_WRAPPER_RUNTIME_INVOKE)) {
/*
* The exception is handled in a runtime-invoke wrapper, that means that it's unhandled
* inside the method being invoked, so we handle it like a user-unhandled exception.
@@ -2173,7 +2188,7 @@ print_overflow_stack_frame (StackFrameInfo *frame, MonoContext *ctx, gpointer da
gchar *location;
if (frame->ji)
- method = frame->ji->method;
+ method = jinfo_get_method (frame->ji);
if (method) {
if (user_data->count == 0) {
@@ -2222,8 +2237,8 @@ mono_handle_hard_stack_ovf (MonoJitTlsData *jit_tls, MonoJitInfo *ji, void *ctx,
mono_walk_stack_with_ctx (print_overflow_stack_frame, &mctx, MONO_UNWIND_LOOKUP_ACTUAL_METHOD, &ud);
#else
- if (ji && ji->method)
- mono_runtime_printf_err ("At %s", mono_method_full_name (ji->method, TRUE));
+ if (ji && jinfo_get_method (ji))
+ mono_runtime_printf_err ("At %s", mono_method_full_name (jinfo_get_method (ji), TRUE));
else
mono_runtime_printf_err ("At <unmanaged>.");
#endif
@@ -2235,8 +2250,9 @@ static gboolean
print_stack_frame_to_stderr (StackFrameInfo *frame, MonoContext *ctx, gpointer data)
{
MonoMethod *method = NULL;
+
if (frame->ji)
- method = frame->ji->method;
+ method = jinfo_get_method (frame->ji);
if (method) {
gchar *location = mono_debug_print_stack_frame (method, frame->native_offset, mono_domain_get ());
@@ -2253,8 +2269,9 @@ print_stack_frame_to_string (StackFrameInfo *frame, MonoContext *ctx, gpointer d
{
GString *p = (GString*)data;
MonoMethod *method = NULL;
+
if (frame->ji)
- method = frame->ji->method;
+ method = jinfo_get_method (frame->ji);
if (method) {
gchar *location = mono_debug_print_stack_frame (method, frame->native_offset, mono_domain_get ());
@@ -2460,7 +2477,6 @@ void
mono_resume_unwind (MonoContext *ctx)
{
MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
- static void (*restore_context) (MonoContext *);
MonoContext new_ctx;
MONO_CONTEXT_SET_IP (ctx, MONO_CONTEXT_GET_IP (&jit_tls->resume_state.ctx));
@@ -2469,10 +2485,7 @@ mono_resume_unwind (MonoContext *ctx)
mono_handle_exception_internal (&new_ctx, jit_tls->resume_state.ex_obj, TRUE, NULL);
- if (!restore_context)
- restore_context = mono_get_restore_context ();
-
- restore_context (&new_ctx);
+ mono_restore_context (&new_ctx);
}
#ifdef MONO_ARCH_HAVE_HANDLER_BLOCK_GUARD
@@ -2494,9 +2507,6 @@ find_last_handler_block (StackFrameInfo *frame, MonoContext *ctx, gpointer data)
if (!ji)
return FALSE;
- if (ji->method->wrapper_type)
- return FALSE;
-
ip = MONO_CONTEXT_GET_IP (ctx);
for (i = 0; i < ji->num_clauses; ++i) {
@@ -2565,7 +2575,10 @@ mono_install_handler_block_guard (MonoThreadUnwindState *ctx)
if (!jit_tls || jit_tls->handler_block_return_address)
return FALSE;
- mono_walk_stack_with_state (find_last_handler_block, ctx, MONO_UNWIND_SIGNAL_SAFE, &data);
+ /* Do an async safe stack walk */
+ mono_thread_info_set_is_async_context (TRUE);
+ mono_walk_stack_with_state (find_last_handler_block, ctx, MONO_UNWIND_NONE, &data);
+ mono_thread_info_set_is_async_context (FALSE);
if (!data.ji)
return FALSE;
@@ -2681,11 +2694,8 @@ mono_thread_state_init_from_current (MonoThreadUnwindState *ctx)
static void
mono_raise_exception_with_ctx (MonoException *exc, MonoContext *ctx)
{
- void (*restore_context) (MonoContext *);
- restore_context = mono_get_restore_context ();
-
mono_handle_exception (ctx, exc);
- restore_context (ctx);
+ mono_restore_context (ctx);
}
/*FIXME Move all monoctx -> sigctx conversion to signal handlers once all archs support utils/mono-context */
@@ -2744,3 +2754,20 @@ mono_invoke_unhandled_exception_hook (MonoObject *exc)
g_assert_not_reached ();
}
+
+/*
+ * mono_restore_context:
+ *
+ * Call the architecture specific restore context function.
+ */
+void
+mono_restore_context (MonoContext *ctx)
+{
+ static void (*restore_context) (MonoContext *);
+
+ if (!restore_context)
+ restore_context = mono_get_restore_context ();
+ restore_context (ctx);
+ g_assert_not_reached ();
+}
+
diff --git a/mono/mini/mini-gc.c b/mono/mini/mini-gc.c
index 0d439acc636..bc6a1aabb6c 100644..100755
--- a/mono/mini/mini-gc.c
+++ b/mono/mini/mini-gc.c
@@ -590,7 +590,6 @@ thread_suspend_func (gpointer user_data, void *sigctx, MonoContext *ctx)
if (!tls) {
/* Happens during startup */
- tls->unwind_state.valid = FALSE;
return;
}
@@ -599,7 +598,11 @@ thread_suspend_func (gpointer user_data, void *sigctx, MonoContext *ctx)
gboolean res;
g_assert (tls->info);
+#ifdef TARGET_WIN32
+ return;
+#else
res = mono_thread_state_init_from_handle (&tls->unwind_state, (MonoNativeThreadId)tls->tid, tls->info->native_handle);
+#endif
} else {
tls->unwind_state.unwind_data [MONO_UNWIND_DATA_LMF] = mono_get_lmf ();
if (sigctx) {
@@ -699,6 +702,7 @@ static void
conservative_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
{
MonoJitInfo *ji;
+ MonoMethod *method;
MonoContext ctx, new_ctx;
MonoLMF *lmf;
guint8 *stack_limit;
@@ -808,10 +812,15 @@ conservative_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
continue;
}
+ if (ji)
+ method = jinfo_get_method (ji);
+ else
+ method = NULL;
+
/* The last frame can be in any state so mark conservatively */
if (last) {
if (ji) {
- DEBUG (char *fname = mono_method_full_name (ji->method, TRUE); fprintf (logfile, "Mark(0): %s+0x%x (%p)\n", fname, pc_offset, (gpointer)MONO_CONTEXT_GET_IP (&ctx)); g_free (fname));
+ DEBUG (char *fname = mono_method_full_name (method, TRUE); fprintf (logfile, "Mark(0): %s+0x%x (%p)\n", fname, pc_offset, (gpointer)MONO_CONTEXT_GET_IP (&ctx)); g_free (fname));
}
DEBUG (fprintf (logfile, "\t <Last frame>\n"));
last = FALSE;
@@ -838,8 +847,8 @@ conservative_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
pc_offset = (guint8*)MONO_CONTEXT_GET_IP (&ctx) - (guint8*)ji->code_start;
/* These frames are very problematic */
- if (ji->method->wrapper_type == MONO_WRAPPER_MANAGED_TO_NATIVE) {
- DEBUG (char *fname = mono_method_full_name (ji->method, TRUE); fprintf (logfile, "Mark(0): %s+0x%x (%p)\n", fname, pc_offset, (gpointer)MONO_CONTEXT_GET_IP (&ctx)); g_free (fname));
+ if (method->wrapper_type == MONO_WRAPPER_MANAGED_TO_NATIVE) {
+ DEBUG (char *fname = mono_method_full_name (method, TRUE); fprintf (logfile, "Mark(0): %s+0x%x (%p)\n", fname, pc_offset, (gpointer)MONO_CONTEXT_GET_IP (&ctx)); g_free (fname));
DEBUG (fprintf (logfile, "\tSkip.\n"));
continue;
}
@@ -870,7 +879,7 @@ conservative_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
emap = ji->gc_info;
if (!emap) {
- DEBUG (char *fname = mono_method_full_name (ji->method, TRUE); fprintf (logfile, "Mark(0): %s+0x%x (%p)\n", fname, pc_offset, (gpointer)MONO_CONTEXT_GET_IP (&ctx)); g_free (fname));
+ DEBUG (char *fname = mono_method_full_name (jinfo_get_method (ji), TRUE); fprintf (logfile, "Mark(0): %s+0x%x (%p)\n", fname, pc_offset, (gpointer)MONO_CONTEXT_GET_IP (&ctx)); g_free (fname));
DEBUG (fprintf (logfile, "\tNo GC Map.\n"));
continue;
}
@@ -882,14 +891,14 @@ conservative_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
* Debugging aid to control the number of frames scanned precisely
*/
if (!precise_frame_limit_inited) {
- if (getenv ("MONO_PRECISE_COUNT"))
- precise_frame_limit = atoi (getenv ("MONO_PRECISE_COUNT"));
+ if (g_getenv ("MONO_PRECISE_COUNT"))
+ precise_frame_limit = atoi (g_getenv ("MONO_PRECISE_COUNT"));
precise_frame_limit_inited = TRUE;
}
if (precise_frame_limit != -1) {
if (precise_frame_count [FALSE] == precise_frame_limit)
- printf ("LAST PRECISE FRAME: %s\n", mono_method_full_name (ji->method, TRUE));
+ printf ("LAST PRECISE FRAME: %s\n", mono_method_full_name (method, TRUE));
if (precise_frame_count [FALSE] > precise_frame_limit)
continue;
}
@@ -910,7 +919,7 @@ conservative_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
frame_start = fp + map->start_offset + map->map_offset;
frame_end = fp + map->end_offset;
- DEBUG (char *fname = mono_method_full_name (ji->method, TRUE); fprintf (logfile, "Mark(0): %s+0x%x (%p) limit=%p fp=%p frame=%p-%p (%d)\n", fname, pc_offset, (gpointer)MONO_CONTEXT_GET_IP (&ctx), stack_limit, fp, frame_start, frame_end, (int)(frame_end - frame_start)); g_free (fname));
+ DEBUG (char *fname = mono_method_full_name (jinfo_get_method (ji), TRUE); fprintf (logfile, "Mark(0): %s+0x%x (%p) limit=%p fp=%p frame=%p-%p (%d)\n", fname, pc_offset, (gpointer)MONO_CONTEXT_GET_IP (&ctx), stack_limit, fp, frame_start, frame_end, (int)(frame_end - frame_start)); g_free (fname));
/* Find the callsite index */
if (map->callsite_entry_size == 1) {
@@ -932,7 +941,7 @@ conservative_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
break;
}
if (i == map->ncallsites) {
- printf ("Unable to find ip offset 0x%x in callsite list of %s.\n", pc_offset + 1, mono_method_full_name (ji->method, TRUE));
+ printf ("Unable to find ip offset 0x%x in callsite list of %s.\n", pc_offset + 1, mono_method_full_name (method, TRUE));
g_assert_not_reached ();
}
cindex = i;
@@ -1111,7 +1120,7 @@ precise_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
fi = &tls->frames [findex];
frame_start = stack_start + fi->frame_start_offset;
- DEBUG (char *fname = mono_method_full_name (fi->ji->method, TRUE); fprintf (logfile, "Mark(1): %s\n", fname); g_free (fname));
+ DEBUG (char *fname = mono_method_full_name (jinfo_get_method (fi->ji), TRUE); fprintf (logfile, "Mark(1): %s\n", fname); g_free (fname));
/*
* FIXME: Add a function to mark using a bitmap, to avoid doing a
@@ -1238,10 +1247,10 @@ mini_gc_init_gc_map (MonoCompile *cfg)
static int precise_count;
precise_count ++;
- if (getenv ("MONO_GCMAP_COUNT")) {
- if (precise_count == atoi (getenv ("MONO_GCMAP_COUNT")))
+ if (g_getenv ("MONO_GCMAP_COUNT")) {
+ if (precise_count == atoi (g_getenv ("MONO_GCMAP_COUNT")))
printf ("LAST: %s\n", mono_method_full_name (cfg->method, TRUE));
- if (precise_count > atoi (getenv ("MONO_GCMAP_COUNT")))
+ if (precise_count > atoi (g_getenv ("MONO_GCMAP_COUNT")))
return;
}
}
@@ -2440,9 +2449,9 @@ static void
parse_debug_options (void)
{
char **opts, **ptr;
- char *env;
+ const char *env;
- env = getenv ("MONO_GCMAP_DEBUG");
+ env = g_getenv ("MONO_GCMAP_DEBUG");
if (!env)
return;
diff --git a/mono/mini/mini-generic-sharing.c b/mono/mini/mini-generic-sharing.c
index f025ec723c9..acf729f66e4 100644
--- a/mono/mini/mini-generic-sharing.c
+++ b/mono/mini/mini-generic-sharing.c
@@ -1424,7 +1424,7 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
if (call_sig == mono_method_signature (method)) {
} else {
sig = mono_method_signature (method);
- gsig = mono_method_signature (callee_ji->method);
+ gsig = mono_method_signature (jinfo_get_method (callee_ji));
addr = mini_get_gsharedvt_wrapper (TRUE, callee_ji->code_start, sig, gsig, callee_gji->generic_sharing_context, -1, FALSE);
@@ -2125,6 +2125,8 @@ is_async_state_machine_class (MonoClass *klass)
static MonoClass *iclass;
static gboolean iclass_set;
+ return FALSE;
+
if (!iclass_set) {
iclass = mono_class_from_name (mono_defaults.corlib, "System.Runtime.CompilerServices", "IAsyncStateMachine");
mono_memory_barrier ();
@@ -2145,6 +2147,8 @@ is_async_method (MonoMethod *method)
static MonoClass *attr_class;
static gboolean attr_class_set;
+ return FALSE;
+
if (!attr_class_set) {
attr_class = mono_class_from_name (mono_defaults.corlib, "System.Runtime.CompilerServices", "AsyncStateMachineAttribute");
mono_memory_barrier ();
diff --git a/mono/mini/mini-ia64.c b/mono/mini/mini-ia64.c
index c45305e2668..113d4a1fcde 100644
--- a/mono/mini/mini-ia64.c
+++ b/mono/mini/mini-ia64.c
@@ -21,6 +21,7 @@
#include <mono/metadata/threads.h>
#include <mono/metadata/profiler-private.h>
#include <mono/utils/mono-math.h>
+#include <mono/utils/mono-hwcap-ia64.h>
#include "trace.h"
#include "mini-ia64.h"
diff --git a/mono/mini/mini-llvm-cpp.cpp b/mono/mini/mini-llvm-cpp.cpp
index a03e94fbebf..aa89217904b 100644
--- a/mono/mini/mini-llvm-cpp.cpp
+++ b/mono/mini/mini-llvm-cpp.cpp
@@ -67,6 +67,8 @@
using namespace llvm;
+#ifndef MONO_CROSS_COMPILE
+
class MonoJITMemoryManager : public JITMemoryManager
{
private:
@@ -234,6 +236,8 @@ MonoJITMemoryManager::endExceptionTable(const Function *F, unsigned char *TableS
{
}
+#endif /* !MONO_CROSS_COMPILE */
+
class MonoJITEventListener : public JITEventListener {
public:
@@ -273,7 +277,9 @@ public:
}
};
+#ifndef MONO_CROSS_COMPILE
static MonoJITMemoryManager *mono_mm;
+#endif
static MonoJITEventListener *mono_event_listener;
static FunctionPassManager *fpm;
@@ -394,7 +400,7 @@ static void
force_pass_linking (void)
{
// Make sure the rest is linked in, but never executed
- if (getenv ("FOO") != (char*)-1)
+ if (g_getenv ("FOO") != (char*)-1)
return;
// This is a subset of the passes in LinkAllPasses.h
@@ -518,6 +524,8 @@ force_pass_linking (void)
(void) llvm::createSinkingPass();
}
+#ifndef MONO_CROSS_COMPILE
+
LLVMExecutionEngineRef
mono_llvm_create_ee (LLVMModuleProviderRef MP, AllocCodeMemoryCb *alloc_cb, FunctionEmittedCb *emitted_cb, ExceptionTableCb *exception_cb, DlSymCb *dlsym_cb)
{
@@ -640,3 +648,35 @@ mono_llvm_dispose_ee (LLVMExecutionEngineRef ee)
delete fpm;
}
+
+#else
+
+LLVMExecutionEngineRef
+mono_llvm_create_ee (LLVMModuleProviderRef MP, AllocCodeMemoryCb *alloc_cb, FunctionEmittedCb *emitted_cb, ExceptionTableCb *exception_cb, DlSymCb *dlsym_cb)
+{
+ g_assert_not_reached ();
+ return NULL;
+}
+
+void
+mono_llvm_dispose_ee (LLVMExecutionEngineRef ee)
+{
+ g_assert_not_reached ();
+}
+
+/* Not linked in */
+void
+LLVMAddGlobalMapping(LLVMExecutionEngineRef EE, LLVMValueRef Global,
+ void* Addr)
+{
+ g_assert_not_reached ();
+}
+
+void*
+LLVMGetPointerToGlobal(LLVMExecutionEngineRef EE, LLVMValueRef Global)
+{
+ g_assert_not_reached ();
+ return NULL;
+}
+
+#endif /* !MONO_CROSS_COMPILE */
diff --git a/mono/mini/mini-llvm.c b/mono/mini/mini-llvm.c
index dcfaf366102..ce2e50d5369 100644
--- a/mono/mini/mini-llvm.c
+++ b/mono/mini/mini-llvm.c
@@ -217,7 +217,7 @@ get_vtype_size (MonoType *t)
size = mono_class_value_size (mono_class_from_mono_type (t), NULL);
- while (size < sizeof (gpointer) && mono_is_power_of_two (size) == -1)
+ while (size < 2 * sizeof (gpointer) && mono_is_power_of_two (size) == -1)
size ++;
return size;
@@ -934,12 +934,12 @@ convert_full (EmitContext *ctx, LLVMValueRef v, LLVMTypeRef dtype, gboolean is_u
if (LLVMGetTypeKind (stype) == LLVMPointerTypeKind)
return LLVMBuildPtrToInt (ctx->builder, v, dtype, "");
-#ifdef MONO_ARCH_SOFT_FLOAT
- if (stype == LLVMInt32Type () && dtype == LLVMFloatType ())
- return LLVMBuildBitCast (ctx->builder, v, dtype, "");
- if (stype == LLVMInt32Type () && dtype == LLVMDoubleType ())
- return LLVMBuildBitCast (ctx->builder, LLVMBuildZExt (ctx->builder, v, LLVMInt64Type (), ""), dtype, "");
-#endif
+ if (mono_arch_is_soft_float ()) {
+ if (stype == LLVMInt32Type () && dtype == LLVMFloatType ())
+ return LLVMBuildBitCast (ctx->builder, v, dtype, "");
+ if (stype == LLVMInt32Type () && dtype == LLVMDoubleType ())
+ return LLVMBuildBitCast (ctx->builder, LLVMBuildZExt (ctx->builder, v, LLVMInt64Type (), ""), dtype, "");
+ }
if (LLVMGetTypeKind (stype) == LLVMVectorTypeKind && LLVMGetTypeKind (dtype) == LLVMVectorTypeKind)
return LLVMBuildBitCast (ctx->builder, v, dtype, "");
@@ -1865,6 +1865,10 @@ process_call (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref,
LLVMAddGlobalMapping (ee, callee, target);
}
}
+
+ if (call->method && strstr (call->method->klass->name, "AsyncVoidMethodBuilder"))
+ /* LLVM miscompiles async methods */
+ LLVM_FAILURE (ctx, "#13734");
} else if (calli) {
} else {
MonoJitICallInfo *info = mono_find_jit_icall_by_addr (call->fptr);
@@ -4237,13 +4241,13 @@ mono_llvm_emit_method (MonoCompile *cfg)
static int count = 0;
count ++;
- if (getenv ("LLVM_COUNT")) {
- if (count == atoi (getenv ("LLVM_COUNT"))) {
+ if (g_getenv ("LLVM_COUNT")) {
+ if (count == atoi (g_getenv ("LLVM_COUNT"))) {
printf ("LAST: %s\n", mono_method_full_name (cfg->method, TRUE));
fflush (stdout);
last = TRUE;
}
- if (count > atoi (getenv ("LLVM_COUNT")))
+ if (count > atoi (g_getenv ("LLVM_COUNT")))
LLVM_FAILURE (ctx, "");
}
}
@@ -4334,19 +4338,6 @@ mono_llvm_emit_method (MonoCompile *cfg)
}
g_free (names);
- if (cfg->compile_aot) {
- LLVMValueRef md_args [16];
- LLVMValueRef md_node;
- int method_index;
-
- method_index = mono_aot_get_method_index (cfg->orig_method);
- md_args [0] = LLVMMDString (method_name, strlen (method_name));
- md_args [1] = LLVMConstInt (LLVMInt32Type (), method_index, FALSE);
- md_node = LLVMMDNode (md_args, 2);
- LLVMAddNamedMetadataOperand (module, "mono.function_indexes", md_node);
- //LLVMSetMetadata (method, md_kind, LLVMMDNode (&md_arg, 1));
- }
-
max_block_num = 0;
for (bb = cfg->bb_entry; bb; bb = bb->next_bb)
max_block_num = MAX (max_block_num, bb->block_num);
@@ -4521,6 +4512,19 @@ mono_llvm_emit_method (MonoCompile *cfg)
mark_as_used (module, method);
if (cfg->compile_aot) {
+ LLVMValueRef md_args [16];
+ LLVMValueRef md_node;
+ int method_index;
+
+ method_index = mono_aot_get_method_index (cfg->orig_method);
+ md_args [0] = LLVMMDString (method_name, strlen (method_name));
+ md_args [1] = LLVMConstInt (LLVMInt32Type (), method_index, FALSE);
+ md_node = LLVMMDNode (md_args, 2);
+ LLVMAddNamedMetadataOperand (module, "mono.function_indexes", md_node);
+ //LLVMSetMetadata (method, md_kind, LLVMMDNode (&md_arg, 1));
+ }
+
+ if (cfg->compile_aot) {
/* Don't generate native code, keep the LLVM IR */
if (cfg->compile_aot && cfg->verbose_level)
printf ("%s emitted as %s\n", mono_method_full_name (cfg->method, TRUE), method_name);
diff --git a/mono/mini/mini-llvm.h b/mono/mini/mini-llvm.h
index 53c524e7549..06494f9e14c 100644
--- a/mono/mini/mini-llvm.h
+++ b/mono/mini/mini-llvm.h
@@ -121,6 +121,15 @@ mono_llvm_load (const char* bpath)
llvm_lib = try_llvm_load (name, &err);
g_free (name);
}
+#ifdef __MACH__
+ if (!llvm_lib) {
+ char *newbase = g_path_get_dirname (base);
+ name = g_strdup_printf ("%s/Libraries", newbase);
+ err = NULL;
+ llvm_lib = try_llvm_load (name, &err);
+ g_free (name);
+ }
+#endif
g_free (base);
g_free (resolvedname);
}
diff --git a/mono/mini/mini-mips.c b/mono/mini/mini-mips.c
index 12d17c399a1..c219458d679 100644
--- a/mono/mini/mini-mips.c
+++ b/mono/mini/mini-mips.c
@@ -18,6 +18,7 @@
#include <mono/metadata/appdomain.h>
#include <mono/metadata/debug-helpers.h>
#include <mono/utils/mono-mmap.h>
+#include <mono/utils/mono-hwcap-mips.h>
#include <mono/arch/mips/mips-codegen.h>
@@ -31,7 +32,8 @@
#define ALWAYS_SAVE_RA 1 /* call-handler & switch currently clobber ra */
#define PROMOTE_R4_TO_R8 1 /* promote single values in registers to doubles */
-#define USE_MUL 1 /* use mul instead of mult/mflo for multiply */
+#define USE_MUL 0 /* use mul instead of mult/mflo for multiply
+ remember to update cpu-mips.md if you change this */
/* Emit a call sequence to 'v', using 'D' as a scratch register if necessary */
#define mips_call(c,D,v) do { \
@@ -596,13 +598,16 @@ mono_arch_get_delegate_invoke_impls (void)
guint8 *code;
guint32 code_len;
int i;
+ char *tramp_name;
code = get_delegate_invoke_impl (TRUE, 0, &code_len);
- res = g_slist_prepend (res, mono_tramp_info_create (g_strdup ("delegate_invoke_impl_has_target"), code, code_len, NULL, NULL));
+ res = g_slist_prepend (res, mono_tramp_info_create ("delegate_invoke_impl_has_target", code, code_len, NULL, NULL));
for (i = 0; i <= MAX_ARCH_DELEGATE_PARAMS; ++i) {
code = get_delegate_invoke_impl (FALSE, i, &code_len);
- res = g_slist_prepend (res, mono_tramp_info_create (g_strdup_printf ("delegate_invoke_impl_target_%d", i), code, code_len, NULL, NULL));
+ tramp_name = g_strdup_printf ("delegate_invoke_impl_target_%d", i);
+ res = g_slist_prepend (res, mono_tramp_info_create (tramp_name, code, code_len, NULL, NULL));
+ g_free (tramp_name);
}
return res;
diff --git a/mono/mini/mini-ops.h b/mono/mini/mini-ops.h
index a56f24bd6ec..7d1e64d6b0f 100644
--- a/mono/mini/mini-ops.h
+++ b/mono/mini/mini-ops.h
@@ -608,7 +608,10 @@ MINI_OP(OP_CARD_TABLE_WBARRIER, "card_table_wbarrier", NONE, IREG, IREG)
/* arch-dep tls access */
MINI_OP(OP_TLS_GET, "tls_get", IREG, NONE, NONE)
-MINI_OP(OP_TLS_GET_REG, "tls_get_reg", IREG, IREG, NONE)
+MINI_OP(OP_TLS_GET_REG, "tls_get_reg", IREG, IREG, NONE)
+/* inst_offset contains the TLS offset */
+MINI_OP(OP_TLS_SET, "tls_set", NONE, IREG, NONE)
+MINI_OP(OP_TLS_SET_REG, "tls_set_reg", NONE, IREG, IREG)
MINI_OP(OP_LOAD_GOTADDR, "load_gotaddr", IREG, NONE, NONE)
MINI_OP(OP_DUMMY_USE, "dummy_use", NONE, IREG, NONE)
@@ -1231,3 +1234,5 @@ MINI_OP(OP_MIPS_COND_EXC_INC, "mips_cond_exc_inc", NONE, IREG, IREG)
MINI_OP(OP_LLVM_OUTARG_VT, "llvm_outarg_vt", IREG, VREG, NONE)
#endif
+MINI_OP(OP_OBJC_GET_SELECTOR, "objc_get_selector", IREG, NONE, NONE)
+
diff --git a/mono/mini/mini-posix.c b/mono/mini/mini-posix.c
index d3e5c907294..67595770e96 100644
--- a/mono/mini/mini-posix.c
+++ b/mono/mini/mini-posix.c
@@ -54,6 +54,7 @@
#include <mono/utils/mono-logger-internal.h>
#include <mono/utils/mono-mmap.h>
#include <mono/utils/dtrace.h>
+#include <mono/utils/mono-signal-handler.h>
#include "mini.h"
#include <string.h>
@@ -192,8 +193,7 @@ SIG_HANDLER_SIGNATURE (mono_chain_signal)
return FALSE;
}
-static void
-SIG_HANDLER_SIGNATURE (sigabrt_signal_handler)
+SIG_HANDLER_FUNC (static, sigabrt_signal_handler)
{
MonoJitInfo *ji = NULL;
GET_CONTEXT;
@@ -207,8 +207,7 @@ SIG_HANDLER_SIGNATURE (sigabrt_signal_handler)
}
}
-static void
-SIG_HANDLER_SIGNATURE (sigusr1_signal_handler)
+SIG_HANDLER_FUNC (static, sigusr1_signal_handler)
{
gboolean running_managed;
MonoException *exc;
@@ -281,6 +280,7 @@ SIG_HANDLER_SIGNATURE (sigusr1_signal_handler)
mono_arch_handle_exception (ctx, exc);
}
+
#if defined(__i386__) || defined(__x86_64__)
#define FULL_STAT_PROFILER_BACKTRACE 1
#define CURRENT_FRAME_GET_BASE_POINTER(f) (* (gpointer*)(f))
@@ -298,8 +298,7 @@ SIG_HANDLER_SIGNATURE (sigusr1_signal_handler)
#if defined(__ia64__) || defined(__sparc__) || defined(sparc) || defined(__s390__) || defined(s390)
-static void
-SIG_HANDLER_SIGNATURE (sigprof_signal_handler)
+SIG_HANDLER_FUNC (static, sigprof_signal_handler)
{
if (mono_chain_signal (SIG_HANDLER_PARAMS))
return;
@@ -309,8 +308,7 @@ SIG_HANDLER_SIGNATURE (sigprof_signal_handler)
#else
-static void
-SIG_HANDLER_SIGNATURE (sigprof_signal_handler)
+SIG_HANDLER_FUNC (static, sigprof_signal_handler)
{
int call_chain_depth = mono_profiler_stat_get_call_chain_depth ();
MonoProfilerCallChainStrategy call_chain_strategy = mono_profiler_stat_get_call_chain_strategy ();
@@ -388,8 +386,7 @@ SIG_HANDLER_SIGNATURE (sigprof_signal_handler)
#endif
-static void
-SIG_HANDLER_SIGNATURE (sigquit_signal_handler)
+SIG_HANDLER_FUNC (static, sigquit_signal_handler)
{
gboolean res;
@@ -419,8 +416,7 @@ SIG_HANDLER_SIGNATURE (sigquit_signal_handler)
mono_chain_signal (SIG_HANDLER_PARAMS);
}
-static void
-SIG_HANDLER_SIGNATURE (sigusr2_signal_handler)
+SIG_HANDLER_FUNC (static, sigusr2_signal_handler)
{
gboolean enabled = mono_trace_is_enabled ();
@@ -672,24 +668,54 @@ void
mono_gdb_render_native_backtraces (pid_t crashed_pid)
{
const char *argv [9];
+ char template [] = "/tmp/mono-lldb-commands.XXXXXX";
char buf1 [128];
+ FILE *commands;
+ gboolean using_lldb = FALSE;
argv [0] = g_find_program_in_path ("gdb");
if (argv [0] == NULL) {
- return;
+ argv [0] = g_find_program_in_path ("lldb");
+ using_lldb = TRUE;
}
- argv [1] = "-ex";
- sprintf (buf1, "attach %ld", (long) crashed_pid);
- argv [2] = buf1;
- argv [3] = "--ex";
- argv [4] = "info threads";
- argv [5] = "--ex";
- argv [6] = "thread apply all bt";
- argv [7] = "--batch";
- argv [8] = 0;
+ if (argv [0] == NULL)
+ return;
+
+ if (using_lldb) {
+ if (mkstemp (template) == -1)
+ return;
+
+ commands = fopen (template, "w");
+
+ fprintf (commands, "process attach --pid %ld\n", (long) crashed_pid);
+ fprintf (commands, "script lldb.debugger.HandleCommand (\"thread list\")\n");
+ fprintf (commands, "script lldb.debugger.HandleCommand (\"thread backtrace all\")\n");
+ fprintf (commands, "detach\n");
+ fprintf (commands, "quit\n");
+
+ fflush (commands);
+ fclose (commands);
+
+ argv [1] = "--source";
+ argv [2] = template;
+ argv [3] = 0;
+ } else {
+ argv [1] = "-ex";
+ sprintf (buf1, "attach %ld", (long) crashed_pid);
+ argv [2] = buf1;
+ argv [3] = "--ex";
+ argv [4] = "info threads";
+ argv [5] = "--ex";
+ argv [6] = "thread apply all bt";
+ argv [7] = "--batch";
+ argv [8] = 0;
+ }
execv (argv [0], (char**)argv);
+
+ if (using_lldb)
+ unlink (template);
}
#endif
#endif /* __native_client__ */
diff --git a/mono/mini/mini-ppc.c b/mono/mini/mini-ppc.c
index 13ea174f78d..4405b9e9059 100644
--- a/mono/mini/mini-ppc.c
+++ b/mono/mini/mini-ppc.c
@@ -16,6 +16,7 @@
#include <mono/metadata/debug-helpers.h>
#include <mono/utils/mono-proclib.h>
#include <mono/utils/mono-mmap.h>
+#include <mono/utils/mono-hwcap-ppc.h>
#include "mini-ppc.h"
#ifdef TARGET_POWERPC64
@@ -442,13 +443,16 @@ mono_arch_get_delegate_invoke_impls (void)
guint8 *code;
guint32 code_len;
int i;
+ char *tramp_name;
code = get_delegate_invoke_impl (TRUE, 0, &code_len, TRUE);
- res = g_slist_prepend (res, mono_tramp_info_create (g_strdup ("delegate_invoke_impl_has_target"), code, code_len, NULL, NULL));
+ res = g_slist_prepend (res, mono_tramp_info_create ("delegate_invoke_impl_has_target", code, code_len, NULL, NULL));
for (i = 0; i < MAX_ARCH_DELEGATE_PARAMS; ++i) {
code = get_delegate_invoke_impl (FALSE, i, &code_len, TRUE);
- res = g_slist_prepend (res, mono_tramp_info_create (g_strdup_printf ("delegate_invoke_impl_target_%d", i), code, code_len, NULL, NULL));
+ tramp_name = g_strdup_printf ("delegate_invoke_impl_target_%d", i);
+ res = g_slist_prepend (res, mono_tramp_info_create (tramp_name, code, code_len, NULL, NULL));
+ g_free (tramp_name);
}
return res;
@@ -520,32 +524,6 @@ typedef struct {
long int value;
} AuxVec;
-#ifdef USE_ENVIRON_HACK
-static AuxVec*
-linux_find_auxv (int *count)
-{
- AuxVec *vec;
- int c = 0;
- char **result = __environ;
- /* Scan over the env vector looking for the ending NULL */
- for (; *result != NULL; ++result) {
- }
- /* Bump the pointer one more step, which should be the auxv. */
- ++result;
- vec = (AuxVec *)result;
- if (vec->type != 22 /*AT_IGNOREPPC*/) {
- *count = 0;
- return NULL;
- }
- while (vec->type != 0 /*AT_NULL*/) {
- vec++;
- c++;
- }
- *count = c;
- return (AuxVec *)result;
-}
-#endif
-
#define MAX_AUX_ENTRIES 128
/*
* PPC_FEATURE_POWER4, PPC_FEATURE_POWER5, PPC_FEATURE_POWER5_PLUS, PPC_FEATURE_CELL,
@@ -575,11 +553,12 @@ mono_arch_init (void)
#if defined(MONO_CROSS_COMPILE)
#elif defined(__APPLE__)
int mib [3];
- size_t len;
+ size_t len = sizeof (cachelinesize);
+
mib [0] = CTL_HW;
mib [1] = HW_CACHELINE;
- len = sizeof (cachelinesize);
- if (sysctl (mib, 2, &cachelinesize, (size_t*)&len, NULL, 0) == -1) {
+
+ if (sysctl (mib, 2, &cachelinesize, &len, NULL, 0) == -1) {
perror ("sysctl");
cachelinesize = 128;
} else {
@@ -590,38 +569,18 @@ mono_arch_init (void)
int i, vec_entries = 0;
/* sadly this will work only with 2.6 kernels... */
FILE* f = fopen ("/proc/self/auxv", "rb");
+
if (f) {
vec_entries = fread (&vec, sizeof (AuxVec), MAX_AUX_ENTRIES, f);
fclose (f);
-#ifdef USE_ENVIRON_HACK
- } else {
- AuxVec *evec = linux_find_auxv (&vec_entries);
- if (vec_entries)
- memcpy (&vec, evec, sizeof (AuxVec) * MIN (vec_entries, MAX_AUX_ENTRIES));
-#endif
}
+
for (i = 0; i < vec_entries; i++) {
int type = vec [i].type;
+
if (type == 19) { /* AT_DCACHEBSIZE */
cachelinesize = vec [i].value;
continue;
- } else if (type == 16) { /* AT_HWCAP */
- if (vec [i].value & 0x00002000 /*PPC_FEATURE_ICACHE_SNOOP*/)
- cpu_hw_caps |= PPC_ICACHE_SNOOP;
- if (vec [i].value & ISA_2X)
- cpu_hw_caps |= PPC_ISA_2X;
- if (vec [i].value & ISA_64)
- cpu_hw_caps |= PPC_ISA_64;
- if (vec [i].value & ISA_MOVE_FPR_GPR)
- cpu_hw_caps |= PPC_MOVE_FPR_GPR;
- continue;
- } else if (type == 15) { /* AT_PLATFORM */
- const char *arch = (char*)vec [i].value;
- if (strcmp (arch, "ppc970") == 0 ||
- (strncmp (arch, "power", 5) == 0 && arch [5] >= '4' && arch [5] <= '7'))
- cpu_hw_caps |= PPC_MULTIPLE_LS_UNITS;
- /*printf ("cpu: %s\n", (char*)vec [i].value);*/
- continue;
}
}
#elif defined(G_COMPILER_CODEWARRIOR)
@@ -630,13 +589,31 @@ mono_arch_init (void)
#else
//#error Need a way to get cache line size
#endif
+
+ if (mono_hwcap_ppc_has_icache_snoop)
+ cpu_hw_caps |= PPC_ICACHE_SNOOP;
+
+ if (mono_hwcap_ppc_is_isa_2x)
+ cpu_hw_caps |= PPC_ISA_2X;
+
+ if (mono_hwcap_ppc_is_isa_64)
+ cpu_hw_caps |= PPC_ISA_64;
+
+ if (mono_hwcap_ppc_has_move_fpr_gpr)
+ cpu_hw_caps |= PPC_MOVE_FPR_GPR;
+
+ if (mono_hwcap_ppc_has_multiple_ls_units)
+ cpu_hw_caps |= PPC_MULTIPLE_LS_UNITS;
+
if (!cachelinesize)
cachelinesize = 32;
+
if (!cachelineinc)
cachelineinc = cachelinesize;
if (mono_cpu_count () > 1)
cpu_hw_caps |= PPC_SMP_CAPABLE;
+
InitializeCriticalSection (&mini_arch_mutex);
ss_trigger_page = mono_valloc (NULL, mono_pagesize (), MONO_MMAP_READ|MONO_MMAP_32BIT);
@@ -1278,7 +1255,7 @@ get_call_info (MonoGenericSharingContext *gsctx, MonoMethodSignature *sig)
}
gboolean
-mono_ppc_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig)
+mono_arch_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig)
{
CallInfo *c1, *c2;
gboolean res;
diff --git a/mono/mini/mini-ppc.h b/mono/mini/mini-ppc.h
index e3d5b055b96..13b6adb5376 100644
--- a/mono/mini/mini-ppc.h
+++ b/mono/mini/mini-ppc.h
@@ -195,6 +195,7 @@ typedef struct MonoCompileArch {
#define MONO_ARCH_SOFT_DEBUG_SUPPORTED 1
#endif
#define MONO_ARCH_THIS_AS_FIRST_ARG 1
+#define MONO_ARCH_HAVE_OP_TAIL_CALL 1
#define PPC_NUM_REG_ARGS (PPC_LAST_ARG_REG-PPC_FIRST_ARG_REG+1)
#define PPC_NUM_REG_FPARGS (PPC_LAST_FPARG_REG-PPC_FIRST_FPARG_REG+1)
@@ -304,8 +305,6 @@ extern guint8* mono_ppc_create_pre_code_ftnptr (guint8 *code) MONO_INTERNAL;
gboolean
mono_ppc_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig) MONO_INTERNAL;
-#define MONO_ARCH_USE_OP_TAIL_CALL(caller_sig, callee_sig) mono_ppc_tail_call_supported (caller_sig, callee_sig)
-
void
mono_ppc_patch (guchar *code, const guchar *target) MONO_INTERNAL;
diff --git a/mono/mini/mini-s390x.c b/mono/mini/mini-s390x.c
index 43677fc3ec9..cc2a055e78d 100644
--- a/mono/mini/mini-s390x.c
+++ b/mono/mini/mini-s390x.c
@@ -263,6 +263,7 @@ if (ins->inst_target_bb->native_offset) { \
#include <mono/metadata/profiler-private.h>
#include <mono/utils/mono-math.h>
#include <mono/utils/mono-mmap.h>
+#include <mono/utils/mono-hwcap-s390x.h>
#include "mini-s390x.h"
#include "cpu-s390x.h"
@@ -364,14 +365,12 @@ static guint8 * backUpStackPtr(MonoCompile *, guint8 *);
static void decodeParm (MonoType *, void *, int);
static void enter_method (MonoMethod *, RegParm *, char *);
static void leave_method (MonoMethod *, ...);
-static gboolean is_regsize_var (MonoType *);
static inline void add_general (guint *, size_data *, ArgInfo *);
static inline void add_stackParm (guint *, size_data *, ArgInfo *, gint);
static inline void add_float (guint *, size_data *, ArgInfo *);
static CallInfo * get_call_info (MonoCompile *, MonoMemPool *, MonoMethodSignature *);
static guchar * emit_float_to_int (MonoCompile *, guchar *, int, int, int, gboolean);
static guint8 * emit_load_volatile_arguments (guint8 *, MonoCompile *);
-static void catch_SIGILL(int, siginfo_t *, void *);
static __inline__ void emit_unwind_regs(MonoCompile *, guint8 *, int, int, long);
/*========================= End of Prototypes ======================*/
@@ -384,8 +383,6 @@ int mono_exc_esp_offset = 0;
static int indent_level = 0;
-int has_ld = 0;
-
static gint appdomain_tls_offset = -1,
lmf_tls_offset = -1,
lmf_addr_tls_offset = -1;
@@ -417,11 +414,6 @@ static gpointer bp_trigger_page;
breakpoint_t breakpointCode;
-/*
- * This mutex protects architecture specific caches
- */
-static CRITICAL_SECTION mini_arch_mutex;
-
/*====================== End of Global Variables ===================*/
/*------------------------------------------------------------------*/
@@ -1243,24 +1235,6 @@ handle_enum:
/*------------------------------------------------------------------*/
/* */
-/* Name - catch_SIGILL */
-/* */
-/* Function - Catch SIGILL as a result of testing for long */
-/* displacement facility. */
-/* */
-/*------------------------------------------------------------------*/
-
-void
-catch_SIGILL(int sigNo, siginfo_t *info, void *act) {
-
- has_ld = 0;
-
-}
-
-/*========================= End of Function ========================*/
-
-/*------------------------------------------------------------------*/
-/* */
/* Name - mono_arch_cpu_init */
/* */
/* Function - Perform CPU specific initialization to execute */
@@ -1271,35 +1245,6 @@ catch_SIGILL(int sigNo, siginfo_t *info, void *act) {
void
mono_arch_cpu_init (void)
{
- struct sigaction sa,
- *oldSa = NULL;
- guint mode = 1;
-
- /*--------------------------------------*/
- /* Set default rounding mode for FP */
- /*--------------------------------------*/
- __asm__ ("SRNM\t%0\n\t"
- : : "m" (mode));
-
- /*--------------------------------------*/
- /* Determine if we have long displace- */
- /* ment facility on this processor */
- /*--------------------------------------*/
- sa.sa_sigaction = catch_SIGILL;
- sigemptyset (&sa.sa_mask);
- sa.sa_flags = SA_SIGINFO;
-
- sigaction (SIGILL, &sa, oldSa);
-
- /*--------------------------------------*/
- /* We test by executing the STY inst */
- /*--------------------------------------*/
- __asm__ ("LGHI\t0,1\n\t"
- "LA\t1,%0\n\t"
- ".byte\t0xe3,0x00,0x10,0x00,0x00,0x50\n\t"
- : "=m" (has_ld) : : "0", "1");
-
- sigaction (SIGILL, oldSa, NULL);
}
/*========================= End of Function ========================*/
@@ -1377,8 +1322,7 @@ mono_arch_cpu_optimizations (guint32 *exclude_mask)
/*----------------------------------------------------------*/
/* No s390-specific optimizations yet */
/*----------------------------------------------------------*/
- *exclude_mask = MONO_OPT_INLINE|MONO_OPT_LINEARS;
-// *exclude_mask = MONO_OPT_INLINE;
+ *exclude_mask = MONO_OPT_LINEARS;
return opts;
}
@@ -1401,44 +1345,6 @@ mono_arch_cpu_enumerate_simd_versions (void)
/*------------------------------------------------------------------*/
/* */
-/* Name - */
-/* */
-/* Function - */
-/* */
-/*------------------------------------------------------------------*/
-
-static gboolean
-is_regsize_var (MonoType *t) {
- if (t->byref)
- return TRUE;
- switch (mono_type_get_underlying_type (t)->type) {
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_I:
- case MONO_TYPE_I8:
- case MONO_TYPE_U8:
- case MONO_TYPE_U:
- case MONO_TYPE_PTR:
- case MONO_TYPE_FNPTR:
- return TRUE;
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_STRING:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_ARRAY:
- return FALSE;
- case MONO_TYPE_VALUETYPE:
- if (t->data.klass->enumtype)
- return is_regsize_var (mono_class_enum_basetype (t->data.klass));
- return FALSE;
- }
- return FALSE;
-}
-
-/*========================= End of Function ========================*/
-
-/*------------------------------------------------------------------*/
-/* */
/* Name - mono_arch_get_allocatable_int_vars */
/* */
/* Function - */
@@ -1464,7 +1370,7 @@ mono_arch_get_allocatable_int_vars (MonoCompile *cfg)
continue;
/* we can only allocate 32 bit values */
- if (is_regsize_var (ins->inst_vtype)) {
+ if (mono_is_regsize_var(ins->inst_vtype)) {
g_assert (MONO_VARINFO (cfg, i)->reg == -1);
g_assert (i == vmv->idx);
vars = mono_varlist_insert_sorted (cfg, vars, vmv, FALSE);
@@ -1874,7 +1780,11 @@ enum_retvalue:
MonoMarshalType *info;
MonoClass *klass = mono_class_from_mono_type (ptype);
- size = mini_type_stack_size_full(gsctx, &klass->byval_arg, NULL, sig->pinvoke);
+ if (sig->pinvoke)
+ size = mono_class_native_size(klass, NULL);
+ else
+ size = mono_class_value_size(klass, NULL);
+
if (simpleType != MONO_TYPE_GENERICINST) {
info = mono_marshal_load_type_info(klass);
@@ -2050,7 +1960,7 @@ mono_arch_allocate_vars (MonoCompile *cfg)
cinfo = get_call_info (cfg, cfg->mempool, sig);
if (!cinfo->struct_ret) {
- switch (mono_type_get_underlying_type (sig->ret)->type) {
+ switch (mini_type_get_underlying_type (cfg->generic_sharing_context, sig->ret)->type) {
case MONO_TYPE_VOID:
break;
default:
@@ -2423,7 +2333,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
t = sig->params [i - sig->hasthis];
else
t = &mono_defaults.int_class->byval_arg;
- t = mono_type_get_underlying_type (t);
+ t = mini_type_get_underlying_type (cfg->generic_sharing_context, t);
in = call->args [i];
@@ -2639,7 +2549,8 @@ mono_arch_emit_outarg_vt (MonoCompile *cfg, MonoInst *ins, MonoInst *src)
void
mono_arch_emit_setret (MonoCompile *cfg, MonoMethod *method, MonoInst *val)
{
- MonoType *ret = mono_type_get_underlying_type (mono_method_signature (method)->ret);
+ MonoType *ret = mini_type_get_underlying_type (cfg->generic_sharing_context,
+ mono_method_signature (method)->ret);
if (!ret->byref) {
if (ret->type == MONO_TYPE_R4) {
@@ -2697,7 +2608,7 @@ mono_arch_instrument_prolog (MonoCompile *cfg, void *func, void *p,
if (cfg->method->save_lmf)
parmOffset -= sizeof(MonoLMF);
fpOffset = parmOffset + (5*sizeof(gpointer));
- if ((!has_ld) && (fpOffset > 4096)) {
+ if ((!mono_hwcap_s390x_has_ld) && (fpOffset > 4096)) {
s390_lgr (code, s390_r12, STK_BASE);
baseReg = s390_r12;
while (fpOffset > 4096) {
@@ -2710,7 +2621,7 @@ mono_arch_instrument_prolog (MonoCompile *cfg, void *func, void *p,
}
s390_stmg (code, s390_r2, s390_r6, STK_BASE, parmOffset);
- if (has_ld) {
+ if (mono_hwcap_s390x_has_ld) {
s390_stdy (code, s390_f0, 0, STK_BASE, fpOffset);
s390_stdy (code, s390_f2, 0, STK_BASE, fpOffset+sizeof(gdouble));
s390_stdy (code, s390_f4, 0, STK_BASE, fpOffset+2*sizeof(gdouble));
@@ -2726,7 +2637,7 @@ mono_arch_instrument_prolog (MonoCompile *cfg, void *func, void *p,
s390_llong(code, cfg->method);
s390_llong(code, func);
s390_lg (code, s390_r2, 0, s390_r13, 4);
- if (has_ld)
+ if (mono_hwcap_s390x_has_ld)
s390_lay (code, s390_r3, 0, STK_BASE, parmOffset);
else
s390_la (code, s390_r3, 0, baseReg, parmOffset);
@@ -2734,7 +2645,7 @@ mono_arch_instrument_prolog (MonoCompile *cfg, void *func, void *p,
s390_aghi (code, s390_r4, cfg->stack_usage);
s390_lg (code, s390_r1, 0, s390_r13, 12);
s390_basr (code, s390_r14, s390_r1);
- if (has_ld) {
+ if (mono_hwcap_s390x_has_ld) {
s390_ldy (code, s390_f6, 0, STK_BASE, fpOffset+3*sizeof(gdouble));
s390_ldy (code, s390_f4, 0, STK_BASE, fpOffset+2*sizeof(gdouble));
s390_ldy (code, s390_f2, 0, STK_BASE, fpOffset+sizeof(gdouble));
@@ -2769,7 +2680,8 @@ mono_arch_instrument_epilog_full (MonoCompile *cfg, void *func, void *p, gboolea
saveOffset,
offset;
MonoMethod *method = cfg->method;
- int rtype = mono_type_get_underlying_type (mono_method_signature (method)->ret)->type;
+ int rtype = mini_type_get_underlying_type (cfg->generic_sharing_context,
+ mono_method_signature (method)->ret)->type;
offset = code - cfg->native_code;
/*-----------------------------------------*/
@@ -4177,7 +4089,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
/* ensure ins->sreg1 is not NULL */
s390_lg (code, s390_r0, 0, ins->sreg1, 0);
s390_ltgr (code, s390_r0, s390_r0);
- EMIT_COND_SYSTEM_EXCEPTION (S390_CC_ZR, "NullReferenceException");
+// EMIT_COND_SYSTEM_EXCEPTION (S390_CC_ZR, "NullReferenceException");
}
break;
case OP_ARGLIST: {
@@ -5999,13 +5911,16 @@ mono_arch_get_delegate_invoke_impls (void)
guint8 *code;
guint32 code_len;
int i;
+ char *tramp_name;
code = get_delegate_invoke_impl (TRUE, 0, &code_len, TRUE);
- res = g_slist_prepend (res, mono_tramp_info_create (g_strdup ("delegate_invoke_impl_has_target"), code, code_len, NULL, NULL));
+ res = g_slist_prepend (res, mono_tramp_info_create ("delegate_invoke_impl_has_target", code, code_len, NULL, NULL));
for (i = 0; i < MAX_ARCH_DELEGATE_PARAMS; ++i) {
code = get_delegate_invoke_impl (FALSE, i, &code_len, TRUE);
- res = g_slist_prepend (res, mono_tramp_info_create (g_strdup_printf ("delegate_invoke_impl_target_%d", i), code, code_len, NULL, NULL));
+ tramp_name = g_strdup_printf ("delegate_invoke_impl_target_%d", i);
+ res = g_slist_prepend (res, mono_tramp_info_create (tramp_name, code, code_len, NULL, NULL));
+ g_free (tramp_name);
}
return res;
diff --git a/mono/mini/mini-s390x.h b/mono/mini/mini-s390x.h
index 764db673bf5..a5be8f01087 100644
--- a/mono/mini/mini-s390x.h
+++ b/mono/mini/mini-s390x.h
@@ -15,7 +15,7 @@
/*-------------------------------------------*/
#define S390_LONG(loc, opy, op, r, ix, br, off) \
- if (has_ld) { \
+ if (mono_hwcap_s390x_has_ld) { \
if (s390_is_imm20(off)) { \
s390_##opy (loc, r, ix, br, off); \
} else { \
diff --git a/mono/mini/mini-sparc.c b/mono/mini/mini-sparc.c
index 2300f39c74a..9a0e4ec1508 100644
--- a/mono/mini/mini-sparc.c
+++ b/mono/mini/mini-sparc.c
@@ -18,7 +18,6 @@
#include <unistd.h>
#ifndef __linux__
-#include <sys/systeminfo.h>
#include <thread.h>
#endif
@@ -29,6 +28,7 @@
#include <mono/metadata/debug-helpers.h>
#include <mono/metadata/tokentype.h>
#include <mono/utils/mono-math.h>
+#include <mono/utils/mono-hwcap-sparc.h>
#include "mini-sparc.h"
#include "trace.h"
@@ -150,9 +150,6 @@
#endif
-/* Whenever the CPU supports v9 instructions */
-static gboolean sparcv9 = FALSE;
-
/* Whenever this is a 64bit executable */
#if SPARCV9
static gboolean v64 = TRUE;
@@ -202,9 +199,6 @@ mono_arch_fregname (int reg) {
void
mono_arch_cpu_init (void)
{
- guint32 dummy;
- /* make sure sparcv9 is initialized for embedded use */
- mono_arch_cpu_optimizations(&dummy);
}
/*
@@ -229,35 +223,16 @@ mono_arch_cleanup (void)
guint32
mono_arch_cpu_optimizations (guint32 *exclude_mask)
{
- char buf [1024];
guint32 opts = 0;
*exclude_mask = 0;
-#ifndef __linux__
- if (!sysinfo (SI_ISALIST, buf, 1024))
- g_assert_not_reached ();
-#else
- /* From glibc. If the getpagesize is 8192, we're on sparc64, which
- * (in)directly implies that we're a v9 or better.
- * Improvements to this are greatly accepted...
- * Also, we don't differentiate between v7 and v8. I sense SIGILL
- * sniffing in my future.
- */
- if (getpagesize() == 8192)
- strcpy (buf, "sparcv9");
- else
- strcpy (buf, "sparcv8");
-#endif
-
- /*
+ /*
* On some processors, the cmov instructions are even slower than the
* normal ones...
*/
- if (strstr (buf, "sparcv9")) {
+ if (mono_hwcap_sparc_is_v9)
opts |= MONO_OPT_CMOV | MONO_OPT_FCMOV;
- sparcv9 = TRUE;
- }
else
*exclude_mask |= MONO_OPT_CMOV | MONO_OPT_FCMOV;
@@ -306,7 +281,7 @@ mono_arch_flush_icache (guint8 *code, gint size)
*
* Sparcv8 needs a flush every 8 bytes.
*/
- align = (sparcv9 ? 32 : 8);
+ align = (mono_hwcap_sparc_is_v9 ? 32 : 8);
start &= ~(align - 1);
end = (end + (align - 1)) & ~(align - 1);
@@ -370,7 +345,7 @@ mono_arch_is_inst_imm (gint64 imm)
gboolean
mono_sparc_is_v9 (void) {
- return sparcv9;
+ return mono_hwcap_sparc_is_v9;
}
gboolean
@@ -1510,7 +1485,7 @@ else { \
#define EMIT_COND_SYSTEM_EXCEPTION_GENERAL(ins,cond,sexc_name,filldelay,icc) do { \
mono_add_patch_info (cfg, (guint8*)(code) - (cfg)->native_code, \
MONO_PATCH_INFO_EXC, sexc_name); \
- if (sparcv9 && ((icc) != sparc_icc_short)) { \
+ if (mono_hwcap_sparc_is_v9 && ((icc) != sparc_icc_short)) { \
sparc_branchp (code, 0, (cond), (icc), 0, 0); \
} \
else { \
@@ -1741,7 +1716,7 @@ mono_arch_peephole_pass_2 (MonoCompile *cfg, MonoBasicBlock *bb)
((ins->inst_offset == last_ins->inst_offset - 4)) &&
(ins->inst_imm == 0) &&
(last_ins->inst_imm == 0)) {
- if (sparcv9) {
+ if (mono_hwcap_sparc_is_v9) {
last_ins->opcode = OP_STOREI8_MEMBASE_IMM;
last_ins->inst_offset = ins->inst_offset;
MONO_DELETE_INS (bb, ins);
@@ -3020,10 +2995,10 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
sparc_branch (code, 0, sparc_be, 0);
/* delay slot */
sparc_set (code, 0, sparc_o7);
- sparc_sub_imm (code, 0, size_reg, sparcv9 ? 8 : 4, size_reg);
+ sparc_sub_imm (code, 0, size_reg, mono_hwcap_sparc_is_v9 ? 8 : 4, size_reg);
/* start of loop */
br [1] = code;
- if (sparcv9)
+ if (mono_hwcap_sparc_is_v9)
sparc_stx (code, sparc_g0, ins->dreg, sparc_o7);
else
sparc_st (code, sparc_g0, ins->dreg, sparc_o7);
@@ -3032,7 +3007,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
sparc_branch (code, 0, sparc_bl, 0);
sparc_patch (br [2], br [1]);
/* delay slot */
- sparc_add_imm (code, 0, sparc_o7, sparcv9 ? 8 : 4, sparc_o7);
+ sparc_add_imm (code, 0, sparc_o7, mono_hwcap_sparc_is_v9 ? 8 : 4, sparc_o7);
sparc_patch (br [0], code);
}
break;
@@ -3066,7 +3041,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
if (offset <= 16) {
i = 0;
while (i < offset) {
- if (sparcv9) {
+ if (mono_hwcap_sparc_is_v9) {
sparc_stx_imm (code, sparc_g0, ins->dreg, i);
i += 8;
}
@@ -3078,10 +3053,10 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
}
else {
sparc_set (code, offset, sparc_o7);
- sparc_sub_imm (code, 0, sparc_o7, sparcv9 ? 8 : 4, sparc_o7);
+ sparc_sub_imm (code, 0, sparc_o7, mono_hwcap_sparc_is_v9 ? 8 : 4, sparc_o7);
/* beginning of loop */
br [0] = code;
- if (sparcv9)
+ if (mono_hwcap_sparc_is_v9)
sparc_stx (code, sparc_g0, ins->dreg, sparc_o7);
else
sparc_st (code, sparc_g0, ins->dreg, sparc_o7);
@@ -3089,7 +3064,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
br [1] = code;
sparc_branch (code, 0, sparc_bne, 0);
/* delay slot */
- sparc_sub_imm (code, 0, sparc_o7, sparcv9 ? 8 : 4, sparc_o7);
+ sparc_sub_imm (code, 0, sparc_o7, mono_hwcap_sparc_is_v9 ? 8 : 4, sparc_o7);
sparc_patch (br [1], br [0]);
}
}
@@ -3284,7 +3259,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
case OP_IBGE_UN:
case OP_IBLE:
case OP_IBLE_UN: {
- if (sparcv9)
+ if (mono_hwcap_sparc_is_v9)
EMIT_COND_BRANCH_PREDICTED (ins, opcode_to_sparc_cond (ins->opcode), 1, 1);
else
EMIT_COND_BRANCH (ins, opcode_to_sparc_cond (ins->opcode), 1, 1);
diff --git a/mono/mini/mini-trampolines.c b/mono/mini/mini-trampolines.c
index 0e48c358065..bc1c4639d2b 100644
--- a/mono/mini/mini-trampolines.c
+++ b/mono/mini/mini-trampolines.c
@@ -12,6 +12,7 @@
#include <mono/metadata/tabledefs.h>
#include <mono/utils/mono-counters.h>
#include <mono/utils/mono-error-internals.h>
+#include <mono/utils/mono-membar.h>
#include "mini.h"
#include "debug-mini.h"
@@ -148,7 +149,7 @@ static gpointer*
*/
__attribute__ ((noinline))
#endif
-mono_convert_imt_slot_to_vtable_slot (gpointer* slot, mgreg_t *regs, guint8 *code, MonoMethod *method, MonoMethod **impl_method, gboolean *need_rgctx_tramp, gboolean *variance_used, gpointer *aot_addr)
+ mono_convert_imt_slot_to_vtable_slot (gpointer* slot, mgreg_t *regs, guint8 *code, MonoMethod *method, gboolean lookup_aot, MonoMethod **impl_method, gboolean *need_rgctx_tramp, gboolean *variance_used, gpointer *aot_addr)
{
MonoObject *this_argument = mono_arch_get_this_arg_from_call (regs, code);
MonoVTable *vt = this_argument->vtable;
@@ -190,7 +191,7 @@ mono_convert_imt_slot_to_vtable_slot (gpointer* slot, mgreg_t *regs, guint8 *cod
impl = mono_class_inflate_generic_method (impl, &context);
} else {
/* Avoid loading metadata or creating a generic vtable if possible */
- if (!vt->klass->valuetype)
+ if (lookup_aot && !vt->klass->valuetype)
*aot_addr = mono_aot_get_method_from_vt_slot (mono_domain_get (), vt, interface_offset + mono_method_get_vtable_slot (imt_method));
else
*aot_addr = NULL;
@@ -289,6 +290,7 @@ mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer com
{
gpointer addr = compiled_method;
gboolean callee_gsharedvt, callee_array_helper;
+ MonoMethod *jmethod = NULL;
MonoJitInfo *ji =
mini_jit_info_table_find (mono_domain_get (), mono_get_addr_from_ftnptr (compiled_method), NULL);
@@ -337,7 +339,9 @@ mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer com
}
}
- if (callee_gsharedvt && mini_is_gsharedvt_variable_signature (mono_method_signature (ji->method))) {
+ if (ji)
+ jmethod = jinfo_get_method (ji);
+ if (callee_gsharedvt && mini_is_gsharedvt_variable_signature (mono_method_signature (jmethod))) {
MonoGenericSharingContext *gsctx;
MonoMethodSignature *sig, *gsig;
@@ -347,7 +351,7 @@ mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer com
gsctx = mono_jit_info_get_generic_sharing_context (ji);
sig = mono_method_signature (m);
- gsig = mono_method_signature (ji->method);
+ gsig = mono_method_signature (jmethod);
addr = mini_get_gsharedvt_wrapper (TRUE, addr, sig, gsig, gsctx, -1, FALSE);
@@ -406,14 +410,8 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
m = mono_object_get_virtual_method (this_arg, m);
vtable_slot_to_patch = NULL;
} else {
- addr = NULL;
- vtable_slot = mono_convert_imt_slot_to_vtable_slot (vtable_slot, regs, code, m, &impl_method, &need_rgctx_tramp, &variance_used, &addr);
- /* This is the vcall slot which gets called through the IMT thunk */
- vtable_slot_to_patch = vtable_slot;
- /* mono_convert_imt_slot_to_vtable_slot () also gives us the method that is supposed
- * to be called, so we compile it and go ahead as usual.
- */
- /*g_print ("imt found method %p (%s) at %p\n", impl_method, impl_method->name, code);*/
+ gboolean lookup_aot;
+
if (m->is_inflated && ((MonoMethodInflated*)m)->context.method_inst) {
/* Generic virtual method */
generic_virtual = m;
@@ -422,7 +420,18 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
variant_iface = m;
}
- if (addr && !generic_virtual && !variant_iface) {
+ addr = NULL;
+ /* We can only use the AOT compiled code if we don't require further processing */
+ lookup_aot = !generic_virtual & !variant_iface;
+ vtable_slot = mono_convert_imt_slot_to_vtable_slot (vtable_slot, regs, code, m, lookup_aot, &impl_method, &need_rgctx_tramp, &variance_used, &addr);
+ /* This is the vcall slot which gets called through the IMT thunk */
+ vtable_slot_to_patch = vtable_slot;
+ /* mono_convert_imt_slot_to_vtable_slot () also gives us the method that is supposed
+ * to be called, so we compile it and go ahead as usual.
+ */
+ /*g_print ("imt found method %p (%s) at %p\n", impl_method, impl_method->name, code);*/
+
+ if (addr) {
/*
* We found AOT compiled code for the method, skip the rest.
*/
@@ -525,7 +534,7 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
actual_method = vt->klass->vtable [displacement];
}
- if (method_inst) {
+ if (method_inst || m->wrapper_type) {
MonoGenericContext context = { NULL, NULL };
if (m->is_inflated)
@@ -1020,7 +1029,7 @@ mono_delegate_trampoline (mgreg_t *regs, guint8 *code, gpointer *tramp_data, gui
} else {
ji = mono_jit_info_table_find (domain, mono_get_addr_from_ftnptr (delegate->method_ptr));
if (ji)
- method = ji->method;
+ method = jinfo_get_method (ji);
}
if (method) {
@@ -1129,6 +1138,11 @@ gpointer
mono_create_handler_block_trampoline (void)
{
static gpointer code;
+ if (code) {
+ mono_memory_barrier ();
+ return code;
+ }
+
if (mono_aot_only) {
g_assert (0);
@@ -1137,9 +1151,11 @@ mono_create_handler_block_trampoline (void)
mono_trampolines_lock ();
- if (!code)
- code = mono_arch_create_handler_block_trampoline ();
-
+ if (!code) {
+ gpointer tmp = mono_arch_create_handler_block_trampoline ();
+ mono_memory_barrier ();
+ code = tmp;
+ }
mono_trampolines_unlock ();
return code;
@@ -1204,12 +1220,7 @@ create_trampoline_code (MonoTrampolineType tramp_type)
guchar *code;
code = mono_arch_create_generic_trampoline (tramp_type, &info, FALSE);
- if (info) {
- mono_save_trampoline_xdebug_info (info);
- if (mono_jit_map_is_enabled ())
- mono_emit_jit_tramp (info->code, info->code_size, info->name);
- mono_tramp_info_free (info);
- }
+ mono_tramp_info_register (info);
return code;
}
@@ -1333,13 +1344,7 @@ mono_create_generic_class_init_trampoline (void)
code = mono_get_addr_from_ftnptr (mono_aot_get_trampoline ("generic_class_init_trampoline"));
else {
code = mono_arch_create_generic_class_init_trampoline (&info, FALSE);
-
- if (info) {
- mono_save_trampoline_xdebug_info (info);
- if (mono_jit_map_is_enabled ())
- mono_emit_jit_tramp (info->code, info->code_size, info->name);
- mono_tramp_info_free (info);
- }
+ mono_tramp_info_register (info);
}
}
@@ -1380,7 +1385,7 @@ mono_create_jump_trampoline (MonoDomain *domain, MonoMethod *method, gboolean ad
ji = mono_domain_alloc0 (domain, MONO_SIZEOF_JIT_INFO);
ji->code_start = code;
ji->code_size = code_size;
- ji->method = method;
+ ji->d.method = method;
/*
* mono_delegate_ctor needs to find the method metadata from the
@@ -1501,9 +1506,6 @@ mono_create_rgctx_lazy_fetch_trampoline (guint32 offset)
gpointer tramp, ptr;
- if (mono_aot_only)
- return mono_aot_get_lazy_fetch_trampoline (offset);
-
mono_trampolines_lock ();
if (rgctx_lazy_fetch_trampoline_hash)
tramp = g_hash_table_lookup (rgctx_lazy_fetch_trampoline_hash, GUINT_TO_POINTER (offset));
@@ -1513,14 +1515,13 @@ mono_create_rgctx_lazy_fetch_trampoline (guint32 offset)
if (tramp)
return tramp;
- tramp = mono_arch_create_rgctx_lazy_fetch_trampoline (offset, &info, FALSE);
- if (info) {
- mono_save_trampoline_xdebug_info (info);
- if (mono_jit_map_is_enabled ())
- mono_emit_jit_tramp (info->code, info->code_size, info->name);
- mono_tramp_info_free (info);
+ if (mono_aot_only) {
+ ptr = mono_aot_get_lazy_fetch_trampoline (offset);
+ } else {
+ tramp = mono_arch_create_rgctx_lazy_fetch_trampoline (offset, &info, FALSE);
+ mono_tramp_info_register (info);
+ ptr = mono_create_ftnptr (mono_get_root_domain (), tramp);
}
- ptr = mono_create_ftnptr (mono_get_root_domain (), tramp);
mono_trampolines_lock ();
if (!rgctx_lazy_fetch_trampoline_hash) {
@@ -1560,12 +1561,7 @@ mono_create_monitor_enter_trampoline (void)
MonoTrampInfo *info;
code = mono_arch_create_monitor_enter_trampoline (&info, FALSE);
- if (info) {
- mono_save_trampoline_xdebug_info (info);
- if (mono_jit_map_is_enabled ())
- mono_emit_jit_tramp (info->code, info->code_size, info->name);
- mono_tramp_info_free (info);
- }
+ mono_tramp_info_register (info);
}
mono_trampolines_unlock ();
@@ -1595,12 +1591,7 @@ mono_create_monitor_exit_trampoline (void)
MonoTrampInfo *info;
code = mono_arch_create_monitor_exit_trampoline (&info, FALSE);
- if (info) {
- mono_save_trampoline_xdebug_info (info);
- if (mono_jit_map_is_enabled ())
- mono_emit_jit_tramp (info->code, info->code_size, info->name);
- mono_tramp_info_free (info);
- }
+ mono_tramp_info_register (info);
}
mono_trampolines_unlock ();
@@ -1675,15 +1666,11 @@ static const char*tramp_names [MONO_TRAMPOLINE_NUM] = {
"aot_plt",
"delegate",
"restore_stack_prot",
-#ifndef DISABLE_REMOTING
"generic_virtual_remoting",
-#endif
"monitor_enter",
"monitor_exit",
"vcall",
-#ifdef MONO_ARCH_HAVE_HANDLER_BLOCK_GUARD
"handler_block_guard"
-#endif
};
/*
@@ -1714,3 +1701,24 @@ mono_get_rgctx_fetch_trampoline_name (int slot)
return g_strdup_printf ("rgctx_fetch_trampoline_%s_%d", mrgctx ? "mrgctx" : "rgctx", index);
}
+gpointer
+mini_get_nullified_class_init_trampoline (void)
+{
+ static gpointer nullified_class_init_trampoline;
+
+ if (!nullified_class_init_trampoline) {
+ gpointer tramp;
+ MonoTrampInfo *info;
+
+ if (mono_aot_only) {
+ tramp = mono_aot_get_trampoline ("nullified_class_init_trampoline");
+ } else {
+ tramp = mono_arch_get_nullified_class_init_trampoline (&info);
+ mono_tramp_info_register (info);
+ }
+ mono_memory_barrier ();
+ nullified_class_init_trampoline = tramp;
+ }
+
+ return nullified_class_init_trampoline;
+}
diff --git a/mono/mini/mini-windows.c b/mono/mini/mini-windows.c
index 80a9c9bf148..46a317c4fc4 100644
--- a/mono/mini/mini-windows.c
+++ b/mono/mini/mini-windows.c
@@ -50,9 +50,7 @@
#include "jit-icalls.h"
-extern LPTOP_LEVEL_EXCEPTION_FILTER mono_old_win_toplevel_exception_filter;
-extern guint64 mono_win_chained_exception_filter_result;
-extern gboolean mono_win_chained_exception_filter_didrun;
+gboolean mono_win_chained_exception_needs_run;
void
mono_runtime_install_handlers (void)
@@ -85,15 +83,8 @@ mono_runtime_cleanup_handlers (void)
gboolean
SIG_HANDLER_SIGNATURE (mono_chain_signal)
{
- int signal = _dummy;
- GET_CONTEXT;
-
- if (mono_old_win_toplevel_exception_filter) {
- mono_win_chained_exception_filter_didrun = TRUE;
- mono_win_chained_exception_filter_result = (*mono_old_win_toplevel_exception_filter)(info);
- return TRUE;
- }
- return FALSE;
+ mono_win_chained_exception_needs_run = TRUE;
+ return TRUE;
}
static HANDLE win32_main_thread;
diff --git a/mono/mini/mini-x86.c b/mono/mini/mini-x86.c
index 141cc6b4f13..6c4d58d0ffd 100644..100755
--- a/mono/mini/mini-x86.c
+++ b/mono/mini/mini-x86.c
@@ -27,6 +27,7 @@
#include <mono/utils/mono-counters.h>
#include <mono/utils/mono-mmap.h>
#include <mono/utils/mono-memory-model.h>
+#include <mono/utils/mono-hwcap-x86.h>
#include "trace.h"
#include "mini-x86.h"
@@ -36,7 +37,11 @@
/* On windows, these hold the key returned by TlsAlloc () */
static gint lmf_tls_offset = -1;
+#ifdef TARGET_WIN32
+static gint jit_tls_offset = -1;
+#else
static gint lmf_addr_tls_offset = -1;
+#endif
static gint appdomain_tls_offset = -1;
#ifdef MONO_XEN_OPT
@@ -62,9 +67,9 @@ static CRITICAL_SECTION mini_arch_mutex;
#ifdef TARGET_WIN32
/* Under windows, the default pinvoke calling convention is stdcall */
-#define CALLCONV_IS_STDCALL(sig) ((((sig)->call_convention) == MONO_CALL_STDCALL) || ((sig)->pinvoke && ((sig)->call_convention) == MONO_CALL_DEFAULT))
+#define CALLCONV_IS_STDCALL(sig) ((((sig)->call_convention) == MONO_CALL_STDCALL) || ((sig)->pinvoke && ((sig)->call_convention) == MONO_CALL_DEFAULT) || ((sig)->pinvoke && ((sig)->call_convention) == MONO_CALL_THISCALL))
#else
-#define CALLCONV_IS_STDCALL(sig) (((sig)->call_convention) == MONO_CALL_STDCALL)
+#define CALLCONV_IS_STDCALL(sig) (((sig)->call_convention) == MONO_CALL_STDCALL || ((sig)->pinvoke && ((sig)->call_convention) == MONO_CALL_THISCALL))
#endif
#define X86_IS_CALLEE_SAVED_REG(reg) (((reg) == X86_EBX) || ((reg) == X86_EDI) || ((reg) == X86_ESI))
@@ -228,11 +233,22 @@ typedef struct {
ArgInfo args [1];
} CallInfo;
-#define PARAM_REGS 0
-
#define FLOAT_PARAM_REGS 0
-static X86_Reg_No param_regs [] = { 0 };
+static const guint32 thiscall_param_regs [] = { X86_ECX, X86_NREG };
+
+static const guint32 *callconv_param_regs(MonoMethodSignature *sig)
+{
+ if (!sig->pinvoke)
+ return NULL;
+
+ switch (sig->call_convention) {
+ case MONO_CALL_THISCALL:
+ return thiscall_param_regs;
+ default:
+ return NULL;
+ }
+}
#if defined(TARGET_WIN32) || defined(__APPLE__) || defined(__FreeBSD__)
#define SMALL_STRUCTS_IN_REGS
@@ -240,11 +256,11 @@ static X86_Reg_No return_regs [] = { X86_EAX, X86_EDX };
#endif
static void inline
-add_general (guint32 *gr, guint32 *stack_size, ArgInfo *ainfo)
+add_general (guint32 *gr, const guint32 *param_regs, guint32 *stack_size, ArgInfo *ainfo)
{
ainfo->offset = *stack_size;
- if (*gr >= PARAM_REGS) {
+ if (!param_regs || param_regs [*gr] == X86_NREG) {
ainfo->storage = ArgOnStack;
ainfo->nslots = 1;
(*stack_size) += sizeof (gpointer);
@@ -257,12 +273,12 @@ add_general (guint32 *gr, guint32 *stack_size, ArgInfo *ainfo)
}
static void inline
-add_general_pair (guint32 *gr, guint32 *stack_size, ArgInfo *ainfo)
+add_general_pair (guint32 *gr, const guint32 *param_regs , guint32 *stack_size, ArgInfo *ainfo)
{
ainfo->offset = *stack_size;
- g_assert (PARAM_REGS == 0);
-
+ g_assert(!param_regs || param_regs[*gr] == X86_NREG);
+
ainfo->storage = ArgOnStack;
(*stack_size) += sizeof (gpointer) * 2;
ainfo->nslots = 2;
@@ -293,7 +309,7 @@ add_float (guint32 *gr, guint32 *stack_size, ArgInfo *ainfo, gboolean is_double)
static void
add_valuetype (MonoGenericSharingContext *gsctx, MonoMethodSignature *sig, ArgInfo *ainfo, MonoType *type,
gboolean is_return,
- guint32 *gr, guint32 *fr, guint32 *stack_size)
+ guint32 *gr, const guint32 *param_regs, guint32 *fr, guint32 *stack_size)
{
guint32 size;
MonoClass *klass;
@@ -338,6 +354,14 @@ add_valuetype (MonoGenericSharingContext *gsctx, MonoMethodSignature *sig, ArgIn
}
#endif
+ if (param_regs && param_regs [*gr] != X86_NREG && !is_return) {
+ g_assert (size <= 4);
+ ainfo->storage = ArgValuetypeInReg;
+ ainfo->reg = param_regs [*gr];
+ (*gr)++;
+ return;
+ }
+
ainfo->offset = *stack_size;
ainfo->storage = ArgOnStack;
*stack_size += ALIGN_TO (size, sizeof (gpointer));
@@ -357,6 +381,7 @@ static CallInfo*
get_call_info_internal (MonoGenericSharingContext *gsctx, CallInfo *cinfo, MonoMethodSignature *sig)
{
guint32 i, gr, fr, pstart;
+ const guint32 *param_regs;
MonoType *ret_type;
int n = sig->hasthis + sig->param_count;
guint32 stack_size = 0;
@@ -366,6 +391,8 @@ get_call_info_internal (MonoGenericSharingContext *gsctx, CallInfo *cinfo, MonoM
fr = 0;
cinfo->nargs = n;
+ param_regs = callconv_param_regs(sig);
+
/* return value */
{
ret_type = mini_type_get_underlying_type (gsctx, sig->ret);
@@ -418,7 +445,7 @@ get_call_info_internal (MonoGenericSharingContext *gsctx, CallInfo *cinfo, MonoM
case MONO_TYPE_TYPEDBYREF: {
guint32 tmp_gr = 0, tmp_fr = 0, tmp_stacksize = 0;
- add_valuetype (gsctx, sig, &cinfo->ret, sig->ret, TRUE, &tmp_gr, &tmp_fr, &tmp_stacksize);
+ add_valuetype (gsctx, sig, &cinfo->ret, ret_type, TRUE, &tmp_gr, NULL, &tmp_fr, &tmp_stacksize);
if (cinfo->ret.storage == ArgOnStack) {
cinfo->vtype_retaddr = TRUE;
/* The caller passes the address where the value is stored */
@@ -435,7 +462,7 @@ get_call_info_internal (MonoGenericSharingContext *gsctx, CallInfo *cinfo, MonoM
cinfo->ret.storage = ArgNone;
break;
default:
- g_error ("Can't handle as return value 0x%x", sig->ret->type);
+ g_error ("Can't handle as return value 0x%x", ret_type->type);
}
}
@@ -449,29 +476,28 @@ get_call_info_internal (MonoGenericSharingContext *gsctx, CallInfo *cinfo, MonoM
*/
if (cinfo->vtype_retaddr && !is_pinvoke && (sig->hasthis || (sig->param_count > 0 && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (gsctx, sig->params [0]))))) {
if (sig->hasthis) {
- add_general (&gr, &stack_size, cinfo->args + 0);
+ add_general (&gr, param_regs, &stack_size, cinfo->args + 0);
} else {
- add_general (&gr, &stack_size, &cinfo->args [sig->hasthis + 0]);
+ add_general (&gr, param_regs, &stack_size, &cinfo->args [sig->hasthis + 0]);
pstart = 1;
}
cinfo->vret_arg_offset = stack_size;
- add_general (&gr, &stack_size, &cinfo->ret);
+ add_general (&gr, NULL, &stack_size, &cinfo->ret);
cinfo->vret_arg_index = 1;
} else {
/* this */
if (sig->hasthis)
- add_general (&gr, &stack_size, cinfo->args + 0);
+ add_general (&gr, param_regs, &stack_size, cinfo->args + 0);
if (cinfo->vtype_retaddr)
- add_general (&gr, &stack_size, &cinfo->ret);
+ add_general (&gr, NULL, &stack_size, &cinfo->ret);
}
if (!sig->pinvoke && (sig->call_convention == MONO_CALL_VARARG) && (n == 0)) {
- gr = PARAM_REGS;
fr = FLOAT_PARAM_REGS;
/* Emit the signature cookie just before the implicit arguments */
- add_general (&gr, &stack_size, &cinfo->sig_cookie);
+ add_general (&gr, param_regs, &stack_size, &cinfo->sig_cookie);
}
for (i = pstart; i < sig->param_count; ++i) {
@@ -484,15 +510,14 @@ get_call_info_internal (MonoGenericSharingContext *gsctx, CallInfo *cinfo, MonoM
* Prevent implicit arguments + the sig cookie from being passed
* in registers.
*/
- gr = PARAM_REGS;
fr = FLOAT_PARAM_REGS;
/* Emit the signature cookie just before the implicit arguments */
- add_general (&gr, &stack_size, &cinfo->sig_cookie);
+ add_general (&gr, param_regs, &stack_size, &cinfo->sig_cookie);
}
if (sig->params [i]->byref) {
- add_general (&gr, &stack_size, ainfo);
+ add_general (&gr, param_regs, &stack_size, ainfo);
continue;
}
ptype = mini_type_get_underlying_type (gsctx, sig->params [i]);
@@ -500,16 +525,16 @@ get_call_info_internal (MonoGenericSharingContext *gsctx, CallInfo *cinfo, MonoM
case MONO_TYPE_BOOLEAN:
case MONO_TYPE_I1:
case MONO_TYPE_U1:
- add_general (&gr, &stack_size, ainfo);
+ add_general (&gr, param_regs, &stack_size, ainfo);
break;
case MONO_TYPE_I2:
case MONO_TYPE_U2:
case MONO_TYPE_CHAR:
- add_general (&gr, &stack_size, ainfo);
+ add_general (&gr, param_regs, &stack_size, ainfo);
break;
case MONO_TYPE_I4:
case MONO_TYPE_U4:
- add_general (&gr, &stack_size, ainfo);
+ add_general (&gr, param_regs, &stack_size, ainfo);
break;
case MONO_TYPE_I:
case MONO_TYPE_U:
@@ -520,16 +545,16 @@ get_call_info_internal (MonoGenericSharingContext *gsctx, CallInfo *cinfo, MonoM
case MONO_TYPE_STRING:
case MONO_TYPE_SZARRAY:
case MONO_TYPE_ARRAY:
- add_general (&gr, &stack_size, ainfo);
+ add_general (&gr, param_regs, &stack_size, ainfo);
break;
case MONO_TYPE_GENERICINST:
if (!mono_type_generic_inst_is_valuetype (ptype)) {
- add_general (&gr, &stack_size, ainfo);
+ add_general (&gr, param_regs, &stack_size, ainfo);
break;
}
if (mini_is_gsharedvt_type_gsctx (gsctx, ptype)) {
/* gsharedvt arguments are passed by ref */
- add_general (&gr, &stack_size, ainfo);
+ add_general (&gr, param_regs, &stack_size, ainfo);
g_assert (ainfo->storage == ArgOnStack);
ainfo->storage = ArgGSharedVt;
break;
@@ -537,11 +562,11 @@ get_call_info_internal (MonoGenericSharingContext *gsctx, CallInfo *cinfo, MonoM
/* Fall through */
case MONO_TYPE_VALUETYPE:
case MONO_TYPE_TYPEDBYREF:
- add_valuetype (gsctx, sig, ainfo, ptype, FALSE, &gr, &fr, &stack_size);
+ add_valuetype (gsctx, sig, ainfo, ptype, FALSE, &gr, param_regs, &fr, &stack_size);
break;
case MONO_TYPE_U8:
case MONO_TYPE_I8:
- add_general_pair (&gr, &stack_size, ainfo);
+ add_general_pair (&gr, param_regs, &stack_size, ainfo);
break;
case MONO_TYPE_R4:
add_float (&fr, &stack_size, ainfo, FALSE);
@@ -553,7 +578,7 @@ get_call_info_internal (MonoGenericSharingContext *gsctx, CallInfo *cinfo, MonoM
case MONO_TYPE_MVAR:
/* gsharedvt arguments are passed by ref */
g_assert (mini_is_gsharedvt_type_gsctx (gsctx, ptype));
- add_general (&gr, &stack_size, ainfo);
+ add_general (&gr, param_regs, &stack_size, ainfo);
g_assert (ainfo->storage == ArgOnStack);
ainfo->storage = ArgGSharedVt;
break;
@@ -564,11 +589,10 @@ get_call_info_internal (MonoGenericSharingContext *gsctx, CallInfo *cinfo, MonoM
}
if (!sig->pinvoke && (sig->call_convention == MONO_CALL_VARARG) && (n > 0) && (sig->sentinelpos == sig->param_count)) {
- gr = PARAM_REGS;
fr = FLOAT_PARAM_REGS;
/* Emit the signature cookie just before the implicit arguments */
- add_general (&gr, &stack_size, &cinfo->sig_cookie);
+ add_general (&gr, param_regs, &stack_size, &cinfo->sig_cookie);
}
if (mono_do_x86_stack_align && (stack_size % MONO_ARCH_FRAME_ALIGNMENT) != 0) {
@@ -680,15 +704,21 @@ mono_arch_get_argument_info (MonoGenericSharingContext *gsctx, MonoMethodSignatu
}
gboolean
-mono_x86_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig)
+mono_arch_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig)
{
+ MonoType *callee_ret;
CallInfo *c1, *c2;
gboolean res;
c1 = get_call_info (NULL, NULL, caller_sig);
c2 = get_call_info (NULL, NULL, callee_sig);
+ /*
+ * Tail calls with more callee stack usage than the caller cannot be supported, since
+ * the extra stack space would be left on the stack after the tail call.
+ */
res = c1->stack_usage >= c2->stack_usage;
- if (callee_sig->ret && MONO_TYPE_ISSTRUCT (callee_sig->ret) && c2->ret.storage != ArgValuetypeInReg)
+ callee_ret = callee_sig->ret;
+ if (callee_ret && MONO_TYPE_ISSTRUCT (callee_ret) && c2->ret.storage != ArgValuetypeInReg)
/* An address on the callee's stack is passed as the first argument */
res = FALSE;
@@ -698,129 +728,6 @@ mono_x86_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignatu
return res;
}
-#if !defined(__native_client__)
-static const guchar cpuid_impl [] = {
- 0x55, /* push %ebp */
- 0x89, 0xe5, /* mov %esp,%ebp */
- 0x53, /* push %ebx */
- 0x8b, 0x45, 0x08, /* mov 0x8(%ebp),%eax */
- 0x0f, 0xa2, /* cpuid */
- 0x50, /* push %eax */
- 0x8b, 0x45, 0x10, /* mov 0x10(%ebp),%eax */
- 0x89, 0x18, /* mov %ebx,(%eax) */
- 0x8b, 0x45, 0x14, /* mov 0x14(%ebp),%eax */
- 0x89, 0x08, /* mov %ecx,(%eax) */
- 0x8b, 0x45, 0x18, /* mov 0x18(%ebp),%eax */
- 0x89, 0x10, /* mov %edx,(%eax) */
- 0x58, /* pop %eax */
- 0x8b, 0x55, 0x0c, /* mov 0xc(%ebp),%edx */
- 0x89, 0x02, /* mov %eax,(%edx) */
- 0x5b, /* pop %ebx */
- 0xc9, /* leave */
- 0xc3, /* ret */
-};
-#else
-static const guchar cpuid_impl [] = {
- 0x55, /* push %ebp */
- 0x89, 0xe5, /* mov %esp,%ebp */
- 0x53, /* push %ebx */
- 0x8b, 0x45, 0x08, /* mov 0x8(%ebp),%eax */
- 0x0f, 0xa2, /* cpuid */
- 0x50, /* push %eax */
- 0x8b, 0x45, 0x10, /* mov 0x10(%ebp),%eax */
- 0x89, 0x18, /* mov %ebx,(%eax) */
- 0x8b, 0x45, 0x14, /* mov 0x14(%ebp),%eax */
- 0x89, 0x08, /* mov %ecx,(%eax) */
- 0x8b, 0x45, 0x18, /* mov 0x18(%ebp),%eax */
- 0x89, 0x10, /* mov %edx,(%eax) */
- 0x58, /* pop %eax */
- 0x8b, 0x55, 0x0c, /* mov 0xc(%ebp),%edx */
- 0x89, 0x02, /* mov %eax,(%edx) */
- 0x5b, /* pop %ebx */
- 0xc9, /* leave */
- 0x59, 0x83, 0xe1, 0xe0, 0xff, 0xe1, /* naclret */
- 0xf4, 0xf4, 0xf4, 0xf4, 0xf4, 0xf4, /* padding, to provide bundle aligned version */
- 0xf4, 0xf4, 0xf4, 0xf4, 0xf4, 0xf4,
- 0xf4, 0xf4, 0xf4, 0xf4, 0xf4, 0xf4,
- 0xf4, 0xf4, 0xf4, 0xf4, 0xf4, 0xf4,
- 0xf4
-};
-#endif
-
-typedef void (*CpuidFunc) (int id, int* p_eax, int* p_ebx, int* p_ecx, int* p_edx);
-
-static int
-cpuid (int id, int* p_eax, int* p_ebx, int* p_ecx, int* p_edx)
-{
-#if defined(__native_client__)
- static CpuidFunc func = NULL;
- void *ptr, *end_ptr;
- if (!func) {
- ptr = mono_global_codeman_reserve (sizeof (cpuid_impl));
- memcpy(ptr, cpuid_impl, sizeof(cpuid_impl));
- end_ptr = ptr + sizeof(cpuid_impl);
- nacl_global_codeman_validate (&ptr, sizeof(cpuid_impl), &end_ptr);
- func = (CpuidFunc)ptr;
- }
- func (id, p_eax, p_ebx, p_ecx, p_edx);
-#else
- int have_cpuid = 0;
-#ifndef _MSC_VER
- __asm__ __volatile__ (
- "pushfl\n"
- "popl %%eax\n"
- "movl %%eax, %%edx\n"
- "xorl $0x200000, %%eax\n"
- "pushl %%eax\n"
- "popfl\n"
- "pushfl\n"
- "popl %%eax\n"
- "xorl %%edx, %%eax\n"
- "andl $0x200000, %%eax\n"
- "movl %%eax, %0"
- : "=r" (have_cpuid)
- :
- : "%eax", "%edx"
- );
-#else
- __asm {
- pushfd
- pop eax
- mov edx, eax
- xor eax, 0x200000
- push eax
- popfd
- pushfd
- pop eax
- xor eax, edx
- and eax, 0x200000
- mov have_cpuid, eax
- }
-#endif
- if (have_cpuid) {
- /* Have to use the code manager to get around WinXP DEP */
- static CpuidFunc func = NULL;
- void *ptr;
- if (!func) {
- ptr = mono_global_codeman_reserve (sizeof (cpuid_impl));
- memcpy (ptr, cpuid_impl, sizeof (cpuid_impl));
- func = (CpuidFunc)ptr;
- }
- func (id, p_eax, p_ebx, p_ecx, p_edx);
-
- /*
- * We use this approach because of issues with gcc and pic code, see:
- * http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7329
- __asm__ __volatile__ ("cpuid"
- : "=a" (*p_eax), "=b" (*p_ebx), "=c" (*p_ecx), "=d" (*p_edx)
- : "a" (id));
- */
- return 1;
- }
- return 0;
-#endif
-}
-
/*
* Initialize the cpu to execute managed code.
*/
@@ -880,36 +787,32 @@ guint32
mono_arch_cpu_optimizations (guint32 *exclude_mask)
{
#if !defined(__native_client__)
- int eax, ebx, ecx, edx;
guint32 opts = 0;
-
+
*exclude_mask = 0;
- if (mono_aot_only)
- /* The cpuid function allocates from the global codeman */
- return opts;
+ if (mono_hwcap_x86_has_cmov) {
+ opts |= MONO_OPT_CMOV;
- /* Feature Flags function, flags returned in EDX. */
- if (cpuid (1, &eax, &ebx, &ecx, &edx)) {
- if (edx & (1 << 15)) {
- opts |= MONO_OPT_CMOV;
- if (edx & 1)
- opts |= MONO_OPT_FCMOV;
- else
- *exclude_mask |= MONO_OPT_FCMOV;
- } else
- *exclude_mask |= MONO_OPT_CMOV;
- if (edx & (1 << 26))
- opts |= MONO_OPT_SSE2;
+ if (mono_hwcap_x86_has_fcmov)
+ opts |= MONO_OPT_FCMOV;
else
- *exclude_mask |= MONO_OPT_SSE2;
+ *exclude_mask |= MONO_OPT_FCMOV;
+ } else {
+ *exclude_mask |= MONO_OPT_CMOV;
+ }
+
+ if (mono_hwcap_x86_has_sse2)
+ opts |= MONO_OPT_SSE2;
+ else
+ *exclude_mask |= MONO_OPT_SSE2;
#ifdef MONO_ARCH_SIMD_INTRINSICS
/*SIMD intrinsics require at least SSE2.*/
- if (!(opts & MONO_OPT_SSE2))
+ if (!mono_hwcap_x86_has_sse2)
*exclude_mask |= MONO_OPT_SIMD;
#endif
- }
+
return opts;
#else
return MONO_OPT_CMOV | MONO_OPT_FCMOV | MONO_OPT_SSE2;
@@ -925,42 +828,30 @@ mono_arch_cpu_optimizations (guint32 *exclude_mask)
guint32
mono_arch_cpu_enumerate_simd_versions (void)
{
- int eax, ebx, ecx, edx;
guint32 sse_opts = 0;
- if (mono_aot_only)
- /* The cpuid function allocates from the global codeman */
- return sse_opts;
-
- if (cpuid (1, &eax, &ebx, &ecx, &edx)) {
- if (edx & (1 << 25))
- sse_opts |= SIMD_VERSION_SSE1;
- if (edx & (1 << 26))
- sse_opts |= SIMD_VERSION_SSE2;
- if (ecx & (1 << 0))
- sse_opts |= SIMD_VERSION_SSE3;
- if (ecx & (1 << 9))
- sse_opts |= SIMD_VERSION_SSSE3;
- if (ecx & (1 << 19))
- sse_opts |= SIMD_VERSION_SSE41;
- if (ecx & (1 << 20))
- sse_opts |= SIMD_VERSION_SSE42;
- }
+ if (mono_hwcap_x86_has_sse1)
+ sse_opts |= SIMD_VERSION_SSE1;
- /* Yes, all this needs to be done to check for sse4a.
- See: "Amd: CPUID Specification"
- */
- if (cpuid (0x80000000, &eax, &ebx, &ecx, &edx)) {
- /* eax greater or equal than 0x80000001, ebx = 'htuA', ecx = DMAc', edx = 'itne'*/
- if ((((unsigned int) eax) >= 0x80000001) && (ebx == 0x68747541) && (ecx == 0x444D4163) && (edx == 0x69746E65)) {
- cpuid (0x80000001, &eax, &ebx, &ecx, &edx);
- if (ecx & (1 << 6))
- sse_opts |= SIMD_VERSION_SSE4a;
- }
- }
+ if (mono_hwcap_x86_has_sse2)
+ sse_opts |= SIMD_VERSION_SSE2;
+
+ if (mono_hwcap_x86_has_sse3)
+ sse_opts |= SIMD_VERSION_SSE3;
+ if (mono_hwcap_x86_has_ssse3)
+ sse_opts |= SIMD_VERSION_SSSE3;
- return sse_opts;
+ if (mono_hwcap_x86_has_sse41)
+ sse_opts |= SIMD_VERSION_SSE41;
+
+ if (mono_hwcap_x86_has_sse42)
+ sse_opts |= SIMD_VERSION_SSE42;
+
+ if (mono_hwcap_x86_has_sse4a)
+ sse_opts |= SIMD_VERSION_SSE4a;
+
+ return sse_opts;
}
/*
@@ -1302,16 +1193,18 @@ mono_arch_allocate_vars (MonoCompile *cfg)
void
mono_arch_create_vars (MonoCompile *cfg)
{
+ MonoType *sig_ret;
MonoMethodSignature *sig;
CallInfo *cinfo;
sig = mono_method_signature (cfg->method);
cinfo = get_call_info (cfg->generic_sharing_context, cfg->mempool, sig);
+ sig_ret = sig->ret;
if (cinfo->ret.storage == ArgValuetypeInReg)
cfg->ret_var_is_local = TRUE;
- if ((cinfo->ret.storage != ArgValuetypeInReg) && (MONO_TYPE_ISSTRUCT (sig->ret) || mini_is_gsharedvt_variable_type (cfg, sig->ret))) {
+ if ((cinfo->ret.storage != ArgValuetypeInReg) && (MONO_TYPE_ISSTRUCT (sig_ret) || mini_is_gsharedvt_variable_type (cfg, sig_ret))) {
cfg->vret_addr = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_ARG);
}
@@ -1379,11 +1272,12 @@ mono_arch_get_llvm_call_info (MonoCompile *cfg, MonoMethodSignature *sig)
CallInfo *cinfo;
ArgInfo *ainfo;
LLVMCallInfo *linfo;
- MonoType *t;
+ MonoType *t, *sig_ret;
n = sig->param_count + sig->hasthis;
cinfo = get_call_info (cfg->generic_sharing_context, cfg->mempool, sig);
+ sig_ret = sig->ret;
linfo = mono_mempool_alloc0 (cfg->mempool, sizeof (LLVMCallInfo) + (sizeof (LLVMArgInfo) * n));
@@ -1409,13 +1303,13 @@ mono_arch_get_llvm_call_info (MonoCompile *cfg, MonoMethodSignature *sig)
*/
}
- if (mini_type_is_vtype (cfg, sig->ret) && cinfo->ret.storage == ArgInIReg) {
+ if (mini_type_is_vtype (cfg, sig_ret) && cinfo->ret.storage == ArgInIReg) {
/* Vtype returned using a hidden argument */
linfo->ret.storage = LLVMArgVtypeRetAddr;
linfo->vret_arg_index = cinfo->vret_arg_index;
}
- if (mini_type_is_vtype (cfg, sig->ret) && cinfo->ret.storage != ArgInIReg) {
+ if (mini_type_is_vtype (cfg, sig_ret) && cinfo->ret.storage != ArgInIReg) {
// FIXME:
cfg->exception_message = g_strdup ("vtype ret in call");
cfg->disable_llvm = TRUE;
@@ -1501,6 +1395,7 @@ emit_gc_param_slot_def (MonoCompile *cfg, int sp_offset, MonoType *t)
void
mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
{
+ MonoType *sig_ret;
MonoInst *arg, *in;
MonoMethodSignature *sig;
int i, j, n;
@@ -1509,6 +1404,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
sig = call->signature;
n = sig->param_count + sig->hasthis;
+ sig_ret = sig->ret;
cinfo = get_call_info (cfg->generic_sharing_context, cfg->mempool, sig);
@@ -1528,7 +1424,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
}
}
- if (sig->ret && MONO_TYPE_ISSTRUCT (sig->ret)) {
+ if (sig_ret && MONO_TYPE_ISSTRUCT (sig_ret)) {
if (cinfo->ret.storage == ArgValuetypeInReg) {
/*
* Tell the JIT to use a more efficient calling convention: call using
@@ -1587,6 +1483,8 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
arg->opcode = OP_OUTARG_VT;
arg->sreg1 = in->dreg;
arg->klass = in->klass;
+ arg->inst_p1 = mono_mempool_alloc (cfg->mempool, sizeof (ArgInfo));
+ memcpy (arg->inst_p1, ainfo, sizeof (ArgInfo));
sp_offset += 4;
MONO_ADD_INS (cfg->cbb, arg);
} else if ((i >= sig->hasthis) && (MONO_TYPE_ISSTRUCT(t))) {
@@ -1608,10 +1506,15 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
arg->sreg1 = in->dreg;
arg->klass = in->klass;
arg->backend.size = size;
+ arg->inst_p0 = call;
+ arg->inst_p1 = mono_mempool_alloc (cfg->mempool, sizeof (ArgInfo));
+ memcpy (arg->inst_p1, ainfo, sizeof (ArgInfo));
MONO_ADD_INS (cfg->cbb, arg);
- sp_offset += size;
- emit_gc_param_slot_def (cfg, sp_offset, orig_type);
+ if (ainfo->storage != ArgValuetypeInReg) {
+ sp_offset += size;
+ emit_gc_param_slot_def (cfg, sp_offset, orig_type);
+ }
}
} else {
argsize = 4;
@@ -1639,6 +1542,11 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
}
}
break;
+ case ArgInIReg:
+ arg->opcode = OP_MOVE;
+ arg->dreg = ainfo->reg;
+ argsize = 0;
+ break;
default:
g_assert_not_reached ();
}
@@ -1676,7 +1584,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
}
}
- if (sig->ret && (MONO_TYPE_ISSTRUCT (sig->ret) || cinfo->vtype_retaddr)) {
+ if (sig_ret && (MONO_TYPE_ISSTRUCT (sig_ret) || cinfo->vtype_retaddr)) {
MonoInst *vtarg;
if (cinfo->ret.storage == ArgValuetypeInReg) {
@@ -1714,29 +1622,51 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
void
mono_arch_emit_outarg_vt (MonoCompile *cfg, MonoInst *ins, MonoInst *src)
{
+ MonoCallInst *call = (MonoCallInst*)ins->inst_p0;
+ ArgInfo *ainfo = ins->inst_p1;
MonoInst *arg;
int size = ins->backend.size;
- if (cfg->gsharedvt && mini_is_gsharedvt_klass (cfg, ins->klass)) {
- /* Pass by addr */
- MONO_INST_NEW (cfg, arg, OP_X86_PUSH);
- arg->sreg1 = src->dreg;
- MONO_ADD_INS (cfg->cbb, arg);
- } else if (size <= 4) {
- MONO_INST_NEW (cfg, arg, OP_X86_PUSH_MEMBASE);
- arg->sreg1 = src->dreg;
+ if (ainfo->storage == ArgValuetypeInReg) {
+ int dreg = mono_alloc_ireg (cfg);
+ switch (size) {
+ case 1:
+ MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU1_MEMBASE, dreg, src->dreg, 0);
+ break;
+ case 2:
+ MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, dreg, src->dreg, 0);
+ break;
+ case 4:
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, dreg, src->dreg, 0);
+ break;
+ case 3: /* FIXME */
+ default:
+ g_assert_not_reached ();
+ }
+ mono_call_inst_add_outarg_reg (cfg, call, dreg, ainfo->reg, FALSE);
+ }
+ else {
+ if (cfg->gsharedvt && mini_is_gsharedvt_klass (cfg, ins->klass)) {
+ /* Pass by addr */
+ MONO_INST_NEW (cfg, arg, OP_X86_PUSH);
+ arg->sreg1 = src->dreg;
+ MONO_ADD_INS (cfg->cbb, arg);
+ } else if (size <= 4) {
+ MONO_INST_NEW (cfg, arg, OP_X86_PUSH_MEMBASE);
+ arg->sreg1 = src->dreg;
- MONO_ADD_INS (cfg->cbb, arg);
- } else if (size <= 20) {
- MONO_EMIT_NEW_BIALU_IMM (cfg, OP_SUB_IMM, X86_ESP, X86_ESP, ALIGN_TO (size, 4));
- mini_emit_memcpy (cfg, X86_ESP, 0, src->dreg, 0, size, 4);
- } else {
- MONO_INST_NEW (cfg, arg, OP_X86_PUSH_OBJ);
- arg->inst_basereg = src->dreg;
- arg->inst_offset = 0;
- arg->inst_imm = size;
+ MONO_ADD_INS (cfg->cbb, arg);
+ } else if (size <= 20) {
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_SUB_IMM, X86_ESP, X86_ESP, ALIGN_TO (size, 4));
+ mini_emit_memcpy (cfg, X86_ESP, 0, src->dreg, 0, size, 4);
+ } else {
+ MONO_INST_NEW (cfg, arg, OP_X86_PUSH_OBJ);
+ arg->inst_basereg = src->dreg;
+ arg->inst_offset = 0;
+ arg->inst_imm = size;
- MONO_ADD_INS (cfg->cbb, arg);
+ MONO_ADD_INS (cfg->cbb, arg);
+ }
}
}
@@ -3193,48 +3123,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
case OP_MOVE:
x86_mov_reg_reg (code, ins->dreg, ins->sreg1, 4);
break;
- case OP_JMP: {
- /*
- * Note: this 'frame destruction' logic is useful for tail calls, too.
- * Keep in sync with the code in emit_epilog.
- */
- int pos = 0;
-
- /* FIXME: no tracing support... */
- if (cfg->prof_options & MONO_PROFILE_ENTER_LEAVE)
- code = mono_arch_instrument_epilog (cfg, mono_profiler_method_leave, code, FALSE);
- /* reset offset to make max_len work */
- offset = code - cfg->native_code;
-
- g_assert (!cfg->method->save_lmf);
-
- code = emit_load_volatile_arguments (cfg, code);
-
- if (cfg->used_int_regs & (1 << X86_EBX))
- pos -= 4;
- if (cfg->used_int_regs & (1 << X86_EDI))
- pos -= 4;
- if (cfg->used_int_regs & (1 << X86_ESI))
- pos -= 4;
- if (pos)
- x86_lea_membase (code, X86_ESP, X86_EBP, pos);
-
- if (cfg->used_int_regs & (1 << X86_ESI))
- x86_pop_reg (code, X86_ESI);
- if (cfg->used_int_regs & (1 << X86_EDI))
- x86_pop_reg (code, X86_EDI);
- if (cfg->used_int_regs & (1 << X86_EBX))
- x86_pop_reg (code, X86_EBX);
-
- /* restore ESP/EBP */
- x86_leave (code);
- offset = code - cfg->native_code;
- mono_add_patch_info (cfg, offset, MONO_PATCH_INFO_METHOD_JUMP, ins->inst_p0);
- x86_jump32 (code, 0);
-
- cfg->disable_aot = TRUE;
- break;
- }
case OP_TAILCALL: {
MonoCallInst *call = (MonoCallInst*)ins;
int pos = 0, i;
@@ -5038,8 +4926,6 @@ mono_arch_patch_code (MonoMethod *method, MonoDomain *domain, guint8 *code, Mono
unsigned char *ip = patch_info->ip.i + code;
const unsigned char *target;
- target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors);
-
if (compile_aot) {
switch (patch_info->type) {
case MONO_PATCH_INFO_BB:
@@ -5051,6 +4937,8 @@ mono_arch_patch_code (MonoMethod *method, MonoDomain *domain, guint8 *code, Mono
}
}
+ target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors);
+
switch (patch_info->type) {
case MONO_PATCH_INFO_IP:
*((gconstpointer *)(ip)) = target;
@@ -5265,16 +5153,21 @@ mono_arch_emit_prolog (MonoCompile *cfg)
* This is performance critical so we try to use some tricks to make
* it fast.
*/
+ gboolean have_fastpath = FALSE;
- if (lmf_addr_tls_offset != -1) {
- /* Load lmf quicky using the GS register */
- code = mono_x86_emit_tls_get (code, X86_EAX, lmf_addr_tls_offset);
#ifdef TARGET_WIN32
- /* The TLS key actually contains a pointer to the MonoJitTlsData structure */
- /* FIXME: Add a separate key for LMF to avoid this */
+ if (jit_tls_offset != -1) {
+ code = mono_x86_emit_tls_get (code, X86_EAX, jit_tls_offset);
x86_alu_reg_imm (code, X86_ADD, X86_EAX, G_STRUCT_OFFSET (MonoJitTlsData, lmf));
+ have_fastpath = TRUE;
+ }
+#else
+ if (lmf_addr_tls_offset != -1) {
+ code = mono_x86_emit_tls_get (code, X86_EAX, lmf_addr_tls_offset);
+ have_fastpath = TRUE;
+ }
#endif
- } else {
+ if (!have_fastpath) {
if (cfg->compile_aot)
code = mono_arch_emit_load_got_addr (cfg->native_code, code, cfg, NULL);
code = emit_call (cfg, code, MONO_PATCH_INFO_INTERNAL_METHOD, (gpointer)"mono_get_lmf_addr");
@@ -5490,7 +5383,7 @@ mono_arch_emit_epilog (MonoCompile *cfg)
if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
code = mono_arch_instrument_epilog (cfg, mono_trace_leave_method, code, TRUE);
- /* the code restoring the registers must be kept in sync with OP_JMP */
+ /* the code restoring the registers must be kept in sync with OP_TAILCALL */
pos = 0;
if (method->save_lmf) {
@@ -5765,20 +5658,20 @@ mono_arch_is_inst_imm (gint64 imm)
void
mono_arch_finish_init (void)
{
- if (!getenv ("MONO_NO_TLS")) {
+ if (!g_getenv ("MONO_NO_TLS")) {
#ifdef TARGET_WIN32
/*
* We need to init this multiple times, since when we are first called, the key might not
* be initialized yet.
*/
appdomain_tls_offset = mono_domain_get_tls_key ();
- lmf_tls_offset = mono_get_jit_tls_key ();
+ jit_tls_offset = mono_get_jit_tls_key ();
/* Only 64 tls entries can be accessed using inline code */
if (appdomain_tls_offset >= 64)
appdomain_tls_offset = -1;
- if (lmf_tls_offset >= 64)
- lmf_tls_offset = -1;
+ if (jit_tls_offset >= 64)
+ jit_tls_offset = -1;
#else
#if MONO_XEN_OPT
optimize_for_xen = access ("/proc/xen", F_OK) == 0;
@@ -6273,13 +6166,16 @@ mono_arch_get_delegate_invoke_impls (void)
guint8 *code;
guint32 code_len;
int i;
+ char *tramp_name;
code = get_delegate_invoke_impl (TRUE, 0, &code_len);
- res = g_slist_prepend (res, mono_tramp_info_create (g_strdup ("delegate_invoke_impl_has_target"), code, code_len, NULL, NULL));
+ res = g_slist_prepend (res, mono_tramp_info_create ("delegate_invoke_impl_has_target", code, code_len, NULL, NULL));
for (i = 0; i < MAX_ARCH_DELEGATE_PARAMS; ++i) {
code = get_delegate_invoke_impl (FALSE, i, &code_len);
- res = g_slist_prepend (res, mono_tramp_info_create (g_strdup_printf ("delegate_invoke_impl_target_%d", i), code, code_len, NULL, NULL));
+ tramp_name = g_strdup_printf ("delegate_invoke_impl_target_%d", i);
+ res = g_slist_prepend (res, mono_tramp_info_create (tramp_name, code, code_len, NULL, NULL));
+ g_free (tramp_name);
}
return res;
@@ -6745,7 +6641,7 @@ mono_arch_is_single_step_event (void *info, void *sigctx)
#ifdef TARGET_WIN32
EXCEPTION_RECORD* einfo = ((EXCEPTION_POINTERS*)info)->ExceptionRecord; /* Sometimes the address is off by 4 */
- if ((einfo->ExceptionInformation[1] >= ss_trigger_page && (guint8*)einfo->ExceptionInformation[1] <= (guint8*)ss_trigger_page + 128))
+ if (((gpointer)einfo->ExceptionInformation[1] >= ss_trigger_page && (guint8*)einfo->ExceptionInformation[1] <= (guint8*)ss_trigger_page + 128))
return TRUE;
else
return FALSE;
@@ -6764,7 +6660,7 @@ mono_arch_is_breakpoint_event (void *info, void *sigctx)
{
#ifdef TARGET_WIN32
EXCEPTION_RECORD* einfo = ((EXCEPTION_POINTERS*)info)->ExceptionRecord; /* Sometimes the address is off by 4 */
- if ((einfo->ExceptionInformation[1] >= bp_trigger_page && (guint8*)einfo->ExceptionInformation[1] <= (guint8*)bp_trigger_page + 128))
+ if (((gpointer)einfo->ExceptionInformation[1] >= bp_trigger_page && (guint8*)einfo->ExceptionInformation[1] <= (guint8*)bp_trigger_page + 128))
return TRUE;
else
return FALSE;
diff --git a/mono/mini/mini-x86.h b/mono/mini/mini-x86.h
index 20d2eeb329a..b783be38612 100644
--- a/mono/mini/mini-x86.h
+++ b/mono/mini/mini-x86.h
@@ -262,16 +262,12 @@ typedef struct {
#define MONO_ARCH_HAVE_CONTEXT_SET_INT_REG 1
#define MONO_ARCH_HAVE_SETUP_ASYNC_CALLBACK 1
#define MONO_ARCH_GSHAREDVT_SUPPORTED 1
+#define MONO_ARCH_HAVE_OP_TAIL_CALL 1
#ifdef TARGET_OSX
#define MONO_ARCH_HAVE_TLS_GET_REG 1
#endif
-gboolean
-mono_x86_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig) MONO_INTERNAL;
-
-#define MONO_ARCH_USE_OP_TAIL_CALL(caller_sig, callee_sig) mono_x86_tail_call_supported (caller_sig, callee_sig)
-
/* Used for optimization, not complete */
#define MONO_ARCH_IS_OP_MEMBASE(opcode) ((opcode) == OP_X86_PUSH_MEMBASE)
diff --git a/mono/mini/mini.c b/mono/mini/mini.c
index 34c5810b662..5584e0be73a 100644
--- a/mono/mini/mini.c
+++ b/mono/mini/mini.c
@@ -56,7 +56,9 @@
#include <mono/utils/mono-mmap.h>
#include <mono/utils/mono-path.h>
#include <mono/utils/mono-tls.h>
+#include <mono/utils/mono-hwcap.h>
#include <mono/utils/dtrace.h>
+#include <mono/utils/mono-signal-handler.h>
#include "mini.h"
#include "mini-llvm.h"
@@ -73,6 +75,13 @@
#include "mini-gc.h"
#include "debugger-agent.h"
+/* this macro is used for a runtime check done in mini_init () */
+#ifdef MONO_ARCH_EMULATE_MUL_DIV
+#define EMUL_MUL_DIV 1
+#else
+#define EMUL_MUL_DIV 0
+#endif
+
static gpointer mono_jit_compile_method_with_opt (MonoMethod *method, guint32 opt, MonoException **ex);
@@ -145,6 +154,8 @@ gboolean disable_vtypes_in_regs = FALSE;
gboolean mono_dont_free_global_codeman;
+static GSList *tramp_infos;
+
gpointer
mono_realloc_native_code (MonoCompile *cfg)
{
@@ -318,9 +329,9 @@ get_method_from_ip (void *ip)
else
return NULL;
}
- method = mono_method_full_name (ji->method, TRUE);
+ method = mono_method_full_name (jinfo_get_method (ji), TRUE);
/* FIXME: unused ? */
- location = mono_debug_lookup_source_location (ji->method, (guint32)((guint8*)ip - (guint8*)ji->code_start), domain);
+ location = mono_debug_lookup_source_location (jinfo_get_method (ji), (guint32)((guint8*)ip - (guint8*)ji->code_start), domain);
res = g_strdup_printf (" %s + 0x%x (%p %p) [%p - %s]", method, (int)((char*)ip - (char*)ji->code_start), ji->code_start, (char*)ji->code_start + ji->code_size, domain, domain->friendly_name);
@@ -374,6 +385,7 @@ mono_print_method_from_ip (void *ip)
FindTrampUserData user_data;
MonoGenericSharingContext*gsctx;
const char *shared_type;
+ GSList *l;
ji = mini_jit_info_table_find (domain, ip, &target_domain);
if (!ji) {
@@ -386,14 +398,23 @@ mono_print_method_from_ip (void *ip)
char *mname = mono_method_full_name (user_data.method, TRUE);
printf ("IP %p is a JIT trampoline for %s\n", ip, mname);
g_free (mname);
+ return;
}
- else
- g_print ("No method at %p\n", ip);
+ for (l = tramp_infos; l; l = l->next) {
+ MonoTrampInfo *tinfo = l->data;
+
+ if ((guint8*)ip >= tinfo->code && (guint8*)ip <= tinfo->code + tinfo->code_size) {
+ printf ("IP %p is at offset 0x%x of trampoline '%s'.\n", ip, (int)((guint8*)ip - tinfo->code), tinfo->name);
+ return;
+ }
+ }
+
+ g_print ("No method at %p\n", ip);
fflush (stdout);
return;
}
- method = mono_method_full_name (ji->method, TRUE);
- source = mono_debug_lookup_source_location (ji->method, (guint32)((guint8*)ip - (guint8*)ji->code_start), target_domain);
+ method = mono_method_full_name (jinfo_get_method (ji), TRUE);
+ source = mono_debug_lookup_source_location (jinfo_get_method (ji), (guint32)((guint8*)ip - (guint8*)ji->code_start), target_domain);
gsctx = mono_jit_info_get_generic_sharing_context (ji);
shared_type = "";
@@ -422,6 +443,8 @@ mono_print_method_from_ip (void *ip)
*/
gboolean mono_method_same_domain (MonoJitInfo *caller, MonoJitInfo *callee)
{
+ MonoMethod *cmethod;
+
if (!caller || !callee)
return FALSE;
@@ -432,8 +455,9 @@ gboolean mono_method_same_domain (MonoJitInfo *caller, MonoJitInfo *callee)
if (caller->domain_neutral && !callee->domain_neutral)
return FALSE;
- if ((caller->method->klass == mono_defaults.appdomain_class) &&
- (strstr (caller->method->name, "InvokeInDomain"))) {
+ cmethod = jinfo_get_method (caller);
+ if ((cmethod->klass == mono_defaults.appdomain_class) &&
+ (strstr (cmethod->name, "InvokeInDomain"))) {
/* The InvokeInDomain methods change the current appdomain */
return FALSE;
}
@@ -570,6 +594,22 @@ mono_emit_unwind_op (MonoCompile *cfg, int when, int tag, int reg, int val)
op->when = when;
cfg->unwind_ops = g_slist_append_mempool (cfg->mempool, cfg->unwind_ops, op);
+ if (cfg->verbose_level > 1) {
+ switch (tag) {
+ case DW_CFA_def_cfa:
+ printf ("CFA: [%x] def_cfa: %s+0x%x\n", when, mono_arch_regname (reg), val);
+ break;
+ case DW_CFA_def_cfa_register:
+ printf ("CFA: [%x] def_cfa_reg: %s\n", when, mono_arch_regname (reg));
+ break;
+ case DW_CFA_def_cfa_offset:
+ printf ("CFA: [%x] def_cfa_offset: 0x%x\n", when, val);
+ break;
+ case DW_CFA_offset:
+ printf ("CFA: [%x] offset: %s at cfa-0x%x\n", when, mono_arch_regname (reg), -val);
+ break;
+ }
+ }
}
MonoJumpInfoToken *
@@ -625,6 +665,38 @@ mono_tramp_info_free (MonoTrampInfo *info)
g_free (info);
}
+/*
+ * mono_tramp_info_register:
+ *
+ * Remember INFO for use by xdebug, mono_print_method_from_ip (), jit maps, etc.
+ * INFO can be NULL.
+ * Frees INFO.
+ */
+void
+mono_tramp_info_register (MonoTrampInfo *info)
+{
+ MonoTrampInfo *copy;
+
+ if (!info)
+ return;
+
+ copy = g_new0 (MonoTrampInfo, 1);
+ copy->code = info->code;
+ copy->code_size = info->code_size;
+ copy->name = g_strdup (info->name);
+
+ mono_loader_lock_if_inited ();
+ tramp_infos = g_slist_prepend (tramp_infos, copy);
+ mono_loader_unlock_if_inited ();
+
+ mono_save_trampoline_xdebug_info (info);
+
+ if (mono_jit_map_is_enabled ())
+ mono_emit_jit_tramp (info->code, info->code_size, info->name);
+
+ mono_tramp_info_free (info);
+}
+
G_GNUC_UNUSED static void
break_count (void)
{
@@ -640,14 +712,14 @@ mono_debug_count (void)
static int count = 0;
count ++;
- if (!getenv ("COUNT"))
+ if (!g_getenv ("COUNT"))
return TRUE;
- if (count == atoi (getenv ("COUNT"))) {
+ if (count == atoi (g_getenv ("COUNT"))) {
break_count ();
}
- if (count > atoi (getenv ("COUNT"))) {
+ if (count > atoi (g_getenv ("COUNT"))) {
return FALSE;
}
@@ -1202,11 +1274,11 @@ mono_compile_create_var_for_vreg (MonoCompile *cfg, MonoType *type, int opcode,
set_vreg_to_inst (cfg, vreg, inst);
#if SIZEOF_REGISTER == 4
-#ifdef MONO_ARCH_SOFT_FLOAT
- regpair = mono_type_is_long (type) || mono_type_is_float (type);
-#else
- regpair = mono_type_is_long (type);
-#endif
+ if (mono_arch_is_soft_float ()) {
+ regpair = mono_type_is_long (type) || mono_type_is_float (type);
+ } else {
+ regpair = mono_type_is_long (type);
+ }
#else
regpair = FALSE;
#endif
@@ -1227,12 +1299,10 @@ mono_compile_create_var_for_vreg (MonoCompile *cfg, MonoType *type, int opcode,
printf (" Create LVAR R%d (R%d, R%d)\n", inst->dreg, inst->dreg + 1, inst->dreg + 2);
}
-#ifdef MONO_ARCH_SOFT_FLOAT
- if (cfg->opt & MONO_OPT_SSA) {
+ if (mono_arch_is_soft_float () && cfg->opt & MONO_OPT_SSA) {
if (mono_type_is_float (type))
inst->flags = MONO_INST_VOLATILE;
}
-#endif
/* Allocate a dummy MonoInst for the first vreg */
MONO_INST_NEW (cfg, tree, OP_LOCAL);
@@ -1272,10 +1342,8 @@ mono_compile_create_var (MonoCompile *cfg, MonoType *type, int opcode)
if (mono_type_is_long (type))
dreg = mono_alloc_dreg (cfg, STACK_I8);
-#ifdef MONO_ARCH_SOFT_FLOAT
- else if (mono_type_is_float (type))
+ else if (mono_arch_is_soft_float () && mono_type_is_float (type))
dreg = mono_alloc_dreg (cfg, STACK_R8);
-#endif
else
/* All the others are unified */
dreg = mono_alloc_preg (cfg);
@@ -1952,9 +2020,9 @@ mono_allocate_stack_slots2 (MonoCompile *cfg, gboolean backward, guint32 *stack_
static int count = 0;
count ++;
- if (count == atoi (getenv ("COUNT3")))
+ if (count == atoi (g_getenv ("COUNT3")))
printf ("LAST: %s\n", mono_method_full_name (cfg->method, TRUE));
- if (count > atoi (getenv ("COUNT3")))
+ if (count > atoi (g_getenv ("COUNT3")))
slot = 0xffffff;
else {
mono_print_ins (inst);
@@ -2198,9 +2266,9 @@ mono_allocate_stack_slots (MonoCompile *cfg, gboolean backward, guint32 *stack_s
count ++;
/*
- if (count == atoi (getenv ("COUNT")))
+ if (count == atoi (g_getenv ("COUNT")))
printf ("LAST: %s\n", mono_method_full_name (cfg->method, TRUE));
- if (count > atoi (getenv ("COUNT")))
+ if (count > atoi (g_getenv ("COUNT")))
slot = 0xffffff;
else {
mono_print_ins (inst);
@@ -2849,7 +2917,7 @@ mini_thread_cleanup (MonoInternalThread *thread)
}
int
-mini_get_tls_offset (MonoJitTlsKey key)
+mini_get_tls_offset (MonoTlsKey key)
{
int offset;
@@ -2866,14 +2934,19 @@ mini_get_tls_offset (MonoJitTlsKey key)
case TLS_KEY_LMF:
offset = mono_get_lmf_tls_offset ();
break;
+ case TLS_KEY_LMF_ADDR:
+ offset = mono_get_lmf_addr_tls_offset ();
+ break;
default:
- g_assert_not_reached ();
- offset = -1;
+ offset = mono_tls_key_get_offset (key);
+ g_assert (offset != -1);
break;
}
return offset;
}
+#ifndef DISABLE_JIT
+
static MonoInst*
mono_create_tls_get_offset (MonoCompile *cfg, int offset)
{
@@ -2891,21 +2964,25 @@ mono_create_tls_get_offset (MonoCompile *cfg, int offset)
return ins;
}
-static MonoInst*
-mono_create_tls_get (MonoCompile *cfg, MonoJitTlsKey key)
+MonoInst*
+mono_create_tls_get (MonoCompile *cfg, MonoTlsKey key)
{
/*
* TLS offsets might be different at AOT time, so load them from a GOT slot and
* use a different opcode.
*/
- if (cfg->compile_aot && MONO_ARCH_HAVE_TLS_GET && ARCH_HAVE_TLS_GET_REG) {
- MonoInst *ins, *c;
-
- EMIT_NEW_TLS_OFFSETCONST (cfg, c, key);
- MONO_INST_NEW (cfg, ins, OP_TLS_GET_REG);
- ins->dreg = mono_alloc_preg (cfg);
- ins->sreg1 = c->dreg;
- return ins;
+ if (cfg->compile_aot) {
+ if (MONO_ARCH_HAVE_TLS_GET && ARCH_HAVE_TLS_GET_REG) {
+ MonoInst *ins, *c;
+
+ EMIT_NEW_TLS_OFFSETCONST (cfg, c, key);
+ MONO_INST_NEW (cfg, ins, OP_TLS_GET_REG);
+ ins->dreg = mono_alloc_preg (cfg);
+ ins->sreg1 = c->dreg;
+ return ins;
+ } else {
+ return NULL;
+ }
}
return mono_create_tls_get_offset (cfg, mini_get_tls_offset (key));
@@ -2935,6 +3012,14 @@ mono_get_lmf_intrinsic (MonoCompile* cfg)
return mono_create_tls_get (cfg, TLS_KEY_LMF);
}
+MonoInst*
+mono_get_lmf_addr_intrinsic (MonoCompile* cfg)
+{
+ return mono_create_tls_get (cfg, TLS_KEY_LMF_ADDR);
+}
+
+#endif /* !DISABLE_JIT */
+
void
mono_add_patch_info (MonoCompile *cfg, int ip, MonoJumpInfoType type, gconstpointer target)
{
@@ -2948,6 +3033,20 @@ mono_add_patch_info (MonoCompile *cfg, int ip, MonoJumpInfoType type, gconstpoin
cfg->patch_info = ji;
}
+void
+mono_add_patch_info_rel (MonoCompile *cfg, int ip, MonoJumpInfoType type, gconstpointer target, int relocation)
+{
+ MonoJumpInfo *ji = mono_mempool_alloc (cfg->mempool, sizeof (MonoJumpInfo));
+
+ ji->ip.i = ip;
+ ji->type = type;
+ ji->relocation = relocation;
+ ji->data.target = target;
+ ji->next = cfg->patch_info;
+
+ cfg->patch_info = ji;
+}
+
MonoJumpInfo *
mono_patch_info_list_prepend (MonoJumpInfo *list, int ip, MonoJumpInfoType type, gconstpointer target)
{
@@ -3094,6 +3193,9 @@ mono_patch_info_hash (gconstpointer data)
return (ji->type << 8) | ji->data.table->table_size;
case MONO_PATCH_INFO_GSHAREDVT_METHOD:
return (ji->type << 8) | (gssize)ji->data.gsharedvt_method->method;
+ case MONO_PATCH_INFO_OBJC_SELECTOR_REF:
+ /* Hash on the selector name */
+ return g_str_hash (ji->data.target);
default:
printf ("info type: %d\n", ji->type);
mono_print_ji (ji); printf ("\n");
@@ -3509,6 +3611,10 @@ mono_resolve_patch_target (MonoMethod *method, MonoDomain *domain, guint8 *code,
case MONO_PATCH_INFO_TLS_OFFSET:
target = GINT_TO_POINTER (mini_get_tls_offset (GPOINTER_TO_INT (patch_info->data.target)));
break;
+ case MONO_PATCH_INFO_OBJC_SELECTOR_REF: {
+ target = NULL;
+ break;
+ }
default:
g_assert_not_reached ();
}
@@ -3607,6 +3713,13 @@ mono_compile_create_vars (MonoCompile *cfg)
g_print ("locals done\n");
mono_arch_create_vars (cfg);
+
+ if (cfg->method->save_lmf && cfg->create_lmf_var) {
+ MonoInst *lmf_var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
+ lmf_var->flags |= MONO_INST_VOLATILE;
+ lmf_var->flags |= MONO_INST_LMF;
+ cfg->lmf_var = lmf_var;
+ }
}
void
@@ -3755,7 +3868,7 @@ mono_save_seq_point_info (MonoCompile *cfg)
if (!cfg->seq_points)
return;
- info = g_malloc0 (sizeof (MonoSeqPointInfo) + (cfg->seq_points->len - MONO_ZERO_LEN_ARRAY) * sizeof (SeqPoint));
+ info = g_malloc0 (sizeof (MonoSeqPointInfo) + (cfg->seq_points->len * sizeof (SeqPoint)));
info->len = cfg->seq_points->len;
for (i = 0; i < cfg->seq_points->len; ++i) {
SeqPoint *sp = &info->seq_points [i];
@@ -3763,6 +3876,8 @@ mono_save_seq_point_info (MonoCompile *cfg)
sp->il_offset = ins->inst_imm;
sp->native_offset = ins->inst_offset;
+ if (ins->flags & MONO_INST_NONEMPTY_STACK)
+ sp->flags |= MONO_SEQ_POINT_FLAG_NONEMPTY_STACK;
/* Used below */
ins->backend.size = i;
@@ -3796,7 +3911,7 @@ mono_save_seq_point_info (MonoCompile *cfg)
last = ins;
}
- if (bb->last_ins && bb->last_ins->opcode == OP_ENDFINALLY) {
+ if (bb->last_ins && bb->last_ins->opcode == OP_ENDFINALLY && bb->seq_points) {
MonoBasicBlock *bb2;
MonoInst *endfinally_seq_point = NULL;
@@ -3804,17 +3919,18 @@ mono_save_seq_point_info (MonoCompile *cfg)
* The ENDFINALLY branches are not represented in the cfg, so link it with all seq points starting bbs.
*/
l = g_slist_last (bb->seq_points);
- g_assert (l);
- endfinally_seq_point = l->data;
+ if (l) {
+ endfinally_seq_point = l->data;
- for (bb2 = cfg->bb_entry; bb2; bb2 = bb2->next_bb) {
- GSList *l = g_slist_last (bb2->seq_points);
+ for (bb2 = cfg->bb_entry; bb2; bb2 = bb2->next_bb) {
+ GSList *l = g_slist_last (bb2->seq_points);
- if (l) {
- MonoInst *ins = l->data;
+ if (l) {
+ MonoInst *ins = l->data;
- if (!(ins->inst_imm == METHOD_ENTRY_IL_OFFSET || ins->inst_imm == METHOD_EXIT_IL_OFFSET) && ins != endfinally_seq_point)
- next [endfinally_seq_point->backend.size] = g_slist_append (next [endfinally_seq_point->backend.size], GUINT_TO_POINTER (ins->backend.size));
+ if (!(ins->inst_imm == METHOD_ENTRY_IL_OFFSET || ins->inst_imm == METHOD_EXIT_IL_OFFSET) && ins != endfinally_seq_point)
+ next [endfinally_seq_point->backend.size] = g_slist_append (next [endfinally_seq_point->backend.size], GUINT_TO_POINTER (ins->backend.size));
+ }
}
}
}
@@ -4117,7 +4233,7 @@ create_jit_info_for_trampoline (MonoMethod *wrapper, MonoTrampInfo *info)
}
jinfo = mono_domain_alloc0 (domain, MONO_SIZEOF_JIT_INFO);
- jinfo->method = wrapper;
+ jinfo->d.method = wrapper;
jinfo->code_start = info->code;
jinfo->code_size = info->code_size;
jinfo->used_regs = mono_cache_unwind_info (uw_info, info_len);
@@ -4197,7 +4313,7 @@ create_jit_info (MonoCompile *cfg, MonoMethod *method_to_compile)
generic_info_size + holes_size + arch_eh_info_size + cas_size);
}
- jinfo->method = cfg->method_to_register;
+ jinfo->d.method = cfg->method_to_register;
jinfo->code_start = cfg->native_code;
jinfo->code_size = cfg->code_len;
jinfo->used_regs = cfg->used_int_regs;
@@ -4399,8 +4515,20 @@ create_jit_info (MonoCompile *cfg, MonoMethod *method_to_compile)
int end_offset;
if (ec->handler_offset + ec->handler_len < header->code_size) {
tblock = cfg->cil_offset_to_bb [ec->handler_offset + ec->handler_len];
- g_assert (tblock);
- end_offset = tblock->native_offset;
+ if (tblock->native_offset) {
+ end_offset = tblock->native_offset;
+ } else {
+ int j, end;
+
+ for (j = ec->handler_offset + ec->handler_len, end = ec->handler_offset; j >= end; --j) {
+ MonoBasicBlock *bb = cfg->cil_offset_to_bb [j];
+ if (bb && bb->native_offset) {
+ tblock = bb;
+ break;
+ }
+ }
+ end_offset = tblock->native_offset + tblock->native_length;
+ }
} else {
end_offset = cfg->epilog_begin;
}
@@ -4416,8 +4544,9 @@ create_jit_info (MonoCompile *cfg, MonoMethod *method_to_compile)
int start = (guint8*)ei->try_start - cfg->native_code;
int end = (guint8*)ei->try_end - cfg->native_code;
int handler = (guint8*)ei->handler_start - cfg->native_code;
+ int handler_end = (guint8*)ei->data.handler_end - cfg->native_code;
- printf ("JitInfo EH clause %d flags %x try %x-%x handler %x\n", i, ei->flags, start, end, handler);
+ printf ("JitInfo EH clause %d flags %x try %x-%x handler %x-%x\n", i, ei->flags, start, end, handler, handler_end);
}
}
@@ -4511,26 +4640,6 @@ is_open_method (MonoMethod *method)
return FALSE;
}
-static gboolean
-has_ref_constraint (MonoGenericParamInfo *info)
-{
- MonoClass **constraints;
-
- //return FALSE;
-
- if (info && info->constraints) {
- constraints = info->constraints;
-
- while (*constraints) {
- MonoClass *cklass = *constraints;
- if (!(cklass == mono_defaults.object_class || (cklass->image == mono_defaults.corlib && !strcmp (cklass->name, "ValueType")) || MONO_CLASS_IS_INTERFACE (cklass)))
- return TRUE;
- constraints ++;
- }
- }
- return FALSE;
-}
-
static MonoGenericInst*
get_shared_inst (MonoGenericInst *inst, MonoGenericInst *shared_inst, MonoGenericContainer *container, gboolean all_vt, gboolean gsharedvt)
{
@@ -4543,10 +4652,7 @@ get_shared_inst (MonoGenericInst *inst, MonoGenericInst *shared_inst, MonoGeneri
if (!all_vt && (MONO_TYPE_IS_REFERENCE (inst->type_argv [i]) || inst->type_argv [i]->type == MONO_TYPE_VAR || inst->type_argv [i]->type == MONO_TYPE_MVAR)) {
type_argv [i] = shared_inst->type_argv [i];
} else if (all_vt) {
- if (container && has_ref_constraint (&container->type_params [i].info))
- type_argv [i] = shared_inst->type_argv [i];
- else
- type_argv [i] = get_gsharedvt_type (shared_inst->type_argv [i]);
+ type_argv [i] = get_gsharedvt_type (shared_inst->type_argv [i]);
} else if (gsharedvt) {
type_argv [i] = get_gsharedvt_type (shared_inst->type_argv [i]);
} else {
@@ -4918,8 +5024,8 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gbool
cfg->opt |= MONO_OPT_ABCREM;
}
- if (getenv ("MONO_VERBOSE_METHOD")) {
- char *name = getenv ("MONO_VERBOSE_METHOD");
+ if (g_getenv ("MONO_VERBOSE_METHOD")) {
+ const char *name = g_getenv ("MONO_VERBOSE_METHOD");
if ((strchr (name, '.') > name) || strchr (name, ':')) {
MonoMethodDesc *desc;
@@ -4930,7 +5036,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gbool
}
mono_method_desc_free (desc);
} else {
- if (strcmp (cfg->method->name, getenv ("MONO_VERBOSE_METHOD")) == 0)
+ if (strcmp (cfg->method->name, g_getenv ("MONO_VERBOSE_METHOD")) == 0)
cfg->verbose_level = 4;
}
}
@@ -4975,11 +5081,11 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gbool
count ++;
/*
- if (getenv ("COUNT2")) {
+ if (g_getenv ("COUNT2")) {
cfg->globalra = TRUE;
- if (count == atoi (getenv ("COUNT2")))
+ if (count == atoi (g_getenv ("COUNT2")))
printf ("LAST: %s\n", mono_method_full_name (cfg->method, TRUE));
- if (count > atoi (getenv ("COUNT2")))
+ if (count > atoi (g_getenv ("COUNT2")))
cfg->globalra = FALSE;
}
*/
@@ -5118,6 +5224,8 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gbool
mono_handle_global_vregs (cfg);
if (cfg->opt & MONO_OPT_DEADCE)
mono_local_deadce (cfg);
+ if (cfg->opt & MONO_OPT_ALIAS_ANALYSIS)
+ mono_local_alias_analysis (cfg);
/* Disable this for LLVM to make the IR easier to handle */
if (!COMPILE_LLVM (cfg))
mono_if_conversion (cfg);
@@ -5284,8 +5392,8 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gbool
return cfg;
}
-#ifdef MONO_ARCH_SOFT_FLOAT
- if (!COMPILE_LLVM (cfg))
+#ifdef MONO_ARCH_SOFT_FLOAT_FALLBACK
+ if (COMPILE_SOFT_FLOAT (cfg))
mono_decompose_soft_float (cfg);
#endif
if (!COMPILE_LLVM (cfg))
@@ -5622,7 +5730,7 @@ void
mono_emit_jit_map (MonoJitInfo *jinfo)
{
if (perf_map_file) {
- char *name = mono_method_full_name (jinfo->method, TRUE);
+ char *name = mono_method_full_name (jinfo_get_method (jinfo), TRUE);
mono_emit_jit_tramp (jinfo->code_start, jinfo->code_size, name);
g_free (name);
}
@@ -5891,7 +5999,7 @@ mono_jit_compile_method_inner (MonoMethod *method, MonoDomain *target_domain, in
}
if (code == NULL) {
- mono_internal_hash_table_insert (&target_domain->jit_code_hash, cfg->jit_info->method, cfg->jit_info);
+ mono_internal_hash_table_insert (&target_domain->jit_code_hash, cfg->jit_info->d.method, cfg->jit_info);
mono_domain_jit_code_hash_unlock (target_domain);
code = cfg->native_code;
@@ -5990,6 +6098,7 @@ mono_jit_compile_method_with_opt (MonoMethod *method, guint32 opt, MonoException
MonoDomain *target_domain, *domain = mono_domain_get ();
MonoJitInfo *info;
gpointer code, p;
+ MonoJitInfo *ji;
MonoJitICallInfo *callinfo = NULL;
WrapperInfo *winfo = NULL;
@@ -6023,8 +6132,14 @@ mono_jit_compile_method_with_opt (MonoMethod *method, guint32 opt, MonoException
WrapperInfo *info = mono_marshal_get_wrapper_info (method);
g_assert (info);
- if (info->subtype == WRAPPER_SUBTYPE_SYNCHRONIZED_INNER)
+ if (info->subtype == WRAPPER_SUBTYPE_SYNCHRONIZED_INNER) {
+ MonoGenericContext *ctx = NULL;
+ if (method->is_inflated)
+ ctx = mono_method_get_context (method);
method = info->d.synchronized_inner.method;
+ if (ctx)
+ method = mono_class_inflate_generic_method (method, ctx);
+ }
}
info = lookup_method (target_domain, method);
@@ -6050,6 +6165,16 @@ mono_jit_compile_method_with_opt (MonoMethod *method, guint32 opt, MonoException
if (!code)
return NULL;
+ if (method->wrapper_type == MONO_WRAPPER_WRITE_BARRIER || method->wrapper_type == MONO_WRAPPER_ALLOC) {
+ MonoDomain *d;
+
+ /*
+ * SGEN requires the JIT info for these methods to be registered, see is_ip_in_managed_allocator ().
+ */
+ ji = mini_jit_info_table_find (mono_domain_get (), code, &d);
+ g_assert (ji);
+ }
+
p = mono_create_ftnptr (target_domain, code);
if (callinfo) {
@@ -6074,7 +6199,7 @@ mono_jit_compile_method (MonoMethod *method)
MonoException *ex = NULL;
gpointer code;
- code = mono_jit_compile_method_with_opt (method, default_opt, &ex);
+ code = mono_jit_compile_method_with_opt (method, mono_get_optimizations_for_method (method, default_opt), &ex);
if (!code) {
g_assert (ex);
mono_raise_exception (ex);
@@ -6197,6 +6322,33 @@ mono_jit_find_compiled_method_with_jit_info (MonoDomain *domain, MonoMethod *met
return NULL;
}
+gboolean mono_do_single_method_regression = FALSE;
+guint32 mono_single_method_regression_opt = 0;
+MonoMethod *mono_current_single_method = NULL;
+GSList *mono_single_method_list = NULL;
+GHashTable *mono_single_method_hash = NULL;
+
+guint32
+mono_get_optimizations_for_method (MonoMethod *method, guint32 default_opt)
+{
+ g_assert (method);
+
+ if (!mono_do_single_method_regression)
+ return default_opt;
+ if (!mono_current_single_method) {
+ if (!mono_single_method_hash)
+ mono_single_method_hash = g_hash_table_new (g_direct_hash, g_direct_equal);
+ if (!g_hash_table_lookup (mono_single_method_hash, method)) {
+ g_hash_table_insert (mono_single_method_hash, method, method);
+ mono_single_method_list = g_slist_prepend (mono_single_method_list, method);
+ }
+ return default_opt;
+ }
+ if (method == mono_current_single_method)
+ return mono_single_method_regression_opt;
+ return default_opt;
+}
+
gpointer
mono_jit_find_compiled_method (MonoDomain *domain, MonoMethod *method)
{
@@ -6222,7 +6374,7 @@ typedef struct {
static MonoObject*
mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObject **exc)
{
- MonoMethod *invoke;
+ MonoMethod *invoke, *callee;
MonoObject *(*runtime_invoke) (MonoObject *this, void **params, MonoObject **exc, void* compiled_method);
MonoDomain *domain = mono_domain_get ();
MonoJitDomainInfo *domain_info;
@@ -6261,17 +6413,31 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
info->vtable = mono_class_vtable_full (domain, method->klass, TRUE);
g_assert (info->vtable);
+ callee = method;
if (method->klass->rank && (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) &&
(method->iflags & METHOD_IMPL_ATTRIBUTE_NATIVE)) {
/*
* Array Get/Set/Address methods. The JIT implements them using inline code
* inside the runtime invoke wrappers, so no need to compile them.
*/
- info->compiled_method = NULL;
- } else {
+ if (mono_aot_only) {
+ /*
+ * Call a wrapper, since the runtime invoke wrapper was not generated.
+ */
+ MonoMethod *wrapper;
+
+ wrapper = mono_marshal_get_array_accessor_wrapper (method);
+ invoke = mono_marshal_get_runtime_invoke (wrapper, FALSE);
+ callee = wrapper;
+ } else {
+ callee = NULL;
+ }
+ }
+
+ if (callee) {
MonoException *jit_ex = NULL;
- info->compiled_method = mono_jit_compile_method_with_opt (method, default_opt, &jit_ex);
+ info->compiled_method = mono_jit_compile_method_with_opt (callee, mono_get_optimizations_for_method (callee, default_opt), &jit_ex);
if (!info->compiled_method) {
g_free (info);
g_assert (jit_ex);
@@ -6283,7 +6449,9 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
}
}
- info->compiled_method = mini_add_method_trampoline (NULL, method, info->compiled_method, mono_method_needs_static_rgctx_invoke (method, FALSE), FALSE);
+ info->compiled_method = mini_add_method_trampoline (NULL, callee, info->compiled_method, mono_method_needs_static_rgctx_invoke (callee, FALSE), FALSE);
+ } else {
+ info->compiled_method = NULL;
}
/*
@@ -6293,6 +6461,7 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
*/
#ifdef MONO_ARCH_DYN_CALL_SUPPORTED
if (mono_aot_only || debug_options.dyn_runtime_invoke) {
+ MonoType *ret_type;
MonoMethodSignature *sig = mono_method_signature (method);
gboolean supported = TRUE;
int i;
@@ -6313,8 +6482,9 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
if (supported)
info->dyn_call_info = mono_arch_dyn_call_prepare (sig);
+ ret_type = sig->ret;
if (info->dyn_call_info) {
- switch (sig->ret->type) {
+ switch (ret_type->type) {
case MONO_TYPE_VOID:
break;
case MONO_TYPE_I1:
@@ -6331,7 +6501,7 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
case MONO_TYPE_CHAR:
case MONO_TYPE_R4:
case MONO_TYPE_R8:
- info->ret_box_class = mono_class_from_mono_type (sig->ret);
+ info->ret_box_class = mono_class_from_mono_type (ret_type);
break;
case MONO_TYPE_PTR:
info->ret_box_class = mono_defaults.int_class;
@@ -6343,11 +6513,11 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
case MONO_TYPE_OBJECT:
break;
case MONO_TYPE_GENERICINST:
- if (!MONO_TYPE_IS_REFERENCE (sig->ret))
- info->ret_box_class = mono_class_from_mono_type (sig->ret);
+ if (!MONO_TYPE_IS_REFERENCE (ret_type))
+ info->ret_box_class = mono_class_from_mono_type (ret_type);
break;
case MONO_TYPE_VALUETYPE:
- info->ret_box_class = mono_class_from_mono_type (sig->ret);
+ info->ret_box_class = mono_class_from_mono_type (ret_type);
break;
default:
g_assert_not_reached ();
@@ -6438,8 +6608,7 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
return runtime_invoke (obj, params, exc, info->compiled_method);
}
-void
-SIG_HANDLER_SIGNATURE (mono_sigfpe_signal_handler)
+SIG_HANDLER_FUNC (, mono_sigfpe_signal_handler)
{
MonoException *exc = NULL;
MonoJitInfo *ji;
@@ -6473,8 +6642,7 @@ SIG_HANDLER_SIGNATURE (mono_sigfpe_signal_handler)
mono_arch_handle_exception (ctx, exc);
}
-void
-SIG_HANDLER_SIGNATURE (mono_sigill_signal_handler)
+SIG_HANDLER_FUNC (, mono_sigill_signal_handler)
{
MonoException *exc;
GET_CONTEXT;
@@ -6488,8 +6656,7 @@ SIG_HANDLER_SIGNATURE (mono_sigill_signal_handler)
#define HAVE_SIG_INFO
#endif
-void
-SIG_HANDLER_SIGNATURE (mono_sigsegv_signal_handler)
+SIG_HANDLER_FUNC (, mono_sigsegv_signal_handler)
{
MonoJitInfo *ji;
MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
@@ -6568,8 +6735,7 @@ SIG_HANDLER_SIGNATURE (mono_sigsegv_signal_handler)
#endif
}
-void
-SIG_HANDLER_SIGNATURE (mono_sigint_signal_handler)
+SIG_HANDLER_FUNC (, mono_sigint_signal_handler)
{
MonoException *exc;
GET_CONTEXT;
@@ -6655,7 +6821,7 @@ mini_get_imt_trampoline (int slot_index)
static void
mini_parse_debug_options (void)
{
- char *options = getenv ("MONO_DEBUG");
+ const char *options = g_getenv ("MONO_DEBUG");
gchar **args, **ptr;
if (!options)
@@ -6731,7 +6897,6 @@ mini_create_ftnptr (MonoDomain *domain, gpointer addr)
desc [0] = addr;
desc [1] = NULL;
# elif defined(__ppc64__) || defined(__powerpc64__)
- gpointer *desc;
desc = mono_domain_alloc0 (domain, 3 * sizeof (gpointer));
@@ -6774,9 +6939,14 @@ register_jit_stats (void)
mono_counters_register ("Method cache lookups", MONO_COUNTER_JIT | MONO_COUNTER_INT, &mono_jit_stats.methods_lookups);
mono_counters_register ("Compiled CIL code size", MONO_COUNTER_JIT | MONO_COUNTER_INT, &mono_jit_stats.cil_code_size);
mono_counters_register ("Native code size", MONO_COUNTER_JIT | MONO_COUNTER_INT, &mono_jit_stats.native_code_size);
+ mono_counters_register ("Aliases found", MONO_COUNTER_JIT | MONO_COUNTER_INT, &mono_jit_stats.alias_found);
+ mono_counters_register ("Aliases eliminated", MONO_COUNTER_JIT | MONO_COUNTER_INT, &mono_jit_stats.alias_removed);
+ mono_counters_register ("Aliased loads eliminated", MONO_COUNTER_JIT | MONO_COUNTER_INT, &mono_jit_stats.loads_eliminated);
+ mono_counters_register ("Aliased stores eliminated", MONO_COUNTER_JIT | MONO_COUNTER_INT, &mono_jit_stats.stores_eliminated);
}
static void runtime_invoke_info_free (gpointer value);
+static void seq_point_info_free (gpointer value);
static void
mini_create_jit_domain_info (MonoDomain *domain)
@@ -6789,7 +6959,7 @@ mini_create_jit_domain_info (MonoDomain *domain)
info->delegate_trampoline_hash = g_hash_table_new (mono_aligned_addr_hash, NULL);
info->llvm_vcall_trampoline_hash = g_hash_table_new (mono_aligned_addr_hash, NULL);
info->runtime_invoke_hash = g_hash_table_new_full (mono_aligned_addr_hash, NULL, NULL, runtime_invoke_info_free);
- info->seq_points = g_hash_table_new_full (mono_aligned_addr_hash, NULL, NULL, g_free);
+ info->seq_points = g_hash_table_new_full (mono_aligned_addr_hash, NULL, NULL, seq_point_info_free);
info->arch_seq_points = g_hash_table_new (mono_aligned_addr_hash, NULL);
info->jump_target_hash = g_hash_table_new (NULL, NULL);
@@ -6823,6 +6993,19 @@ runtime_invoke_info_free (gpointer value)
g_free (info);
}
+static void seq_point_info_free (gpointer value)
+{
+ int i = 0;
+ MonoSeqPointInfo* info = (MonoSeqPointInfo*)value;
+
+ for (i = 0; i < info->len; ++i) {
+ SeqPoint *sp = &info->seq_points [i];
+ g_free (sp->next);
+ }
+
+ g_free (info);
+}
+
static void
mini_free_jit_domain_info (MonoDomain *domain)
{
@@ -6930,19 +7113,21 @@ mini_init (const char *filename, const char *runtime_version)
mono_threads_runtime_init (&ticallbacks);
- if (getenv ("MONO_DEBUG") != NULL)
+ if (g_getenv ("MONO_DEBUG") != NULL)
mini_parse_debug_options ();
mono_code_manager_init ();
+ mono_hwcap_init ();
+
mono_arch_cpu_init ();
mono_arch_init ();
mono_unwind_init ();
- if (getenv ("MONO_XDEBUG")) {
- char *xdebug_opts = getenv ("MONO_XDEBUG");
+ if (g_getenv ("MONO_XDEBUG")) {
+ const char *xdebug_opts = g_getenv ("MONO_XDEBUG");
mono_xdebug_init (xdebug_opts);
/* So methods for multiple domains don't have the same address */
mono_dont_free_domains = TRUE;
@@ -6987,7 +7172,7 @@ mini_init (const char *filename, const char *runtime_version)
#ifdef MONO_ARCH_HAVE_NOTIFY_PENDING_EXC
// This is experimental code so provide an env var to switch it off
- if (getenv ("MONO_DISABLE_PENDING_EXCEPTIONS")) {
+ if (g_getenv ("MONO_DISABLE_PENDING_EXCEPTIONS")) {
printf ("MONO_DISABLE_PENDING_EXCEPTIONS env var set.\n");
} else {
check_for_pending_exc = FALSE;
@@ -7115,6 +7300,8 @@ mini_init (const char *filename, const char *runtime_version)
register_opcode_emulation (OP_LDIV_UN, "__emul_ldiv_un", "long long long", mono_lldiv_un, "mono_lldiv_un", FALSE);
register_opcode_emulation (OP_LREM, "__emul_lrem", "long long long", mono_llrem, "mono_llrem", FALSE);
register_opcode_emulation (OP_LREM_UN, "__emul_lrem_un", "long long long", mono_llrem_un, "mono_llrem_un", FALSE);
+#endif
+#if !defined(MONO_ARCH_NO_EMULATE_LONG_MUL_OPTS) || defined(MONO_ARCH_EMULATE_LONG_MUL_OVF_OPTS)
register_opcode_emulation (OP_LMUL_OVF_UN, "__emul_lmul_ovf_un", "long long long", mono_llmult_ovf_un, "mono_llmult_ovf_un", FALSE);
register_opcode_emulation (OP_LMUL_OVF, "__emul_lmul_ovf", "long long long", mono_llmult_ovf, "mono_llmult_ovf", FALSE);
#endif
@@ -7141,8 +7328,10 @@ mini_init (const char *filename, const char *runtime_version)
register_opcode_emulation (OP_IMUL_OVF_UN, "__emul_op_imul_ovf_un", "int32 int32 int32", mono_imul_ovf_un, "mono_imul_ovf_un", FALSE);
#endif
-#if defined(MONO_ARCH_EMULATE_MUL_DIV) || defined(MONO_ARCH_SOFT_FLOAT)
- register_opcode_emulation (OP_FDIV, "__emul_fdiv", "double double double", mono_fdiv, "mono_fdiv", FALSE);
+#if defined(MONO_ARCH_EMULATE_MUL_DIV) || defined(MONO_ARCH_SOFT_FLOAT_FALLBACK)
+ if (EMUL_MUL_DIV || mono_arch_is_soft_float ()) {
+ register_opcode_emulation (OP_FDIV, "__emul_fdiv", "double double double", mono_fdiv, "mono_fdiv", FALSE);
+ }
#endif
register_opcode_emulation (OP_FCONV_TO_U8, "__emul_fconv_to_u8", "ulong double", mono_fconv_u8, "mono_fconv_u8", FALSE);
@@ -7173,44 +7362,47 @@ mini_init (const char *filename, const char *runtime_version)
#endif
#endif
-#ifdef MONO_ARCH_SOFT_FLOAT
- register_opcode_emulation (OP_FSUB, "__emul_fsub", "double double double", mono_fsub, "mono_fsub", FALSE);
- register_opcode_emulation (OP_FADD, "__emul_fadd", "double double double", mono_fadd, "mono_fadd", FALSE);
- register_opcode_emulation (OP_FMUL, "__emul_fmul", "double double double", mono_fmul, "mono_fmul", FALSE);
- register_opcode_emulation (OP_FNEG, "__emul_fneg", "double double", mono_fneg, "mono_fneg", FALSE);
- register_opcode_emulation (OP_ICONV_TO_R8, "__emul_iconv_to_r8", "double int32", mono_conv_to_r8, "mono_conv_to_r8", FALSE);
- register_opcode_emulation (OP_ICONV_TO_R4, "__emul_iconv_to_r4", "double int32", mono_conv_to_r4, "mono_conv_to_r4", FALSE);
- register_opcode_emulation (OP_FCONV_TO_R4, "__emul_fconv_to_r4", "double double", mono_fconv_r4, "mono_fconv_r4", FALSE);
- register_opcode_emulation (OP_FCONV_TO_I1, "__emul_fconv_to_i1", "int8 double", mono_fconv_i1, "mono_fconv_i1", FALSE);
- register_opcode_emulation (OP_FCONV_TO_I2, "__emul_fconv_to_i2", "int16 double", mono_fconv_i2, "mono_fconv_i2", FALSE);
- register_opcode_emulation (OP_FCONV_TO_I4, "__emul_fconv_to_i4", "int32 double", mono_fconv_i4, "mono_fconv_i4", FALSE);
- register_opcode_emulation (OP_FCONV_TO_U1, "__emul_fconv_to_u1", "uint8 double", mono_fconv_u1, "mono_fconv_u1", FALSE);
- register_opcode_emulation (OP_FCONV_TO_U2, "__emul_fconv_to_u2", "uint16 double", mono_fconv_u2, "mono_fconv_u2", FALSE);
+#ifdef MONO_ARCH_SOFT_FLOAT_FALLBACK
+ if (mono_arch_is_soft_float ()) {
+ register_opcode_emulation (OP_FSUB, "__emul_fsub", "double double double", mono_fsub, "mono_fsub", FALSE);
+ register_opcode_emulation (OP_FADD, "__emul_fadd", "double double double", mono_fadd, "mono_fadd", FALSE);
+ register_opcode_emulation (OP_FMUL, "__emul_fmul", "double double double", mono_fmul, "mono_fmul", FALSE);
+ register_opcode_emulation (OP_FNEG, "__emul_fneg", "double double", mono_fneg, "mono_fneg", FALSE);
+ register_opcode_emulation (OP_ICONV_TO_R8, "__emul_iconv_to_r8", "double int32", mono_conv_to_r8, "mono_conv_to_r8", FALSE);
+ register_opcode_emulation (OP_ICONV_TO_R4, "__emul_iconv_to_r4", "double int32", mono_conv_to_r4, "mono_conv_to_r4", FALSE);
+ register_opcode_emulation (OP_FCONV_TO_R4, "__emul_fconv_to_r4", "double double", mono_fconv_r4, "mono_fconv_r4", FALSE);
+ register_opcode_emulation (OP_FCONV_TO_I1, "__emul_fconv_to_i1", "int8 double", mono_fconv_i1, "mono_fconv_i1", FALSE);
+ register_opcode_emulation (OP_FCONV_TO_I2, "__emul_fconv_to_i2", "int16 double", mono_fconv_i2, "mono_fconv_i2", FALSE);
+ register_opcode_emulation (OP_FCONV_TO_I4, "__emul_fconv_to_i4", "int32 double", mono_fconv_i4, "mono_fconv_i4", FALSE);
+ register_opcode_emulation (OP_FCONV_TO_U1, "__emul_fconv_to_u1", "uint8 double", mono_fconv_u1, "mono_fconv_u1", FALSE);
+ register_opcode_emulation (OP_FCONV_TO_U2, "__emul_fconv_to_u2", "uint16 double", mono_fconv_u2, "mono_fconv_u2", FALSE);
+
#if SIZEOF_VOID_P == 4
- register_opcode_emulation (OP_FCONV_TO_I, "__emul_fconv_to_i", "int32 double", mono_fconv_i4, "mono_fconv_i4", FALSE);
+ register_opcode_emulation (OP_FCONV_TO_I, "__emul_fconv_to_i", "int32 double", mono_fconv_i4, "mono_fconv_i4", FALSE);
#endif
- register_opcode_emulation (OP_FBEQ, "__emul_fcmp_eq", "uint32 double double", mono_fcmp_eq, "mono_fcmp_eq", FALSE);
- register_opcode_emulation (OP_FBLT, "__emul_fcmp_lt", "uint32 double double", mono_fcmp_lt, "mono_fcmp_lt", FALSE);
- register_opcode_emulation (OP_FBGT, "__emul_fcmp_gt", "uint32 double double", mono_fcmp_gt, "mono_fcmp_gt", FALSE);
- register_opcode_emulation (OP_FBLE, "__emul_fcmp_le", "uint32 double double", mono_fcmp_le, "mono_fcmp_le", FALSE);
- register_opcode_emulation (OP_FBGE, "__emul_fcmp_ge", "uint32 double double", mono_fcmp_ge, "mono_fcmp_ge", FALSE);
- register_opcode_emulation (OP_FBNE_UN, "__emul_fcmp_ne_un", "uint32 double double", mono_fcmp_ne_un, "mono_fcmp_ne_un", FALSE);
- register_opcode_emulation (OP_FBLT_UN, "__emul_fcmp_lt_un", "uint32 double double", mono_fcmp_lt_un, "mono_fcmp_lt_un", FALSE);
- register_opcode_emulation (OP_FBGT_UN, "__emul_fcmp_gt_un", "uint32 double double", mono_fcmp_gt_un, "mono_fcmp_gt_un", FALSE);
- register_opcode_emulation (OP_FBLE_UN, "__emul_fcmp_le_un", "uint32 double double", mono_fcmp_le_un, "mono_fcmp_le_un", FALSE);
- register_opcode_emulation (OP_FBGE_UN, "__emul_fcmp_ge_un", "uint32 double double", mono_fcmp_ge_un, "mono_fcmp_ge_un", FALSE);
+ register_opcode_emulation (OP_FBEQ, "__emul_fcmp_eq", "uint32 double double", mono_fcmp_eq, "mono_fcmp_eq", FALSE);
+ register_opcode_emulation (OP_FBLT, "__emul_fcmp_lt", "uint32 double double", mono_fcmp_lt, "mono_fcmp_lt", FALSE);
+ register_opcode_emulation (OP_FBGT, "__emul_fcmp_gt", "uint32 double double", mono_fcmp_gt, "mono_fcmp_gt", FALSE);
+ register_opcode_emulation (OP_FBLE, "__emul_fcmp_le", "uint32 double double", mono_fcmp_le, "mono_fcmp_le", FALSE);
+ register_opcode_emulation (OP_FBGE, "__emul_fcmp_ge", "uint32 double double", mono_fcmp_ge, "mono_fcmp_ge", FALSE);
+ register_opcode_emulation (OP_FBNE_UN, "__emul_fcmp_ne_un", "uint32 double double", mono_fcmp_ne_un, "mono_fcmp_ne_un", FALSE);
+ register_opcode_emulation (OP_FBLT_UN, "__emul_fcmp_lt_un", "uint32 double double", mono_fcmp_lt_un, "mono_fcmp_lt_un", FALSE);
+ register_opcode_emulation (OP_FBGT_UN, "__emul_fcmp_gt_un", "uint32 double double", mono_fcmp_gt_un, "mono_fcmp_gt_un", FALSE);
+ register_opcode_emulation (OP_FBLE_UN, "__emul_fcmp_le_un", "uint32 double double", mono_fcmp_le_un, "mono_fcmp_le_un", FALSE);
+ register_opcode_emulation (OP_FBGE_UN, "__emul_fcmp_ge_un", "uint32 double double", mono_fcmp_ge_un, "mono_fcmp_ge_un", FALSE);
- register_opcode_emulation (OP_FCEQ, "__emul_fcmp_ceq", "uint32 double double", mono_fceq, "mono_fceq", FALSE);
- register_opcode_emulation (OP_FCGT, "__emul_fcmp_cgt", "uint32 double double", mono_fcgt, "mono_fcgt", FALSE);
- register_opcode_emulation (OP_FCGT_UN, "__emul_fcmp_cgt_un", "uint32 double double", mono_fcgt_un, "mono_fcgt_un", FALSE);
- register_opcode_emulation (OP_FCLT, "__emul_fcmp_clt", "uint32 double double", mono_fclt, "mono_fclt", FALSE);
- register_opcode_emulation (OP_FCLT_UN, "__emul_fcmp_clt_un", "uint32 double double", mono_fclt_un, "mono_fclt_un", FALSE);
+ register_opcode_emulation (OP_FCEQ, "__emul_fcmp_ceq", "uint32 double double", mono_fceq, "mono_fceq", FALSE);
+ register_opcode_emulation (OP_FCGT, "__emul_fcmp_cgt", "uint32 double double", mono_fcgt, "mono_fcgt", FALSE);
+ register_opcode_emulation (OP_FCGT_UN, "__emul_fcmp_cgt_un", "uint32 double double", mono_fcgt_un, "mono_fcgt_un", FALSE);
+ register_opcode_emulation (OP_FCLT, "__emul_fcmp_clt", "uint32 double double", mono_fclt, "mono_fclt", FALSE);
+ register_opcode_emulation (OP_FCLT_UN, "__emul_fcmp_clt_un", "uint32 double double", mono_fclt_un, "mono_fclt_un", FALSE);
- register_icall (mono_fload_r4, "mono_fload_r4", "double ptr", FALSE);
- register_icall (mono_fstore_r4, "mono_fstore_r4", "void double ptr", FALSE);
- register_icall (mono_fload_r4_arg, "mono_fload_r4_arg", "uint32 double", FALSE);
- register_icall (mono_isfinite, "mono_isfinite", "uint32 double", FALSE);
+ register_icall (mono_fload_r4, "mono_fload_r4", "double ptr", FALSE);
+ register_icall (mono_fstore_r4, "mono_fstore_r4", "void double ptr", FALSE);
+ register_icall (mono_fload_r4_arg, "mono_fload_r4_arg", "uint32 double", FALSE);
+ register_icall (mono_isfinite, "mono_isfinite", "uint32 double", FALSE);
+ }
#endif
#ifdef COMPRESSED_INTERFACE_BITMAP
@@ -7244,7 +7436,7 @@ mini_init (const char *filename, const char *runtime_version)
register_icall (mono_helper_ldstr_mscorlib, "mono_helper_ldstr_mscorlib", "object int", FALSE);
register_icall (mono_helper_newobj_mscorlib, "mono_helper_newobj_mscorlib", "object int", FALSE);
register_icall (mono_value_copy, "mono_value_copy", "void ptr ptr ptr", FALSE);
- register_icall (mono_object_castclass, "mono_object_castclass", "object object ptr", FALSE);
+ register_icall (mono_object_castclass_unbox, "mono_object_castclass_unbox", "object object ptr", FALSE);
register_icall (mono_break, "mono_break", NULL, TRUE);
register_icall (mono_create_corlib_exception_0, "mono_create_corlib_exception_0", "object int", TRUE);
register_icall (mono_create_corlib_exception_1, "mono_create_corlib_exception_1", "object int object", TRUE);
@@ -7255,9 +7447,7 @@ mini_init (const char *filename, const char *runtime_version)
register_icall (mono_array_new_4, "mono_array_new_4", "object ptr int int int int", FALSE);
register_icall (mono_get_native_calli_wrapper, "mono_get_native_calli_wrapper", "ptr ptr ptr ptr", FALSE);
register_icall (mono_resume_unwind, "mono_resume_unwind", "void", TRUE);
- register_icall (mono_object_tostring_gsharedvt, "mono_object_tostring_gsharedvt", "object ptr ptr ptr", TRUE);
- register_icall (mono_object_gethashcode_gsharedvt, "mono_object_gethashcode_gsharedvt", "int ptr ptr ptr", TRUE);
- register_icall (mono_object_equals_gsharedvt, "mono_object_equals_gsharedvt", "int ptr ptr ptr object", TRUE);
+ register_icall (mono_gsharedvt_constrained_call, "mono_gsharedvt_constrained_call", "object ptr ptr ptr ptr ptr", TRUE);
register_icall (mono_gsharedvt_value_copy, "mono_gsharedvt_value_copy", "void ptr ptr ptr", TRUE);
register_icall (mono_gc_wbarrier_value_copy_bitmap, "mono_gc_wbarrier_value_copy_bitmap", "void ptr ptr int int", FALSE);
@@ -7399,7 +7589,9 @@ mini_cleanup (MonoDomain *domain)
mono_runtime_cleanup_handlers ();
+#ifndef MONO_CROSS_COMPILE
mono_domain_free (domain, TRUE);
+#endif
mono_debugger_cleanup ();
diff --git a/mono/mini/mini.h b/mono/mini/mini.h
index 3e028ada899..55ed45f31c3 100644
--- a/mono/mini/mini.h
+++ b/mono/mini/mini.h
@@ -88,10 +88,10 @@
#define LLVM_ENABLED FALSE
#endif
-#ifdef MONO_ARCH_SOFT_FLOAT
-#define COMPILE_SOFT_FLOAT(cfg) (!COMPILE_LLVM ((cfg)))
+#ifdef MONO_ARCH_SOFT_FLOAT_FALLBACK
+#define COMPILE_SOFT_FLOAT(cfg) (!COMPILE_LLVM ((cfg)) && mono_arch_is_soft_float ())
#else
-#define COMPILE_SOFT_FLOAT(cfg) 0
+#define COMPILE_SOFT_FLOAT(cfg) (0)
#endif
#ifdef ENABLE_LLVM
@@ -133,7 +133,7 @@
#endif
/* Version number of the AOT file format */
-#define MONO_AOT_FILE_VERSION 90
+#define MONO_AOT_FILE_VERSION 96
//TODO: This is x86/amd64 specific.
#define mono_simd_shuffle_mask(a,b,c,d) ((a) | ((b) << 2) | ((c) << 4) | ((d) << 6))
@@ -143,6 +143,8 @@
#define printf g_print
#endif
+#define MONO_TYPE_IS_PRIMITIVE(t) ((!(t)->byref && ((((t)->type >= MONO_TYPE_BOOLEAN && (t)->type <= MONO_TYPE_R8) || ((t)->type >= MONO_TYPE_I && (t)->type <= MONO_TYPE_U)))))
+
/* Constants used to encode different types of methods in AOT */
enum {
MONO_AOT_METHODREF_MIN = 240,
@@ -281,7 +283,11 @@ typedef struct MonoAotFileInfo
guint32 num_rgctx_fetch_trampolines;
/* These are used for sanity checking object layout problems when cross-compiling */
- guint32 double_align, long_align;
+ guint32 double_align, long_align, generic_tramp_num;
+ /* The page size used by trampoline pages */
+ guint32 tramp_page_size;
+ /* The offset where the trampolines begin on a trampoline page */
+ guint32 tramp_page_code_offsets [MONO_AOT_TRAMP_NUM];
} MonoAotFileInfo;
/* Per-domain information maintained by the JIT */
@@ -338,8 +344,10 @@ typedef struct {
*/
typedef MonoStackFrameInfo StackFrameInfo;
+#define MONO_SEQ_POINT_FLAG_NONEMPTY_STACK 1
+
typedef struct {
- int il_offset, native_offset;
+ int il_offset, native_offset, flags;
/* Indexes of successor sequence points */
int *next;
/* Number of entries in next */
@@ -522,6 +530,11 @@ extern gboolean mono_do_x86_stack_align;
extern const char *mono_build_date;
extern gboolean mono_do_signal_chaining;
extern gboolean mono_use_llvm;
+extern gboolean mono_do_single_method_regression;
+extern guint32 mono_single_method_regression_opt;
+extern MonoMethod *mono_current_single_method;
+extern GSList *mono_single_method_list;
+extern GHashTable *mono_single_method_hash;
#define INS_INFO(opcode) (&ins_info [((opcode) - OP_START - 1) * 4])
@@ -840,6 +853,7 @@ struct MonoCallInst {
GSList *out_ireg_args;
GSList *out_freg_args;
GSList *outarg_vts;
+ gpointer call_info;
#ifdef ENABLE_LLVM
LLVMCallInfo *cinfo;
int rgctx_arg_reg, imt_arg_reg;
@@ -866,6 +880,7 @@ enum {
MONO_INST_TAILCALL = 4,
MONO_INST_VOLATILE = 4,
MONO_INST_NOTYPECHECK = 4,
+ MONO_INST_NONEMPTY_STACK = 4, /* in SEQ_POINT */
MONO_INST_UNALIGNED = 8,
MONO_INST_CFOLD_TAKEN = 8, /* On branches */
MONO_INST_CFOLD_NOT_TAKEN = 16, /* On branches */
@@ -1046,16 +1061,6 @@ typedef struct {
gboolean orig_ex_ctx_set;
} MonoJitTlsData;
-/* TLS entries used by JITted code */
-typedef enum {
- /* mono_thread_internal_current () */
- TLS_KEY_THREAD = 0,
- TLS_KEY_JIT_TLS = 1,
- /* mono_domain_get () */
- TLS_KEY_DOMAIN = 2,
- TLS_KEY_LMF = 3
-} MonoJitTlsKey;
-
/*
* This structure is an extension of MonoLMF and contains extra information.
*/
@@ -1186,6 +1191,8 @@ typedef struct MonoJumpInfoGSharedVtCall MonoJumpInfoGSharedVtCall;
typedef struct MonoJumpInfo MonoJumpInfo;
struct MonoJumpInfo {
MonoJumpInfo *next;
+ /* Relocation type for patching */
+ int relocation;
union {
int i;
guint8 *p;
@@ -1244,15 +1251,11 @@ typedef enum {
MONO_TRAMPOLINE_AOT_PLT,
MONO_TRAMPOLINE_DELEGATE,
MONO_TRAMPOLINE_RESTORE_STACK_PROT,
-#ifndef DISABLE_REMOTING
MONO_TRAMPOLINE_GENERIC_VIRTUAL_REMOTING,
-#endif
MONO_TRAMPOLINE_MONITOR_ENTER,
MONO_TRAMPOLINE_MONITOR_EXIT,
MONO_TRAMPOLINE_VCALL,
-#ifdef MONO_ARCH_HAVE_HANDLER_BLOCK_GUARD
MONO_TRAMPOLINE_HANDLER_BLOCK_GUARD,
-#endif
MONO_TRAMPOLINE_NUM
} MonoTrampolineType;
@@ -1264,6 +1267,13 @@ typedef enum {
(t) == MONO_TRAMPOLINE_MONITOR_ENTER || \
(t) == MONO_TRAMPOLINE_MONITOR_EXIT)
+/* These trampolines receive an argument directly in a register */
+#define MONO_TRAMPOLINE_TYPE_HAS_ARG(t) \
+ ((t) == MONO_TRAMPOLINE_GENERIC_CLASS_INIT || \
+ (t) == MONO_TRAMPOLINE_MONITOR_ENTER || \
+ (t) == MONO_TRAMPOLINE_MONITOR_EXIT || \
+ (t) == MONO_TRAMPOLINE_HANDLER_BLOCK_GUARD)
+
/* optimization flags */
#define OPTFLAG(id,shift,name,descr) MONO_OPT_ ## id = 1 << shift,
enum {
@@ -1386,6 +1396,9 @@ typedef struct {
/* For native-to-managed wrappers, the saved old domain */
MonoInst *orig_domain_var;
+ MonoInst *lmf_var;
+ MonoInst *lmf_addr_var;
+
unsigned char *cil_start;
#ifdef __native_client_codegen__
/* this alloc is not aligned, native_code */
@@ -1431,6 +1444,17 @@ typedef struct {
guint disable_vreg_to_lvreg : 1;
guint disable_deadce_vars : 1;
guint disable_out_of_line_bblocks : 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
+ * instead of being generated in emit_prolog ()/emit_epilog ().
+ */
+ guint lmf_ir : 1;
+ /*
+ * Whenever to use the mono_lmf TLS variable instead of indirection through the
+ * mono_lmf_addr TLS variable.
+ */
+ guint lmf_ir_mono_lmf : 1;
guint gen_write_barriers : 1;
guint init_ref_vars : 1;
guint extend_live_ranges : 1;
@@ -1445,6 +1469,7 @@ typedef struct {
guint compute_gc_maps : 1;
guint soft_breakpoints : 1;
guint arch_eh_jit_info : 1;
+ guint has_indirection : 1;
gpointer debug_info;
guint32 lmf_offset;
guint16 *intvars;
@@ -1614,6 +1639,10 @@ typedef struct {
gint32 cas_linkdemand;
gint32 cas_demand_generation;
gint32 generic_virtual_invocations;
+ gint32 alias_found;
+ gint32 alias_removed;
+ gint32 loads_eliminated;
+ gint32 stores_eliminated;
int methods_with_llvm;
int methods_without_llvm;
char *max_ratio_method;
@@ -1875,8 +1904,8 @@ enum {
typedef void (*MonoInstFunc) (MonoInst *tree, gpointer data);
/* main function */
-int mono_main (int argc, char* argv[]);
-void mono_set_defaults (int verbose_level, guint32 opts);
+MONO_API int mono_main (int argc, char* argv[]);
+MONO_API void mono_set_defaults (int verbose_level, guint32 opts);
MonoDomain* mini_init (const char *filename, const char *runtime_version) MONO_INTERNAL;
void mini_cleanup (MonoDomain *domain) MONO_INTERNAL;
MonoDebugOptions *mini_get_debug_options (void) MONO_INTERNAL;
@@ -1884,6 +1913,7 @@ MonoDebugOptions *mini_get_debug_options (void) MONO_INTERNAL;
/* helper methods */
void mono_disable_optimizations (guint32 opts) MONO_INTERNAL;
void mono_set_optimizations (guint32 opts) MONO_INTERNAL;
+guint32 mono_get_optimizations_for_method (MonoMethod *method, guint32 default_opt) MONO_INTERNAL;
void mono_set_verbose_level (guint32 level) MONO_INTERNAL;
MonoJumpInfoToken* mono_jump_info_token_new (MonoMemPool *mp, MonoImage *image, guint32 token) MONO_INTERNAL;
MonoJumpInfoToken* mono_jump_info_token_new2 (MonoMemPool *mp, MonoImage *image, guint32 token, MonoGenericContext *context) MONO_INTERNAL;
@@ -1892,7 +1922,7 @@ MonoInst* mono_find_exvar_for_offset (MonoCompile *cfg, int offset) MONO_
int mono_get_block_region_notry (MonoCompile *cfg, int region) MONO_LLVM_INTERNAL;
void mono_precompile_assemblies (void) MONO_INTERNAL;
-int mono_parse_default_optimizations (const char* p);
+MONO_API int mono_parse_default_optimizations (const char* p);
void mono_bblock_add_inst (MonoBasicBlock *bb, MonoInst *inst) MONO_LLVM_INTERNAL;
void mono_bblock_insert_after_ins (MonoBasicBlock *bb, MonoInst *ins, MonoInst *ins_to_insert) MONO_INTERNAL;
void mono_bblock_insert_before_ins (MonoBasicBlock *bb, MonoInst *ins, MonoInst *ins_to_insert) MONO_INTERNAL;
@@ -1933,10 +1963,10 @@ void mono_print_ins_index (int i, MonoInst *ins) MONO_INTERNAL
void mono_print_ins (MonoInst *ins) MONO_INTERNAL;
void mono_print_bb (MonoBasicBlock *bb, const char *msg) MONO_INTERNAL;
void mono_print_code (MonoCompile *cfg, const char *msg) MONO_INTERNAL;
-void mono_print_method_from_ip (void *ip);
-char *mono_pmip (void *ip);
+MONO_API void mono_print_method_from_ip (void *ip);
+MONO_API char *mono_pmip (void *ip);
gboolean mono_debug_count (void) MONO_INTERNAL;
-const char* mono_inst_name (int op);
+MONO_API const char* mono_inst_name (int op);
void mono_inst_set_src_registers (MonoInst *ins, int *regs) MONO_INTERNAL;
int mono_op_to_op_imm (int opcode) MONO_INTERNAL;
int mono_op_imm_to_op (int opcode) MONO_INTERNAL;
@@ -1947,6 +1977,7 @@ guint mini_type_to_stind (MonoCompile* cfg, MonoType *type) M
guint32 mono_reverse_branch_op (guint32 opcode) MONO_INTERNAL;
void mono_disassemble_code (MonoCompile *cfg, guint8 *code, int size, char *id) MONO_INTERNAL;
void mono_add_patch_info (MonoCompile *cfg, int ip, MonoJumpInfoType type, gconstpointer target) MONO_LLVM_INTERNAL;
+void mono_add_patch_info_rel (MonoCompile *cfg, int ip, MonoJumpInfoType type, gconstpointer target, int relocation) MONO_LLVM_INTERNAL;
void mono_remove_patch_info (MonoCompile *cfg, int ip) MONO_INTERNAL;
MonoJumpInfo* mono_patch_info_dup_mp (MonoMemPool *mp, MonoJumpInfo *patch_info) MONO_INTERNAL;
guint mono_patch_info_hash (gconstpointer data) MONO_INTERNAL;
@@ -1959,17 +1990,19 @@ gpointer mono_jit_compile_method (MonoMethod *method) MONO_INTERNAL;
MonoLMF * mono_get_lmf (void) MONO_INTERNAL;
MonoLMF** mono_get_lmf_addr (void) MONO_INTERNAL;
void mono_set_lmf (MonoLMF *lmf) MONO_INTERNAL;
-MonoDomain *mono_jit_thread_attach (MonoDomain *domain);
-void mono_jit_set_domain (MonoDomain *domain);
+MONO_API MonoDomain *mono_jit_thread_attach (MonoDomain *domain);
+MONO_API void mono_jit_set_domain (MonoDomain *domain);
MonoNativeTlsKey mono_get_jit_tls_key (void) MONO_INTERNAL;
gint32 mono_get_jit_tls_offset (void) MONO_INTERNAL;
gint32 mono_get_lmf_tls_offset (void) MONO_INTERNAL;
gint32 mono_get_lmf_addr_tls_offset (void) MONO_INTERNAL;
-int mini_get_tls_offset (MonoJitTlsKey key) MONO_INTERNAL;
+int mini_get_tls_offset (MonoTlsKey key) MONO_INTERNAL;
+MonoInst* mono_create_tls_get (MonoCompile *cfg, MonoTlsKey key) MONO_INTERNAL;
MonoInst* mono_get_jit_tls_intrinsic (MonoCompile *cfg) MONO_INTERNAL;
MonoInst* mono_get_domain_intrinsic (MonoCompile* cfg) MONO_INTERNAL;
MonoInst* mono_get_thread_intrinsic (MonoCompile* cfg) MONO_INTERNAL;
MonoInst* mono_get_lmf_intrinsic (MonoCompile* cfg) MONO_INTERNAL;
+MonoInst* mono_get_lmf_addr_intrinsic (MonoCompile* cfg) MONO_INTERNAL;
GList *mono_varlist_insert_sorted (MonoCompile *cfg, GList *list, MonoMethodVar *mv, int sort_type) MONO_INTERNAL;
GList *mono_varlist_sort (MonoCompile *cfg, GList *list, int sort_type) MONO_INTERNAL;
void mono_analyze_liveness (MonoCompile *cfg) MONO_INTERNAL;
@@ -2043,6 +2076,12 @@ void mono_nacl_gc(void);
#define NACL_SIZE(a, b) (a)
#endif
+static inline MonoMethod*
+jinfo_get_method (MonoJitInfo *ji)
+{
+ return mono_jit_info_get_method (ji);
+}
+
/* AOT */
void mono_aot_init (void) MONO_INTERNAL;
void mono_aot_cleanup (void) MONO_INTERNAL;
@@ -2081,11 +2120,11 @@ void mono_aot_register_jit_icall (const char *name, gpointer addr) MO
void* mono_aot_readonly_field_override (MonoClassField *field) MONO_INTERNAL;
/* This is an exported function */
-void mono_aot_register_globals (gpointer *globals);
+MONO_API void mono_aot_register_globals (gpointer *globals);
/* This too */
-void mono_aot_register_module (gpointer *aot_info);
+MONO_API void mono_aot_register_module (gpointer *aot_info);
-void mono_xdebug_init (char *xdebug_opts) MONO_INTERNAL;
+void mono_xdebug_init (const char *xdebug_opts) MONO_INTERNAL;
void mono_save_xdebug_info (MonoCompile *cfg) MONO_INTERNAL;
void mono_save_trampoline_xdebug_info (MonoTrampInfo *info) MONO_INTERNAL;
/* This is an exported function */
@@ -2108,7 +2147,7 @@ void mono_draw_graph (MonoCompile *cfg, MonoGraphOptions
void mono_add_ins_to_end (MonoBasicBlock *bb, MonoInst *inst) MONO_INTERNAL;
gpointer mono_create_ftnptr (MonoDomain *domain, gpointer addr) MONO_INTERNAL;
-void mono_replace_ins (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst *ins, MonoInst **prev, MonoBasicBlock *first_bb, MonoBasicBlock *last_bb);
+MONO_API void mono_replace_ins (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst *ins, MonoInst **prev, MonoBasicBlock *first_bb, MonoBasicBlock *last_bb);
int mono_find_method_opcode (MonoMethod *method) MONO_INTERNAL;
MonoJitICallInfo *mono_register_jit_icall (gconstpointer func, const char *name, MonoMethodSignature *sig, gboolean is_save) MONO_INTERNAL;
@@ -2151,6 +2190,7 @@ gconstpointer mono_get_trampoline_func (MonoTrampolineType tramp_type);
gpointer mini_get_vtable_trampoline (int slot_index) MONO_INTERNAL;
char* mono_get_generic_trampoline_name (MonoTrampolineType tramp_type) MONO_INTERNAL;
char* mono_get_rgctx_fetch_trampoline_name (int slot) MONO_INTERNAL;
+gpointer mini_get_nullified_class_init_trampoline (void) MONO_INTERNAL;
gpointer mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer compiled_method, gboolean add_static_rgctx_tramp, gboolean add_unbox_tramp) MONO_INTERNAL;
gboolean mini_jit_info_is_gsharedvt (MonoJitInfo *ji) MONO_INTERNAL;
@@ -2182,6 +2222,8 @@ void mono_emit_unwind_op (MonoCompile *cfg, int when,
int val) MONO_INTERNAL;
MonoTrampInfo* mono_tramp_info_create (const char *name, guint8 *code, guint32 code_size, MonoJumpInfo *ji, GSList *unwind_ops) MONO_INTERNAL;
void mono_tramp_info_free (MonoTrampInfo *info) MONO_INTERNAL;
+void mono_tramp_info_register (MonoTrampInfo *info) MONO_INTERNAL;
+int mini_exception_id_by_name (const char *name) MONO_INTERNAL;
int mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_bblock, MonoBasicBlock *end_bblock,
MonoInst *return_var, GList *dont_inline, MonoInst **inline_args,
@@ -2261,6 +2303,17 @@ gboolean mono_arch_gsharedvt_sig_supported (MonoMethodSignature *sig) MONO_
gpointer mono_arch_get_gsharedvt_trampoline (MonoTrampInfo **info, gboolean aot) MONO_INTERNAL;
gpointer mono_arch_get_gsharedvt_call_info (gpointer addr, MonoMethodSignature *normal_sig, MonoMethodSignature *gsharedvt_sig, MonoGenericSharingContext *gsctx, gboolean gsharedvt_in, gint32 vcall_offset, gboolean calli) MONO_INTERNAL;
gboolean mono_arch_opcode_needs_emulation (MonoCompile *cfg, int opcode) MONO_INTERNAL;
+gboolean mono_arch_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig) MONO_INTERNAL;
+
+#ifdef MONO_ARCH_SOFT_FLOAT_FALLBACK
+gboolean mono_arch_is_soft_float (void) MONO_INTERNAL;
+#else
+static inline MONO_ALWAYS_INLINE gboolean
+mono_arch_is_soft_float (void)
+{
+ return FALSE;
+}
+#endif
/* Soft Debug support */
#ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED
@@ -2367,8 +2420,8 @@ typedef gboolean (*MonoJitStackWalk) (StackFrameInfo *frame, MonoCont
void mono_exceptions_init (void) MONO_INTERNAL;
gboolean mono_handle_exception (MonoContext *ctx, gpointer obj) MONO_INTERNAL;
void mono_handle_native_sigsegv (int signal, void *sigctx) MONO_INTERNAL;
-void mono_print_thread_dump (void *sigctx);
-void mono_print_thread_dump_from_ctx (MonoContext *ctx);
+MONO_API void mono_print_thread_dump (void *sigctx);
+MONO_API void mono_print_thread_dump_from_ctx (MonoContext *ctx);
void mono_walk_stack_with_ctx (MonoJitStackWalk func, MonoContext *start_ctx, MonoUnwindOptions unwind_options, void *user_data) MONO_INTERNAL;
void mono_walk_stack_with_state (MonoJitStackWalk func, MonoThreadUnwindState *state, MonoUnwindOptions unwind_options, void *user_data) MONO_INTERNAL;
void mono_walk_stack (MonoJitStackWalk func, MonoUnwindOptions options, void *user_data) MONO_INTERNAL;
@@ -2386,6 +2439,7 @@ MonoJitInfo * mono_find_jit_info (MonoDomain *domain, MonoJitTlsD
typedef gboolean (*MonoExceptionFrameWalk) (MonoMethod *method, gpointer ip, size_t native_offset, gboolean managed, gpointer user_data);
gboolean mono_exception_walk_trace (MonoException *ex, MonoExceptionFrameWalk func, gpointer user_data);
+void mono_restore_context (MonoContext *ctx) MONO_INTERNAL;
gboolean
mono_find_jit_info_ext (MonoDomain *domain, MonoJitTlsData *jit_tls,
@@ -2446,12 +2500,12 @@ void mono_debug_add_aot_method (MonoDomain *domain,
MonoMethod *method, guint8 *code_start,
guint8 *debug_info, guint32 debug_info_len) MONO_INTERNAL;
void mono_debug_add_icall_wrapper (MonoMethod *method, MonoJitICallInfo* info) MONO_INTERNAL;
-void mono_debug_print_vars (gpointer ip, gboolean only_arguments);
-void mono_debugger_run_finally (MonoContext *start_ctx);
+MONO_API void mono_debug_print_vars (gpointer ip, gboolean only_arguments);
+MONO_API void mono_debugger_run_finally (MonoContext *start_ctx);
extern gssize mono_breakpoint_info_index [MONO_BREAKPOINT_ARRAY_SIZE];
-gboolean mono_breakpoint_clean_code (guint8 *method_start, guint8 *code, int offset, guint8 *buf, int size);
+MONO_API gboolean mono_breakpoint_clean_code (guint8 *method_start, guint8 *code, int offset, guint8 *buf, int size);
#ifdef MONO_DEBUGGER_SUPPORTED
@@ -2480,6 +2534,8 @@ extern void
mono_local_cprop (MonoCompile *cfg);
extern void
mono_local_deadce (MonoCompile *cfg);
+void
+mono_local_alias_analysis (MonoCompile *cfg) MONO_INTERNAL;
/* CAS - stack walk */
MonoSecurityFrame* ves_icall_System_Security_SecurityFrame_GetSecurityFrame (gint32 skip) MONO_INTERNAL;
@@ -2716,15 +2772,19 @@ void mono_gdb_render_native_backtraces (pid_t crashed_pid) MONO_INTERNAL;
#ifdef MONO_ARCH_USE_SIGACTION
#define SIG_HANDLER_SIGNATURE(ftn) ftn (int _dummy, siginfo_t *info, void *context)
+#define SIG_HANDLER_FUNC(access, ftn) MONO_SIGNAL_HANDLER_FUNC (access, ftn, (int _dummy, siginfo_t *info, void *context))
#define SIG_HANDLER_PARAMS _dummy, info, context
#elif defined(HOST_WIN32)
#define SIG_HANDLER_SIGNATURE(ftn) ftn (int _dummy, EXCEPTION_POINTERS *info, void *context)
+#define SIG_HANDLER_FUNC(access, ftn) MONO_SIGNAL_HANDLER_FUNC (access, ftn, (int _dummy, EXCEPTION_POINTERS *info, void *context))
#define SIG_HANDLER_PARAMS _dummy, info, context
#elif defined(__HAIKU__)
#define SIG_HANDLER_SIGNATURE(ftn) ftn (int _dummy, void *userData, vregs regs)
+#define SIG_HANDLER_FUNC(access, ftn) MONO_SIGNAL_HANDLER_FUNC (access, ftn, (int _dummy, void *userData, vregs regs))
#define SIG_HANDLER_PARAMS _dummy, userData, regs
#else
#define SIG_HANDLER_SIGNATURE(ftn) ftn (int _dummy)
+#define SIG_HANDLER_FUNC(access, ftn) MONO_SIGNAL_HANDLER_FUNC (access, ftn, (int _dummy))
#define SIG_HANDLER_PARAMS _dummy
#endif
@@ -2740,10 +2800,10 @@ gboolean SIG_HANDLER_SIGNATURE (mono_chain_signal) MONO_INTERNAL;
#define ARCH_HAVE_DELEGATE_TRAMPOLINES 0
#endif
-#ifdef MONO_ARCH_USE_OP_TAIL_CALL
-#define ARCH_USE_OP_TAIL_CALL 1
+#ifdef MONO_ARCH_HAVE_OP_TAIL_CALL
+#define ARCH_HAVE_OP_TAIL_CALL 1
#else
-#define ARCH_USE_OP_TAIL_CALL 0
+#define ARCH_HAVE_OP_TAIL_CALL 0
#endif
#ifndef MONO_ARCH_HAVE_TLS_GET
diff --git a/mono/mini/objects.cs b/mono/mini/objects.cs
index a16871b226c..40c79e6280f 100644
--- a/mono/mini/objects.cs
+++ b/mono/mini/objects.cs
@@ -26,6 +26,11 @@ using System.Runtime.CompilerServices;
* the IL code looks.
*/
+#if MOBILE
+namespace ObjectTests
+{
+#endif
+
struct Simple {
public int a;
public byte b;
@@ -114,9 +119,11 @@ struct Gamma {
class Tests {
+#if !MOBILE
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
+#endif
public static int test_0_return () {
Simple s;
@@ -1589,11 +1596,37 @@ ncells ) {
public static int test_0_llvm_inline_throw () {
try {
empty ();
- } catch (Exception ex) {
+ } catch (Exception) {
do_throw ();
}
return 0;
}
+
+ enum ByteEnum : byte {
+ Zero = 0
+ }
+
+ struct BugStruct {
+ public ByteEnum f1;
+ public ByteEnum f2;
+ public ByteEnum f3;
+ public byte f4;
+ public byte f5;
+ public byte f6;
+ public byte f7;
+ }
+
+ public static int test_0_14217 () {
+ t_14217_inner (new BugStruct ());
+ return 0;
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ static void t_14217_inner (BugStruct bug) {
+ }
}
+#if MOBILE
+}
+#endif
diff --git a/mono/mini/optflags-def.h b/mono/mini/optflags-def.h
index 0e754329ae7..bee894bdc55 100644
--- a/mono/mini/optflags-def.h
+++ b/mono/mini/optflags-def.h
@@ -26,3 +26,4 @@ OPTFLAG(GSHARED ,25, "gshared", "Generic Sharing")
OPTFLAG(GSHAREDVT,24, "gsharedvt", "Generic sharing for valuetypes")
OPTFLAG(SIMD ,26, "simd", "Simd intrinsics")
OPTFLAG(UNSAFE ,27, "unsafe", "Remove bound checks and perform other dangerous changes")
+OPTFLAG(ALIAS_ANALYSIS ,28, "alias-analysis", "Alias analysis of locals")
diff --git a/mono/mini/patch-info.h b/mono/mini/patch-info.h
index daf32f03df5..a966be512bb 100644
--- a/mono/mini/patch-info.h
+++ b/mono/mini/patch-info.h
@@ -49,6 +49,7 @@ PATCH_INFO(GSHAREDVT_CALL, "gsharedvt_call")
PATCH_INFO(GSHAREDVT_METHOD, "gsharedvt_method")
PATCH_INFO(JIT_TLS_ID, "jit_tls_id")
PATCH_INFO(TLS_OFFSET, "tls_offset")
+PATCH_INFO(OBJC_SELECTOR_REF, "objc_selector_ref")
PATCH_INFO(NONE, "none")
diff --git a/mono/mini/regalloc2.c b/mono/mini/regalloc2.c
index 098ff5d4b22..b2fb35067a9 100644
--- a/mono/mini/regalloc2.c
+++ b/mono/mini/regalloc2.c
@@ -252,17 +252,20 @@ handle_reg_constraints (MonoCompile *cfg)
cfg->cbb = bb;
MONO_BB_FOR_EACH_INS (bb, ins) {
const char *spec = ins_get_spec (ins->opcode);
- int dest_sreg1, dest_sreg2, dest_dreg;
+ int dest_sreg1, dest_sreg2, dest_sreg3, dest_dreg;
dest_sreg1 = MONO_ARCH_INST_FIXED_REG (spec [MONO_INST_SRC1]);
dest_sreg2 = MONO_ARCH_INST_FIXED_REG (spec [MONO_INST_SRC2]);
+ dest_sreg3 = MONO_ARCH_INST_FIXED_REG (spec [MONO_INST_SRC3]);
dest_dreg = MONO_ARCH_INST_FIXED_REG (spec [MONO_INST_DEST]);
if (MONO_ARCH_INST_IS_REGPAIR (spec [MONO_INST_DEST]) ||
- MONO_ARCH_INST_IS_REGPAIR (spec [MONO_INST_SRC1]) ||
- MONO_ARCH_INST_IS_REGPAIR (spec [MONO_INST_SRC2]))
+ MONO_ARCH_INST_IS_REGPAIR (spec [MONO_INST_SRC1]) ||
+ MONO_ARCH_INST_IS_REGPAIR (spec [MONO_INST_SRC2]) ||
+ MONO_ARCH_INST_IS_REGPAIR (spec [MONO_INST_SRC3])) {
/* FIXME: */
g_assert_not_reached ();
+ }
if (spec [MONO_INST_CLOB] == 'c') {
MonoCallInst *call = (MonoCallInst*)ins;
@@ -303,7 +306,7 @@ handle_reg_constraints (MonoCompile *cfg)
if (spec [MONO_INST_CLOB] == '1') {
/* Copying sreg1 to dreg could clobber sreg2 so make a copy of sreg2 */
- if (spec [MONO_INST_SRC2] && (ins->dreg == ins->sreg2)) {
+ if (spec [MONO_INST_SRC2] != ' ' && (ins->dreg == ins->sreg2)) {
int new_sreg2 = mono_alloc_preg (cfg);
MonoInst *move;
g_assert (spec [MONO_INST_DEST] != 'f');
@@ -312,6 +315,7 @@ handle_reg_constraints (MonoCompile *cfg)
prev = move;
ins->sreg2 = new_sreg2;
}
+ g_assert (!(spec [MONO_INST_SRC3] != ' ' && (ins->dreg == ins->sreg3)));
if (spec [MONO_INST_DEST] == 'f')
emit_fp_move (cfg, ins->dreg, ins->sreg1, prev);
else
@@ -329,6 +333,11 @@ handle_reg_constraints (MonoCompile *cfg)
ins->sreg2 = dest_sreg2;
}
+ if (dest_sreg3 != -1) {
+ emit_move (cfg, dest_sreg3, ins->sreg3, prev);
+ ins->sreg3 = dest_sreg3;
+ }
+
if (dest_dreg != -1) {
emit_move (cfg, ins->dreg, dest_dreg, ins);
g_assert (spec [MONO_INST_CLOB] != '1');
@@ -497,6 +506,13 @@ update_gen_kill_set (MonoCompile *cfg, MonoRegallocContext *ctx, MonoBasicBlock
mono_bitset_set_fast (bb->gen_set, sreg);
}
+ /* SREG3 */
+ sreg = ins->sreg3;
+ if (spec [MONO_INST_SRC3] != ' ') {
+ if (!mono_bitset_test_fast (bb->kill_set, sreg))
+ mono_bitset_set_fast (bb->gen_set, sreg);
+ }
+
/* DREG */
if (spec [MONO_INST_DEST] != ' ') {
if (MONO_IS_STORE_MEMBASE (ins)) {
@@ -707,6 +723,17 @@ compute_live_in_out_sets (MonoCompile *cfg, MonoRegallocContext *ctx)
#endif
}
+static MonoLiveInterval*
+get_var_interval (MonoCompile *cfg, MonoRegallocContext *ctx, int idx)
+{
+ MonoLiveInterval *interval = ctx->varinfo [idx].interval;
+ if (interval)
+ return interval;
+ interval = mono_mempool_alloc0 (cfg->mempool, sizeof (MonoLiveInterval));
+ ctx->varinfo [idx].interval = interval;
+ return interval;
+}
+
static inline void
update_liveness (MonoCompile *cfg, MonoRegallocContext *ctx, MonoInst *ins, int inst_num, gint32 *last_use)
{
@@ -730,9 +757,9 @@ update_liveness (MonoCompile *cfg, MonoRegallocContext *ctx, MonoInst *ins, int
* Avoid a hole in the liveness range, since the allocation code
* could think the register is free there.
*/
- mono_linterval_add_range (ctx->cfg, ctx->varinfo [ins->dreg].interval, inst_num, last_use [ins->dreg]);
+ mono_linterval_add_range (ctx->cfg, get_var_interval (cfg, ctx, ins->dreg), inst_num, last_use [ins->dreg]);
} else {
- mono_linterval_add_range (ctx->cfg, ctx->varinfo [ins->dreg].interval, inst_num + INS_POS_DEF, last_use [ins->dreg]);
+ mono_linterval_add_range (ctx->cfg, get_var_interval (cfg, ctx, ins->dreg), inst_num + INS_POS_DEF, last_use [ins->dreg]);
}
last_use [ins->dreg] = 0;
}
@@ -743,7 +770,7 @@ update_liveness (MonoCompile *cfg, MonoRegallocContext *ctx, MonoInst *ins, int
spec = INS_INFO (ins->opcode);
} else {
LIVENESS_DEBUG (printf ("\tdead def of R%d, add range to R%d: [%x, %x]\n", ins->dreg, ins->dreg, inst_num + INS_POS_DEF, inst_num + INS_POS_DEF));
- mono_linterval_add_range (ctx->cfg, ctx->varinfo [ins->dreg].interval, inst_num + INS_POS_DEF, inst_num + INS_POS_DEF);
+ mono_linterval_add_range (ctx->cfg, get_var_interval (cfg, ctx, ins->dreg), inst_num + INS_POS_DEF, inst_num + INS_POS_DEF);
}
}
}
@@ -789,6 +816,20 @@ update_liveness (MonoCompile *cfg, MonoRegallocContext *ctx, MonoInst *ins, int
last_use [sreg] = inst_num + INS_POS_USE;
}
ctx->varinfo [sreg].use_pos = g_slist_prepend_mempool (ctx->cfg->mempool, ctx->varinfo [sreg].use_pos, GINT_TO_POINTER (inst_num));
+
+ /* SREG3 */
+ sreg = ins->sreg3;
+ if (spec [MONO_INST_SRC3] != ' ') {
+ if (last_use [sreg] == 0) {
+ LIVENESS_DEBUG (printf ("\tlast use of R%d set to %x\n", sreg, inst_num + INS_POS_USE));
+ last_use [sreg] = inst_num + INS_POS_USE;
+ }
+ ctx->varinfo [sreg].use_pos = g_slist_prepend_mempool (ctx->cfg->mempool, ctx->varinfo [sreg].use_pos, GINT_TO_POINTER (inst_num));
+
+ /*
+ if (ins->sreg3 <= MONO_MAX_IREGS)
+ mono_linterval_add_range (ctx->cfg, get_var_interval (cfg, ctx, ins->sreg3), inst_num + INS_POS_DEF, inst_num + INS_POS_DEF);
+ */
}
if (ins_get_spec (ins->opcode)[MONO_INST_CLOB] == 'c') {
@@ -830,15 +871,15 @@ update_liveness (MonoCompile *cfg, MonoRegallocContext *ctx, MonoInst *ins, int
if (clob == 'c') {
/* A call clobbers some int/fp registers */
for (l = mono_arch_get_iregs_clobbered_by_call ((MonoCallInst*)ins); l; l = l->next)
- mono_linterval_add_range (ctx->cfg, ctx->varinfo [GPOINTER_TO_INT (l->data)].interval, inst_num + INS_POS_CLOB, inst_num + INS_POS_CLOB);
+ mono_linterval_add_range (ctx->cfg, get_var_interval (cfg, ctx, GPOINTER_TO_INT (l->data)), inst_num + INS_POS_CLOB, inst_num + INS_POS_CLOB);
for (l = mono_arch_get_fregs_clobbered_by_call ((MonoCallInst*)ins); l; l = l->next)
- mono_linterval_add_range (ctx->cfg, ctx->varinfo [GPOINTER_TO_INT (l->data)].interval, inst_num + INS_POS_CLOB, inst_num + INS_POS_CLOB);
+ mono_linterval_add_range (ctx->cfg, get_var_interval (cfg, ctx, GPOINTER_TO_INT (l->data)), inst_num + INS_POS_CLOB, inst_num + INS_POS_CLOB);
}
else {
int clob_reg = MONO_ARCH_INST_FIXED_REG (clob);
if (clob_reg != -1)
- mono_linterval_add_range (ctx->cfg, ctx->varinfo [clob_reg].interval, inst_num + INS_POS_CLOB, inst_num + INS_POS_CLOB);
+ mono_linterval_add_range (ctx->cfg, get_var_interval (cfg, ctx, clob_reg), inst_num + INS_POS_CLOB, inst_num + INS_POS_CLOB);
}
}
}
@@ -861,10 +902,6 @@ compute_intervals (MonoCompile *cfg, MonoRegallocContext *ctx)
reverse_len = 1024;
reverse = mono_mempool_alloc (cfg->mempool, sizeof (MonoInst*) * reverse_len);
- for (idx = 0; idx < max_vars; ++idx) {
- ctx->varinfo [idx].interval = mono_mempool_alloc0 (cfg->mempool, sizeof (MonoLiveInterval));
- }
-
/*
* Process bblocks in reverse order, so the addition of new live ranges
* to the intervals is faster.
@@ -931,7 +968,7 @@ compute_intervals (MonoCompile *cfg, MonoRegallocContext *ctx)
if (last_use [idx] != 0) {
/* Live at exit, not written -> live on enter */
LIVENESS_DEBUG (printf ("Var R%d live at enter, add range to R%d: [%x, %x)\n", idx, idx, block_from, last_use [idx]));
- mono_linterval_add_range (cfg, ctx->varinfo [idx].interval, block_from, last_use [idx]);
+ mono_linterval_add_range (cfg, get_var_interval (cfg, ctx, idx), block_from, last_use [idx]);
}
}
}
@@ -946,14 +983,14 @@ compute_intervals (MonoCompile *cfg, MonoRegallocContext *ctx)
for (i = 0; i < cfg->num_varinfo; i ++) {
MonoMethodVar *vi = MONO_VARINFO (cfg, i);
if ((cfg->varinfo [vi->idx]->opcode == OP_ARG) && (cfg->varinfo [vi->idx] != cfg->ret))
- mono_linterval_add_range (cfg, ctx->varinfo [cfg->varinfo [i]->dreg].interval, 0, 1);
+ mono_linterval_add_range (cfg, get_var_interval (cfg, ctx, cfg->varinfo [i]->dreg), 0, 1);
}
#endif
#if 0
for (idx = 0; idx < max_vars; ++idx) {
printf ("LIVENESS R%d: ", idx);
- mono_linterval_print (ctx->varinfo [idx].interval);
+ mono_linterval_print (get_var_interval (cfg, ctx, idx));
printf ("\n");
}
}
@@ -1204,7 +1241,7 @@ linear_scan (MonoCompile *cfg, MonoRegallocContext *ctx)
/* Create list of allocatable variables */
vars = NULL;
for (i = MONO_FIRST_VREG; i < cfg->next_vreg; ++i) {
- if (ctx->varinfo [i].interval->range)
+ if (get_var_interval (cfg, ctx, i)->range)
vars = g_list_prepend (vars, &ctx->varinfo [i]);
}
@@ -1222,7 +1259,7 @@ linear_scan (MonoCompile *cfg, MonoRegallocContext *ctx)
/* The hard registers are assigned to themselves */
for (i = 0; i < MONO_MAX_IREGS + MONO_MAX_FREGS; ++i) {
ctx->varinfo [i].hreg = i;
- if (ctx->varinfo [i].interval->range)
+ if (get_var_interval (cfg, ctx, i)->range)
inactive = g_list_append (inactive, &ctx->varinfo [i]);
}
@@ -2207,6 +2244,12 @@ rewrite_code (MonoCompile *cfg, MonoRegallocContext *ctx)
ins->sreg2 = l->hreg;
}
+ if (spec [MONO_INST_SRC3] != ' ') {
+ MonoRegallocInterval *l = child_at (&ctx->varinfo [ins->sreg3], pos + INS_POS_USE);
+ g_assert (l->hreg != -1);
+ ins->sreg3 = l->hreg;
+ }
+
if (cfg->verbose_level > 1)
mono_print_ins_index (1, ins);
diff --git a/mono/mini/simd-intrinsics.c b/mono/mini/simd-intrinsics.c
index 24334ce1b73..ff737bbe934 100644
--- a/mono/mini/simd-intrinsics.c
+++ b/mono/mini/simd-intrinsics.c
@@ -12,6 +12,7 @@
#include "mini.h"
#include "ir-emit.h"
+#include "mono/utils/bsearch.h"
/*
General notes on SIMD intrinsics
@@ -1477,7 +1478,7 @@ simd_version_name (guint32 version)
static MonoInst*
emit_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, MonoInst **args, const SimdIntrinsc *intrinsics, guint32 size)
{
- const SimdIntrinsc * result = bsearch (cmethod->name, intrinsics, size, sizeof (SimdIntrinsc), &simd_intrinsic_compare_by_name);
+ const SimdIntrinsc * result = mono_binary_search (cmethod->name, intrinsics, size, sizeof (SimdIntrinsc), &simd_intrinsic_compare_by_name);
if (!result) {
DEBUG (printf ("function doesn't have a simd intrinsic %s::%s/%d\n", cmethod->klass->name, cmethod->name, fsig->param_count));
return NULL;
diff --git a/mono/mini/ssapre.c b/mono/mini/ssapre.c
index df1eaff9f48..a6499d13d5f 100644
--- a/mono/mini/ssapre.c
+++ b/mono/mini/ssapre.c
@@ -658,7 +658,7 @@ check_ssapre_expression_name (MonoSsapreWorkArea *area, MonoSsapreExpressionDesc
return TRUE;
}
if (mono_ssapre_expression_name == NULL) {
- mono_ssapre_expression_name = getenv ("MONO_SSAPRE_EXPRESSION_NAME");
+ mono_ssapre_expression_name = g_getenv ("MONO_SSAPRE_EXPRESSION_NAME");
}
if (mono_ssapre_expression_name != NULL) {
GString *expression_name = g_string_new_len ("", 256);
@@ -2058,7 +2058,7 @@ static char*
mono_ssapre_method_name = NULL;
static gboolean check_ssapre_method_name (MonoCompile *cfg) {
if (mono_ssapre_method_name == NULL) {
- mono_ssapre_method_name = getenv ("MONO_SSAPRE_METHOD_NAME");
+ mono_ssapre_method_name = g_getenv ("MONO_SSAPRE_METHOD_NAME");
}
if (mono_ssapre_method_name != NULL) {
char *method_name = mono_method_full_name (cfg->method, TRUE);
diff --git a/mono/mini/tasklets.c b/mono/mini/tasklets.c
index a287c730428..d94448ab5f1 100644
--- a/mono/mini/tasklets.c
+++ b/mono/mini/tasklets.c
@@ -69,12 +69,12 @@ continuation_mark_frame (MonoContinuation *cont)
ctx = new_ctx;
if (endloop)
break;
- if (strcmp (ji->method->name, "Mark") == 0)
+ if (strcmp (jinfo_get_method (ji)->name, "Mark") == 0)
endloop = TRUE;
} while (1);
cont->top_sp = MONO_CONTEXT_GET_SP (&ctx);
- /*g_print ("method: %s, sp: %p\n", ji->method->name, cont->top_sp);*/
+ /*g_print ("method: %s, sp: %p\n", jinfo_get_method (ji)->name, cont->top_sp);*/
return NULL;
}
diff --git a/mono/mini/trace.c b/mono/mini/trace.c
index 024ddaf20ee..f67b704c362 100644
--- a/mono/mini/trace.c
+++ b/mono/mini/trace.c
@@ -661,7 +661,7 @@ handle_enum:
case MONO_TYPE_R4:
case MONO_TYPE_R8: {
double f = va_arg (ap, double);
- printf ("FP=%f\n", f);
+ printf ("FP=%f", f);
break;
}
case MONO_TYPE_VALUETYPE:
diff --git a/mono/mini/tramp-amd64.c b/mono/mini/tramp-amd64.c
index 071175a440e..2e92b35b6b8 100644
--- a/mono/mini/tramp-amd64.c
+++ b/mono/mini/tramp-amd64.c
@@ -29,13 +29,11 @@
#if defined(__native_client_codegen__) && defined(__native_client__)
#include <malloc.h>
-#include <sys/nacl_syscalls.h>
+#include <nacl/nacl_dyncode.h>
#endif
#define IS_REX(inst) (((inst) >= 0x40) && ((inst) <= 0x4f))
-static guint8* nullified_class_init_trampoline;
-
/*
* mono_arch_get_unbox_trampoline:
* @m: method pointer
@@ -165,11 +163,11 @@ mono_arch_patch_callsite (guint8 *method_start, guint8 *orig_code, guint8 *addr)
/* Print some diagnostics */
MonoJitInfo *ji = mono_jit_info_table_find (mono_domain_get (), (char*)orig_code);
if (ji)
- fprintf (stderr, "At %s, offset 0x%zx\n", mono_method_full_name (ji->method, TRUE), (guint8*)orig_code - (guint8*)ji->code_start);
+ fprintf (stderr, "At %s, offset 0x%zx\n", mono_method_full_name (jinfo_get_method (ji), TRUE), (guint8*)orig_code - (guint8*)ji->code_start);
fprintf (stderr, "Addr: %p\n", addr);
ji = mono_jit_info_table_find (mono_domain_get (), (char*)addr);
if (ji)
- fprintf (stderr, "Callee: %s\n", mono_method_full_name (ji->method, TRUE));
+ fprintf (stderr, "Callee: %s\n", mono_method_full_name (jinfo_get_method (ji), TRUE));
g_assert_not_reached ();
#else
/*
@@ -336,6 +334,7 @@ mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
guint8 buf [16];
MonoJitInfo *ji = NULL;
gboolean can_write;
+ gpointer tramp = mini_get_nullified_class_init_trampoline ();
if (mono_use_llvm) {
/* code - 7 might be before the start of the method */
@@ -360,7 +359,7 @@ mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
vtable_slot = get_vcall_slot_addr (code, regs);
g_assert (vtable_slot);
- *vtable_slot = nullified_class_init_trampoline;
+ *vtable_slot = tramp;
} else if (buf [2] == 0xe8) {
/* call <TARGET> */
//guint8 *buf = code - 2;
@@ -378,11 +377,11 @@ mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
buf [4] = 0x90;
*/
- mono_arch_patch_callsite (code - 5, code, nullified_class_init_trampoline);
+ mono_arch_patch_callsite (code - 5, code, tramp);
} else if ((buf [5] == 0xff) && x86_modrm_mod (buf [6]) == 3 && x86_modrm_reg (buf [6]) == 2) {
/* call *<reg> */
/* Generated by the LLVM JIT or on platforms without MAP_32BIT set */
- mono_arch_patch_callsite (code - 13, code, nullified_class_init_trampoline);
+ mono_arch_patch_callsite (code - 13, code, tramp);
} else if (buf [4] == 0x90 || buf [5] == 0xeb || buf [6] == 0x66) {
/* Already changed by another thread */
;
@@ -396,10 +395,7 @@ mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
void
mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
{
- if (mono_aot_only && !nullified_class_init_trampoline)
- nullified_class_init_trampoline = mono_aot_get_trampoline ("nullified_class_init_trampoline");
-
- mono_arch_patch_plt_entry (code, NULL, regs, nullified_class_init_trampoline);
+ mono_arch_patch_plt_entry (code, NULL, regs, mini_get_nullified_class_init_trampoline ());
}
static void
@@ -412,6 +408,7 @@ stack_unaligned (MonoTrampolineType tramp_type)
guchar*
mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
+ char *tramp_name;
guint8 *buf, *code, *tramp, *br [2], *r11_save_code, *after_r11_save_code;
int i, lmf_offset, offset, res_offset, arg_offset, rax_offset, tramp_offset, saved_regs_offset;
int saved_fpregs_offset, rbp_offset, framesize, orig_rsp_to_rbp_offset, cfa_offset;
@@ -719,14 +716,12 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
mono_arch_flush_icache (buf, code - buf);
- if (tramp_type == MONO_TRAMPOLINE_CLASS_INIT) {
- /* Initialize the nullified class init trampoline used in the AOT case */
- nullified_class_init_trampoline = mono_arch_get_nullified_class_init_trampoline (NULL);
+ if (info) {
+ tramp_name = mono_get_generic_trampoline_name (tramp_type);
+ *info = mono_tramp_info_create (tramp_name, buf, code - buf, ji, unwind_ops);
+ g_free (tramp_name);
}
- if (info)
- *info = mono_tramp_info_create (mono_get_generic_trampoline_name (tramp_type), buf, code - buf, ji, unwind_ops);
-
return buf;
}
@@ -746,9 +741,6 @@ mono_arch_get_nullified_class_init_trampoline (MonoTrampInfo **info)
if (info)
*info = mono_tramp_info_create ("nullified_class_init_trampoline", buf, code - buf, NULL, NULL);
- if (mono_jit_map_is_enabled ())
- mono_emit_jit_tramp (buf, code - buf, "nullified_class_init_trampoline");
-
return buf;
}
diff --git a/mono/mini/tramp-arm.c b/mono/mini/tramp-arm.c
index 44ef52d89ea..225ef9f4e7c 100644
--- a/mono/mini/tramp-arm.c
+++ b/mono/mini/tramp-arm.c
@@ -22,9 +22,6 @@
#define ALIGN_TO(val,align) ((((guint64)val) + ((align) - 1)) & ~((align) - 1))
-static guint8* nullified_class_init_trampoline;
-
-
#ifdef USE_JUMP_TABLES
static guint16
@@ -131,16 +128,13 @@ mono_arch_patch_plt_entry (guint8 *code, gpointer *got, mgreg_t *regs, guint8 *a
void
mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
{
- mono_arch_patch_callsite (NULL, code, nullified_class_init_trampoline);
+ mono_arch_patch_callsite (NULL, code, mini_get_nullified_class_init_trampoline ());
}
void
mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
{
- if (mono_aot_only && !nullified_class_init_trampoline)
- nullified_class_init_trampoline = mono_aot_get_trampoline ("nullified_class_init_trampoline");
-
- mono_arch_patch_plt_entry (code, NULL, regs, nullified_class_init_trampoline);
+ mono_arch_patch_plt_entry (code, NULL, regs, mini_get_nullified_class_init_trampoline ());
}
#ifndef DISABLE_JIT
@@ -192,6 +186,7 @@ emit_bx (guint8* code, int reg)
guchar*
mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
+ char *tramp_name;
guint8 *buf, *code = NULL;
#ifdef USE_JUMP_TABLES
gpointer *load_get_lmf_addr = NULL, *load_trampoline = NULL;
@@ -451,12 +446,11 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
/* Sanity check */
g_assert ((code - buf) <= buf_len);
- if (tramp_type == MONO_TRAMPOLINE_CLASS_INIT)
- /* Initialize the nullified class init trampoline used in the AOT case */
- nullified_class_init_trampoline = mono_arch_get_nullified_class_init_trampoline (NULL);
-
- if (info)
- *info = mono_tramp_info_create (mono_get_generic_trampoline_name (tramp_type), buf, code - buf, ji, unwind_ops);
+ if (info) {
+ tramp_name = mono_get_generic_trampoline_name (tramp_type);
+ *info = mono_tramp_info_create (tramp_name, buf, code - buf, ji, unwind_ops);
+ g_free (tramp_name);
+ }
return buf;
}
@@ -924,6 +918,13 @@ mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean a
g_assert_not_reached ();
return NULL;
}
+
+gpointer
+mono_arch_get_nullified_class_init_trampoline (MonoTrampInfo **info)
+{
+ g_assert_not_reached ();
+ return NULL;
+}
#endif /* DISABLE_JIT */
diff --git a/mono/mini/tramp-mips.c b/mono/mini/tramp-mips.c
index c1ff0204d50..b0e7be95e01 100644
--- a/mono/mini/tramp-mips.c
+++ b/mono/mini/tramp-mips.c
@@ -24,8 +24,6 @@
#include "mini.h"
#include "mini-mips.h"
-static guint8* nullified_class_init_trampoline;
-
/*
* get_unbox_trampoline:
* @m: method pointer
@@ -116,10 +114,7 @@ mono_arch_patch_plt_entry (guint8 *code, gpointer *got, mgreg_t *regs, guint8 *a
void
mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
{
- if (mono_aot_only && !nullified_class_init_trampoline)
- nullified_class_init_trampoline = mono_aot_get_trampoline ("nullified_class_init_trampoline");
-
- mono_arch_patch_plt_entry (code, NULL, regs, nullified_class_init_trampoline);
+ mono_arch_patch_plt_entry (code, NULL, regs, mini_get_nullified_class_init_trampoline ());
}
void
@@ -176,6 +171,7 @@ mono_arch_get_nullified_class_init_trampoline (MonoTrampInfo **info)
guchar*
mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
+ char *tramp_name;
guint8 *buf, *tramp, *code = NULL;
int i, lmf;
GSList *unwind_ops = NULL;
@@ -313,12 +309,11 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
/* Sanity check */
g_assert ((code - buf) <= max_code_len);
- if (tramp_type == MONO_TRAMPOLINE_CLASS_INIT)
- /* Initialize the nullified class init trampoline used in the AOT case */
- nullified_class_init_trampoline = mono_arch_get_nullified_class_init_trampoline (NULL);
-
- if (info)
- *info = mono_tramp_info_create (mono_get_generic_trampoline_name (tramp_type), buf, code - buf, ji, unwind_ops);
+ if (info) {
+ tramp_name = mono_get_generic_trampoline_name (tramp_type);
+ *info = mono_tramp_info_create (tramp_name, buf, code - buf, ji, unwind_ops);
+ g_free (tramp_name);
+ }
return buf;
}
diff --git a/mono/mini/tramp-ppc.c b/mono/mini/tramp-ppc.c
index 7e719be329d..671b90a4937 100644
--- a/mono/mini/tramp-ppc.c
+++ b/mono/mini/tramp-ppc.c
@@ -22,8 +22,6 @@
#include "mini.h"
#include "mini-ppc.h"
-static guint8* nullified_class_init_trampoline;
-
/* Same as mono_create_ftnptr, but doesn't require a domain */
static gpointer
mono_ppc_create_ftnptr (guint8 *code)
@@ -200,16 +198,13 @@ mono_arch_patch_plt_entry (guint8 *code, gpointer *got, mgreg_t *regs, guint8 *a
void
mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
{
- mono_arch_patch_callsite (NULL, code, nullified_class_init_trampoline);
+ mono_arch_patch_callsite (NULL, code, mini_get_nullified_class_init_trampoline ());
}
void
mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
{
- if (mono_aot_only && !nullified_class_init_trampoline)
- nullified_class_init_trampoline = mono_aot_get_trampoline ("nullified_class_init_trampoline");
-
- mono_arch_patch_plt_entry (code, NULL, regs, nullified_class_init_trampoline);
+ mono_arch_patch_plt_entry (code, NULL, regs, mini_get_nullified_class_init_trampoline ());
}
/* Stack size for trampoline function
@@ -248,7 +243,7 @@ mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
guchar*
mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
-
+ char *tramp_name;
guint8 *buf, *code = NULL;
int i, offset;
gconstpointer tramp_handler;
@@ -440,14 +435,12 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
/* Sanity check */
g_assert ((code - buf) <= size);
- if (tramp_type == MONO_TRAMPOLINE_CLASS_INIT) {
- /* Initialize the nullified class init trampoline */
- nullified_class_init_trampoline = mono_ppc_create_ftnptr (mono_arch_get_nullified_class_init_trampoline (NULL));
+ if (info) {
+ tramp_name = mono_get_generic_trampoline_name (tramp_type);
+ *info = mono_tramp_info_create (tramp_name, buf, code - buf, ji, unwind_ops);
+ g_free (tramp_name);
}
- if (info)
- *info = mono_tramp_info_create (mono_get_generic_trampoline_name (tramp_type), buf, code - buf, ji, unwind_ops);
-
return buf;
}
diff --git a/mono/mini/tramp-s390x.c b/mono/mini/tramp-s390x.c
index 7c6d914ebe2..0888809884a 100644
--- a/mono/mini/tramp-s390x.c
+++ b/mono/mini/tramp-s390x.c
@@ -193,6 +193,32 @@ mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
/*------------------------------------------------------------------*/
/* */
+/* Name - mono_arch_get_nullified_class_init */
+/* */
+/* Function - Nullify a PLT entry call. */
+/* */
+/*------------------------------------------------------------------*/
+
+gpointer
+mono_arch_get_nullified_class_init_trampoline (MonoTrampInfo **info)
+{
+ guint8 *buf, *code;
+
+ code = buf = mono_global_codeman_reserve (16);
+
+ s390_br (code, s390_r14);
+
+ if (info)
+ *info = mono_tramp_info_create ("nullified_class_init_trampoline",
+ buf, code - buf, NULL, NULL);
+
+ return (buf);
+}
+
+/*========================= End of Function ========================*/
+
+/*------------------------------------------------------------------*/
+/* */
/* Name - mono_arch_nullify_plt_entry */
/* */
/* Function - Nullify a PLT entry call. */
@@ -219,6 +245,7 @@ mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
guchar*
mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
+ char *tramp_name;
guint8 *buf, *tramp, *code;
int i, offset, lmfOffset;
GSList *unwind_ops = NULL;
@@ -401,9 +428,11 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
/* Flush instruction cache, since we've generated code */
mono_arch_flush_icache (code, buf - code);
- if (info)
- *info = mono_tramp_info_create (mono_get_generic_trampoline_name(tramp_type),
- buf, buf - code, ji, unwind_ops);
+ if (info) {
+ tramp_name = mono_get_generic_trampoline_name (tramp_type);
+ *info = mono_tramp_info_create (tramp_name, buf, buf - code, ji, unwind_ops);
+ g_free (tramp_name);
+ }
/* Sanity check */
g_assert ((buf - code) <= 512);
diff --git a/mono/mini/tramp-sparc.c b/mono/mini/tramp-sparc.c
index a1f5afd4576..89418779664 100644
--- a/mono/mini/tramp-sparc.c
+++ b/mono/mini/tramp-sparc.c
@@ -273,3 +273,20 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
g_assert_not_reached ();
return NULL;
}
+
+gpointer
+mono_arch_get_nullified_class_init_trampoline (MonoTrampInfo **info)
+{
+ guint8 *buf, *code;
+
+ code = buf = mono_global_codeman_reserve (16);
+
+ sparc_ret (code);
+
+ mono_arch_flush_icache (buf, code - buf);
+
+ if (info)
+ *info = mono_tramp_info_create ("nullified_class_init_trampoline", buf, code - buf, NULL, NULL);
+
+ return buf;
+}
diff --git a/mono/mini/tramp-x86.c b/mono/mini/tramp-x86.c
index 592d0c603d1..e48929831c7 100644
--- a/mono/mini/tramp-x86.c
+++ b/mono/mini/tramp-x86.c
@@ -25,8 +25,6 @@
#include "mini.h"
#include "mini-x86.h"
-static guint8* nullified_class_init_trampoline;
-
/*
* mono_arch_get_unbox_trampoline:
* @m: method pointer
@@ -239,6 +237,7 @@ mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
{
guint8 buf [16];
gboolean can_write = mono_breakpoint_clean_code (NULL, code, 6, buf, sizeof (buf));
+ gpointer tramp = mini_get_nullified_class_init_trampoline ();
if (!can_write)
return;
@@ -273,7 +272,7 @@ mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
//VALGRIND_DISCARD_TRANSLATIONS (code, 8);
}
#elif defined(__native_client_codegen__)
- mono_arch_patch_callsite (code, code + 5, nullified_class_init_trampoline);
+ mono_arch_patch_callsite (code, code + 5, tramp);
#endif
} else if (code [0] == 0x90 || code [0] == 0xeb) {
/* Already changed by another thread */
@@ -285,7 +284,7 @@ mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
vtable_slot = get_vcall_slot_addr (code + 5, regs);
g_assert (vtable_slot);
- *vtable_slot = nullified_class_init_trampoline;
+ *vtable_slot = tramp;
} else {
printf ("Invalid trampoline sequence: %x %x %x %x %x %x %x\n", code [0], code [1], code [2], code [3],
code [4], code [5], code [6]);
@@ -296,15 +295,13 @@ mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
void
mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
{
- if (mono_aot_only && !nullified_class_init_trampoline)
- nullified_class_init_trampoline = mono_aot_get_trampoline ("nullified_class_init_trampoline");
-
- mono_arch_patch_plt_entry (code, NULL, regs, nullified_class_init_trampoline);
+ mono_arch_patch_plt_entry (code, NULL, regs, mini_get_nullified_class_init_trampoline ());
}
guchar*
mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
{
+ char *tramp_name;
guint8 *buf, *code, *tramp;
int pushed_args, pushed_args_caller_saved;
GSList *unwind_ops = NULL;
@@ -524,17 +521,22 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
g_assert (pushed_args == -1);
}
- x86_ret (code);
+ /*block guard trampolines are called with the stack aligned but must exit with the stack unaligned. */
+ if (tramp_type == MONO_TRAMPOLINE_HANDLER_BLOCK_GUARD) {
+ x86_pop_reg (code, X86_EAX);
+ x86_alu_reg_imm (code, X86_ADD, X86_ESP, 0x8);
+ x86_jump_reg (code, X86_EAX);
+ } else {
+ x86_ret (code);
+ }
nacl_global_codeman_validate (&buf, 256, &code);
g_assert ((code - buf) <= 256);
- if (info)
- *info = mono_tramp_info_create (mono_get_generic_trampoline_name (tramp_type), buf, code - buf, ji, unwind_ops);
-
- if (tramp_type == MONO_TRAMPOLINE_CLASS_INIT) {
- /* Initialize the nullified class init trampoline used in the AOT case */
- nullified_class_init_trampoline = mono_arch_get_nullified_class_init_trampoline (NULL);
+ if (info) {
+ tramp_name = mono_get_generic_trampoline_name (tramp_type);
+ *info = mono_tramp_info_create (tramp_name, buf, code - buf, ji, unwind_ops);
+ g_free (tramp_name);
}
return buf;
@@ -556,9 +558,6 @@ mono_arch_get_nullified_class_init_trampoline (MonoTrampInfo **info)
if (info)
*info = mono_tramp_info_create ("nullified_class_init_trampoline", buf, code - buf, NULL, NULL);
- if (mono_jit_map_is_enabled ())
- mono_emit_jit_tramp (buf, code - buf, "nullified_class_init_trampoline");
-
return buf;
}
diff --git a/mono/mini/xdebug.c b/mono/mini/xdebug.c
index 9081b6f191a..517fe8e1d21 100644
--- a/mono/mini/xdebug.c
+++ b/mono/mini/xdebug.c
@@ -105,7 +105,7 @@ struct jit_descriptor
/* GDB puts a breakpoint in this function. */
void MONO_NOINLINE __jit_debug_register_code(void);
-#if !defined(MONO_LLVM_LOADED) && defined(ENABLE_LLVM)
+#if !defined(MONO_LLVM_LOADED) && defined(ENABLE_LLVM) && !defined(MONO_CROSS_COMPILE)
/* LLVM already defines these */
@@ -134,7 +134,7 @@ static int il_file_line_index;
static GHashTable *xdebug_syms;
void
-mono_xdebug_init (char *options)
+mono_xdebug_init (const char *options)
{
MonoImageWriter *w;
char **args, **ptr;
@@ -294,8 +294,8 @@ mono_save_xdebug_info (MonoCompile *cfg)
xdebug_method_count ++;
- dmji = mono_debug_find_method (cfg->jit_info->method, mono_domain_get ());;
- mono_dwarf_writer_emit_method (xdebug_writer, cfg, cfg->jit_info->method, NULL, NULL, cfg->jit_info->code_start, cfg->jit_info->code_size, cfg->args, cfg->locals, cfg->unwind_ops, dmji);
+ dmji = mono_debug_find_method (jinfo_get_method (cfg->jit_info), mono_domain_get ());;
+ mono_dwarf_writer_emit_method (xdebug_writer, cfg, jinfo_get_method (cfg->jit_info), NULL, NULL, cfg->jit_info->code_start, cfg->jit_info->code_size, cfg->args, cfg->locals, cfg->unwind_ops, dmji);
mono_debug_free_method_jit_info (dmji);
#if 0
@@ -323,8 +323,8 @@ mono_save_xdebug_info (MonoCompile *cfg)
return;
mono_loader_lock ();
- dmji = mono_debug_find_method (cfg->jit_info->method, mono_domain_get ());;
- mono_dwarf_writer_emit_method (xdebug_writer, cfg, cfg->jit_info->method, NULL, NULL, cfg->jit_info->code_start, cfg->jit_info->code_size, cfg->args, cfg->locals, cfg->unwind_ops, dmji);
+ dmji = mono_debug_find_method (jinfo_get_method (cfg->jit_info), mono_domain_get ());
+ mono_dwarf_writer_emit_method (xdebug_writer, cfg, jinfo_get_method (cfg->jit_info), NULL, NULL, cfg->jit_info->code_start, cfg->jit_info->code_size, cfg->args, cfg->locals, cfg->unwind_ops, dmji);
mono_debug_free_method_jit_info (dmji);
fflush (xdebug_fp);
mono_loader_unlock ();
@@ -369,7 +369,7 @@ mono_save_trampoline_xdebug_info (MonoTrampInfo *info)
#else /* !defined(DISABLE_AOT) && !defined(DISABLE_JIT) */
void
-mono_xdebug_init (char *options)
+mono_xdebug_init (const char *options)
{
}
diff --git a/mono/profiler/proflog.c b/mono/profiler/proflog.c
index 24fade03a89..4254660faee 100644
--- a/mono/profiler/proflog.c
+++ b/mono/profiler/proflog.c
@@ -65,12 +65,12 @@
#endif
/* the architecture needs a memory fence */
-#if defined(__linux__) && (defined(__i386__) || defined(__x86_64__))
+#if defined(__linux__) && (defined(__i386__) || defined(__x86_64__) || defined(__arm__))
#include <unistd.h>
#include <sys/syscall.h>
#include "perf_event.h"
#define USE_PERF_EVENTS 1
-static int read_perf_mmap (MonoProfiler* prof);
+static int read_perf_mmap (MonoProfiler* prof, int cpu);
#endif
#define BUFFER_SIZE (4096 * 16)
@@ -1558,15 +1558,74 @@ dump_sample_hits (MonoProfiler *prof, StatBuffer *sbuf, int recurse)
#if USE_PERF_EVENTS
#ifndef __NR_perf_event_open
+#ifdef __arm__
+#define __NR_perf_event_open 364
+#else
#define __NR_perf_event_open 241
#endif
+#endif
+
+static int
+mono_cpu_count (void)
+{
+ int count = 0;
+#ifdef PLATFORM_ANDROID
+ /* Android tries really hard to save power by powering off CPUs on SMP phones which
+ * means the normal way to query cpu count returns a wrong value with userspace API.
+ * Instead we use /sys entries to query the actual hardware CPU count.
+ */
+ char buffer[8] = {'\0'};
+ int present = open ("/sys/devices/system/cpu/present", O_RDONLY);
+ /* Format of the /sys entry is a cpulist of indexes which in the case
+ * of present is always of the form "0-(n-1)" when there is more than
+ * 1 core, n being the number of CPU cores in the system. Otherwise
+ * the value is simply 0
+ */
+ if (present != -1 && read (present, (char*)buffer, sizeof (buffer)) > 3)
+ count = strtol (((char*)buffer) + 2, NULL, 10);
+ if (present != -1)
+ close (present);
+ if (count > 0)
+ return count + 1;
+#endif
+#ifdef _SC_NPROCESSORS_ONLN
+ count = sysconf (_SC_NPROCESSORS_ONLN);
+ if (count > 0)
+ return count;
+#endif
+#ifdef USE_SYSCTL
+ {
+ int mib [2];
+ size_t len = sizeof (int);
+ mib [0] = CTL_HW;
+ mib [1] = HW_NCPU;
+ if (sysctl (mib, 2, &count, &len, NULL, 0) == 0)
+ return count;
+ }
+#endif
+#ifdef HOST_WIN32
+ {
+ SYSTEM_INFO info;
+ GetSystemInfo (&info);
+ return info.dwNumberOfProcessors;
+ }
+#endif
+ /* FIXME: warn */
+ return 1;
+}
-static int perf_fd = -1;
-static void *mmap_base;
-static struct perf_event_mmap_page *page_desc = NULL;
-static int num_pages = 64;
+typedef struct {
+ int perf_fd;
+ unsigned int prev_pos;
+ void *mmap_base;
+ struct perf_event_mmap_page *page_desc;
+} PerfData ;
+
+static PerfData *perf_data = NULL;
+static int num_perf;
+#define PERF_PAGES_SHIFT 4
+static int num_pages = 1 << PERF_PAGES_SHIFT;
static unsigned int mmap_mask;
-static unsigned int prev_pos = 0;
typedef struct {
struct perf_event_header h;
@@ -1587,24 +1646,25 @@ perf_event_syscall (struct perf_event_attr *attr, pid_t pid, int cpu, int group_
return syscall(/*__NR_perf_event_open*/ 298, attr, pid, cpu, group_fd, flags);
#elif defined(__i386__)
return syscall(/*__NR_perf_event_open*/ 336, attr, pid, cpu, group_fd, flags);
+#elif defined(__arm__)
+ return syscall(/*__NR_perf_event_open*/ 364, attr, pid, cpu, group_fd, flags);
#else
return -1;
#endif
}
static int
-setup_perf_map (void)
+setup_perf_map (PerfData *perf)
{
- mmap_mask = num_pages * getpagesize () - 1;
- mmap_base = mmap (NULL, (num_pages + 1) * getpagesize (), PROT_READ|PROT_WRITE, MAP_SHARED, perf_fd, 0);
- if (mmap_base == MAP_FAILED) {
+ perf->mmap_base = mmap (NULL, (num_pages + 1) * getpagesize (), PROT_READ|PROT_WRITE, MAP_SHARED, perf->perf_fd, 0);
+ if (perf->mmap_base == MAP_FAILED) {
if (do_debug)
printf ("failed mmap\n");
return 0;
}
- page_desc = mmap_base;
+ perf->page_desc = perf->mmap_base;
if (do_debug)
- printf ("mmap version: %d\n", page_desc->version);
+ printf ("mmap version: %d\n", perf->page_desc->version);
return 1;
}
@@ -1646,11 +1706,12 @@ dump_perf_hits (MonoProfiler *prof, void *buf, int size)
/* read events from the ring buffer */
static int
-read_perf_mmap (MonoProfiler* prof)
+read_perf_mmap (MonoProfiler* prof, int cpu)
{
+ PerfData *perf = perf_data + cpu;
unsigned char *buf;
- unsigned char *data = (unsigned char*)mmap_base + getpagesize ();
- unsigned int head = page_desc->data_head;
+ unsigned char *data = (unsigned char*)perf->mmap_base + getpagesize ();
+ unsigned int head = perf->page_desc->data_head;
int diff, size;
unsigned int old;
@@ -1658,9 +1719,13 @@ read_perf_mmap (MonoProfiler* prof)
asm volatile("lock; addl $0,0(%%esp)":::"memory");
#elif defined (__x86_64__)
asm volatile("lfence":::"memory");
+#elif defined (__arm__)
+ ((void(*)(void))0xffff0fa0)();
+#else
+ asm volatile("":::"memory");
#endif
- old = prev_pos;
+ old = perf->prev_pos;
diff = head - old;
if (diff < 0) {
if (do_debug)
@@ -1684,13 +1749,13 @@ read_perf_mmap (MonoProfiler* prof)
printf ("found bytes of events: %d\n", size);
dump_perf_hits (prof, buf, size);
old += size;
- prev_pos = old;
- page_desc->data_tail = old;
+ perf->prev_pos = old;
+ perf->page_desc->data_tail = old;
return 0;
}
static int
-setup_perf_event (void)
+setup_perf_event_for_cpu (PerfData *perf, int cpu)
{
struct perf_event_attr attr;
memset (&attr, 0, sizeof (attr));
@@ -1711,11 +1776,11 @@ setup_perf_event (void)
attr.freq = 1;
attr.sample_freq = sample_freq;
- perf_fd = perf_event_syscall (&attr, getpid (), -1, -1, 0);
+ perf->perf_fd = perf_event_syscall (&attr, getpid (), cpu, -1, 0);
if (do_debug)
- printf ("perf fd: %d, freq: %d, event: %llu\n", perf_fd, sample_freq, attr.config);
- if (perf_fd < 0) {
- if (perf_fd == -EPERM) {
+ printf ("perf fd: %d, freq: %d, event: %llu\n", perf->perf_fd, sample_freq, attr.config);
+ if (perf->perf_fd < 0) {
+ if (perf->perf_fd == -EPERM) {
fprintf (stderr, "Perf syscall denied, do \"echo 1 > /proc/sys/kernel/perf_event_paranoid\" as root to enable.\n");
} else {
if (do_debug)
@@ -1723,14 +1788,31 @@ setup_perf_event (void)
}
return 0;
}
- if (!setup_perf_map ()) {
- close (perf_fd);
- perf_fd = -1;
+ if (!setup_perf_map (perf)) {
+ close (perf->perf_fd);
+ perf->perf_fd = -1;
return 0;
}
return 1;
}
+static int
+setup_perf_event (void)
+{
+ int i, count = 0;
+ mmap_mask = num_pages * getpagesize () - 1;
+ num_perf = mono_cpu_count ();
+ perf_data = calloc (num_perf, sizeof (PerfData));
+ for (i = 0; i < num_perf; ++i) {
+ count += setup_perf_event_for_cpu (perf_data + i, i);
+ }
+ if (count)
+ return 1;
+ free (perf_data);
+ perf_data = NULL;
+ return 0;
+}
+
#endif /* USE_PERF_EVENTS */
static void
@@ -1746,8 +1828,11 @@ log_shutdown (MonoProfiler *prof)
}
#endif
#if USE_PERF_EVENTS
- if (page_desc)
- read_perf_mmap (prof);
+ if (perf_data) {
+ int i;
+ for (i = 0; i < num_perf; ++i)
+ read_perf_mmap (prof, i);
+ }
#endif
dump_sample_hits (prof, prof->stat_buffers, 1);
take_lock ();
@@ -1853,10 +1938,15 @@ helper_thread (void* arg)
max_fd = command_socket;
}
#if USE_PERF_EVENTS
- if (perf_fd >= 0) {
- FD_SET (perf_fd, &rfds);
- if (max_fd < perf_fd)
- max_fd = perf_fd;
+ if (perf_data) {
+ int i;
+ for ( i = 0; i < num_perf; ++i) {
+ if (perf_data [i].perf_fd < 0)
+ continue;
+ FD_SET (perf_data [i].perf_fd, &rfds);
+ if (max_fd < perf_data [i].perf_fd)
+ max_fd = perf_data [i].perf_fd;
+ }
}
#endif
tv.tv_sec = 1;
@@ -1889,16 +1979,30 @@ helper_thread (void* arg)
if (do_debug)
fprintf (stderr, "helper shutdown\n");
#if USE_PERF_EVENTS
- if (perf_fd >= 0)
- read_perf_mmap (prof);
+ if (perf_data) {
+ int i;
+ for ( i = 0; i < num_perf; ++i) {
+ if (perf_data [i].perf_fd < 0)
+ continue;
+ if (FD_ISSET (perf_data [i].perf_fd, &rfds))
+ read_perf_mmap (prof, i);
+ }
+ }
#endif
safe_dump (prof, ensure_logbuf (0));
return NULL;
}
#if USE_PERF_EVENTS
- if (perf_fd >= 0 && FD_ISSET (perf_fd, &rfds)) {
- read_perf_mmap (prof);
- safe_dump (prof, ensure_logbuf (0));
+ if (perf_data) {
+ int i;
+ for ( i = 0; i < num_perf; ++i) {
+ if (perf_data [i].perf_fd < 0)
+ continue;
+ if (FD_ISSET (perf_data [i].perf_fd, &rfds)) {
+ read_perf_mmap (prof, i);
+ safe_dump (prof, ensure_logbuf (0));
+ }
+ }
}
#endif
if (command_socket >= 0 && FD_ISSET (command_socket, &rfds)) {
@@ -2041,7 +2145,7 @@ create_profiler (const char *filename)
#if USE_PERF_EVENTS
if (sample_type && !do_mono_sample)
need_helper_thread = setup_perf_event ();
- if (perf_fd < 0) {
+ if (!perf_data) {
/* FIXME: warn if different freq or sample type */
do_mono_sample = 1;
}
diff --git a/mono/profiler/ptestrunner.pl b/mono/profiler/ptestrunner.pl
index 36ae39ec532..96f2e0137c7 100755
--- a/mono/profiler/ptestrunner.pl
+++ b/mono/profiler/ptestrunner.pl
@@ -16,6 +16,7 @@ my $minibuilddir = $builddir . "/mono/mini";
# for the profiler module
append_path ("LD_LIBRARY_PATH", $profbuilddir . "/.libs");
append_path ("DYLD_LIBRARY_PATH", $profbuilddir . "/.libs");
+append_path ("DYLD_LIBRARY_PATH", $minibuilddir . "/.libs");
# for mprof-report
append_path ("PATH", $profbuilddir);
@@ -37,7 +38,8 @@ $report = run_test ("test-busy.exe", "report,sample");
check_report_basics ($report);
check_report_threads ($report, "BusyHelper");
# at least 40% of the samples should hit each of the two busy methods
-check_report_samples ($report, "T:test ()" => 40, "T:test3 ()" => 40);
+# This seems to fail on osx, where the main thread gets the majority of SIGPROF signals
+#check_report_samples ($report, "T:test ()" => 40, "T:test3 ()" => 40);
report_errors ();
# test lock events
$report = run_test ("test-monitor.exe");
@@ -56,20 +58,20 @@ report_errors ();
$report = run_test_sgen ("test-heapshot.exe", "report,heapshot");
if ($report ne "missing binary") {
check_report_basics ($report);
- check_report_heapshot ($report, 0, {"T" => 5000});
- check_report_heapshot ($report, 1, {"T" => 5023});
+ check_report_heapshot ($report, 1, {"T" => 5000});
+ check_report_heapshot ($report, 2, {"T" => 5023});
report_errors ();
}
# test heapshot traces
$report = run_test_sgen ("test-heapshot.exe", "heapshot,output=-traces.mlpd", "--traces traces.mlpd");
if ($report ne "missing binary") {
check_report_basics ($report);
- check_report_heapshot ($report, 0, {"T" => 5000});
- check_report_heapshot ($report, 1, {"T" => 5023});
- check_heapshot_traces ($report, 0,
+ check_report_heapshot ($report, 1, {"T" => 5000});
+ check_report_heapshot ($report, 2, {"T" => 5023});
+ check_heapshot_traces ($report, 1,
T => [4999, "T"]
);
- check_heapshot_traces ($report, 1,
+ check_heapshot_traces ($report, 2,
T => [5022, "T"]
);
report_errors ();
@@ -344,9 +346,9 @@ sub check_report_heapshot
$section = get_heap_shot ($section, $hshot);
foreach my $type (keys %allocs) {
if ($section =~ /\d+\s+(\d+)\s+\d+\s+\Q$type\E(\s+\(bytes.*\))?$/m) {
- push @errors, "Wrong heapshot for type $type." unless $1 >= $allocs{$type};
+ push @errors, "Wrong heapshot for type $type at $hshot ($1, $allocs{$type})." unless $1 >= $allocs{$type};
} else {
- push @errors, "No heapshot for type $type.";
+ push @errors, "No heapshot for type $type at heapshot $hshot.";
}
}
}
diff --git a/mono/profiler/test-busy.cs b/mono/profiler/test-busy.cs
index 76e1a5b2b54..275f417a2dc 100644
--- a/mono/profiler/test-busy.cs
+++ b/mono/profiler/test-busy.cs
@@ -1,3 +1,4 @@
+using System;
using System.Threading;
class T {
diff --git a/mono/tests/Makefile.am b/mono/tests/Makefile.am
index a4c89ed9d3d..1507db9c28a 100644
--- a/mono/tests/Makefile.am
+++ b/mono/tests/Makefile.am
@@ -14,16 +14,17 @@ JITTEST_PROG_RUN = MONO_SHARED_DIR=$(mono_build_root)/runtime MONO_CFG_DIR=$(mon
RUNTIME_ARGS=--config tests-config --optimize=all --debug
with_mono_path = MONO_PATH=$(mcs_topdir)/class/lib/net_4_5
-with_mono_path_moonlight = MONO_PATH=$(mcs_topdir)/class/lib/moonlight_raw
RUNTIME = $(with_mono_path) $(top_builddir)/runtime/mono-wrapper
-RUNTIME_MOONLIGHT = $(with_mono_path_moonlight) $(top_builddir)/runtime/mono-wrapper
MKBUNDLE = \
PKG_CONFIG_PATH=$(top_builddir):$(PKG_CONFIG_PATH) \
$(RUNTIME) $(mcs_topdir)/class/lib/net_4_5/mkbundle.exe
-MCS = $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe -unsafe -nowarn:0162 -nowarn:0168 -nowarn:0219 -debug
+MCS = $(RUNTIME) $(mcs_topdir)/class/lib/build/mcs.exe -unsafe -debug \
+ -nowarn:0162 -nowarn:0168 -nowarn:0219 -nowarn:0414 -nowarn:0618 \
+ -nowarn:0169 -nowarn:1690 -nowarn:0649 -nowarn:0612 -nowarn:3021 \
+ -nowarn:0197
ILASM = $(RUNTIME) $(mcs_topdir)/class/lib/net_4_5/ilasm.exe
BENCHSRC=fib.cs random.cs nested-loops.cs ackermann.cs tight-loop.cs sieve.cs
@@ -389,7 +390,10 @@ BASE_TEST_CS_SRC= \
assembly_append_ordering.cs \
bug-10127.cs \
allow-synchronous-major.cs \
- unload-appdomain-on-shutdown.cs
+ unload-appdomain-on-shutdown.cs \
+ block_guard_restore_aligment_on_exit.cs \
+ finally_block_ending_in_dead_bb.cs \
+ thread_static_gc_layout.cs
TEST_CS_SRC_DIST= \
$(BASE_TEST_CS_SRC) \
@@ -442,7 +446,7 @@ if MIPS
PLATFORM_DISABLED_TESTS=filter-stack.exe monitor.exe
endif
-if S390x
+if S390X
PLATFORM_DISABLED_TESTS=dynamic-method-resurrection.exe
#PLATFORM_DISABLED_TESTS=dynamic-method-resurrection.exe exception17.exe
endif
@@ -701,30 +705,32 @@ test-messages: w32message.exe
$(with_mono_path) $(JITTEST_PROG_RUN) w32message.exe >& w32message.allout && cmp test_messages.zero w32message.allout
endif
-if MOONLIGHT
-test_2_1 : test-coreclr-security
-else
-test_2_1 :
-endif
-
if AMD64
test-sgen : sgen-tests
else
if X86
+if HOST_WIN32
+test-sgen :
+else
test-sgen : sgen-tests
+endif
else
if ARM
test-sgen : sgen-tests
else
-if S390x
+if S390X
test-sgen : sgen-regular-tests
endif
endif
endif
endif
-test: assemblyresolve/test/asm.dll testjit test-generic-sharing test-type-load test_platform test_2_1 test-process-exit test-sgen test-messages rm-empty-logs
-test-wrench: assemblyresolve/test/asm.dll testjit-wrench test-generic-sharing test-type-load test_platform test_2_1 test-process-exit test-sgen test-messages rm-empty-logs
+# Precompile the test assemblies in parallel
+compile-tests:
+ $(MAKE) -j4 $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
+
+test: assemblyresolve/test/asm.dll testjit test-generic-sharing test-type-load test_platform test-process-exit test-messages rm-empty-logs
+test-wrench: compile-tests assemblyresolve/test/asm.dll testjit-wrench test-generic-sharing test-type-load test_platform test-process-exit test-sgen test-messages rm-empty-logs
# Remove empty .stdout and .stderr files for wrench
rm-empty-logs:
@@ -788,7 +794,7 @@ runtest-wrench: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(
done; \
echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \
if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
- for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
+ for i in $${failed_tests}; do echo $${i}; cat $${i}.stdout; cat $${i}.stderr; done; exit 1; fi
runtest-managed-wrench: test-runner.exe $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
@$(RUNTIME) ./test-runner.exe -j a --disabled '$(DISABLED_TESTS_WRENCH)' $(TESTSI_CS) $(TESTBS) $(TESTSI_IL)
@@ -800,7 +806,9 @@ runtest: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQS
@failed=0; \
passed=0; \
failed_tests="";\
- for i in $(TESTSI_CS) $(TESTBS) $(TESTSI_IL); do \
+ 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 \
rm -f $${i}.so; \
if [ x$(AOT) = x1 ]; then if echo $(AOT_DISABLED_TESTS) | grep -v -q $${i}; then $(with_mono_path) $(JITTEST_PROG_RUN) --aot --debug $${i} > $${i}.aotlog 2>&1 || exit 1; fi; fi; \
if $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$i '$(DISABLED_TESTS)' 'no-dump' $(RUNTIME_ARGS); \
@@ -813,6 +821,7 @@ runtest: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQS
fi \
done; \
echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \
+ rm -f testlist testlist.sorted; \
if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
@@ -875,8 +884,13 @@ test-type-load: TestDriver.dll
@echo "Testing load-exception.exe..."
@$(RUNTIME) load-exceptions.exe > load-exceptions.exe.stdout 2> load-exceptions.exe.stderr
+EXTRA_DIST += debug-casts.cs
+# This depends on TLS, so its not ran by default
+debug-casts:
+ @$(MCS) -r:TestDriver.dll $(srcdir)/debug-casts.cs
+ @$(RUNTIME) --debug=casts debug-casts.exe
-EXTRA_DIST += sgen-bridge.cs sgen-descriptors.cs sgen-gshared-vtype.cs sgen-bridge-major-fragmentation.cs sgen-domain-unload.cs sgen-weakref-stress.cs sgen-cementing-stress.cs sgen-case-23400.cs finalizer-wait.cs critical-finalizers.cs sgen-domain-unload-2.cs sgen-suspend.cs
+EXTRA_DIST += sgen-bridge.cs sgen-descriptors.cs sgen-gshared-vtype.cs sgen-bridge-major-fragmentation.cs sgen-domain-unload.cs sgen-weakref-stress.cs sgen-cementing-stress.cs sgen-case-23400.cs finalizer-wait.cs critical-finalizers.cs sgen-domain-unload-2.cs sgen-suspend.cs sgen-new-threads-dont-join-stw.cs sgen-bridge-xref.cs
#those are actually configurations, eg plain_sgen-descriptors.exe
@@ -890,7 +904,8 @@ SGEN_TESTS = \
sgen-domain-unload.exe \
sgen-weakref-stress.exe \
sgen-cementing-stress.exe \
- sgen-case-23400.exe
+ sgen-case-23400.exe \
+ sgen-new-threads-dont-join-stw.exe
SGEN_CONFIGURATIONS = \
"|plain" \
@@ -930,7 +945,7 @@ sgen-regular-tests: $(SGEN_TESTS)
if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
-sgen-bridge-tests: sgen-bridge.exe sgen-bridge-major-fragmentation.exe
+sgen-bridge-tests1: sgen-bridge.exe sgen-bridge-major-fragmentation.exe
@failed=0; \
passed=0; \
failed_tests="";\
@@ -954,8 +969,73 @@ sgen-bridge-tests: sgen-bridge.exe sgen-bridge-major-fragmentation.exe
if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
+sgen-bridge-tests2: sgen-bridge-xref.exe
+ @failed=0; \
+ passed=0; \
+ failed_tests="";\
+ for test in $+; do \
+ echo "...$$test"; \
+ for conf in $(SGEN_BRIDGE_CONFIGURATIONS); do \
+ name=`echo $$conf | cut -d\| -f 2`; \
+ params=`echo $$conf | cut -d\| -f 1`; \
+ test_name="$${test}|$${name}"; \
+ if MONO_GC_PARAMS="bridge=2Bridge$${params}" MONO_ENV_OPTIONS="--gc=sgen" $(srcdir)/test-driver '$(with_mono_path) $(JITTEST_PROG_RUN)' $$test_name "$(DISABLED_TESTS_SGEN)" 'dump-output' $(RUNTIME_ARGS); \
+ then \
+ passed=`expr $${passed} + 1`; \
+ else \
+ if [ $$? = 2 ]; then break; fi; \
+ failed=`expr $${failed} + 1`; \
+ failed_tests="$${failed_tests} $$test_name"; \
+ fi \
+ done \
+ done; \
+ echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \
+ if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
+ for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
+
+
+sgen-bridge-tests: sgen-bridge-tests1 sgen-bridge-tests2
+
sgen-tests: sgen-regular-tests sgen-bridge-tests
+AOT_CONFIGURATIONS= \
+ "|regular" \
+ "--gc=boehm|boehm"
+
+#LLVM crashes, got to fix it first.
+# "--llvm|llvm" \
+# "--llvm --gc=boehm|llvm+boehm"
+
+
+test-aot:
+ @failed=0; \
+ passed=0; \
+ failed_tests="";\
+ profile=net_4_5; \
+ tmpfile=`mktemp -t mono_aot_output` || exit 1; \
+ rm -f test-aot-$${name}.stdout test-aot-$${name}.stderr; \
+ for assembly in $(mcs_topdir)/class/lib/$$profile/*.dll ; do \
+ asm_name=`basename $$assembly`; \
+ echo "... $$asm_name"; \
+ for conf in $(AOT_CONFIGURATIONS); do \
+ name=`echo $$conf | cut -d\| -f 2`; \
+ params=`echo $$conf | cut -d\| -f 1`; \
+ test_name="$${asm_name}|$${name}"; \
+ echo " $$test_name"; \
+ if MONO_PATH=$(mcs_topdir)/class/lib/$$profile $(JITTEST_PROG_RUN) $$params --aot=outfile=$$tmpfile $$assembly >> test-aot-$${name}.stdout 2>> test-aot-$${name}.stderr; \
+ then \
+ passed=`expr $${passed} + 1`; \
+ else \
+ failed=`expr $${failed} + 1`; \
+ failed_tests="$${failed_tests} $$test_name"; \
+ fi \
+ done; \
+ done; \
+ rm $$tmpfile; \
+ echo "$${passed} test(s) passed. $${failed} test(s) did not pass."; \
+ if [ $${failed} != 0 ]; then echo -e "\nFailed tests:\n"; \
+ for i in $${failed_tests}; do echo $${i}; done; exit 1; fi
+
# Generated tests for runtime invoke
EXTRA_DIST += gen-runtime-invoke.cs
@@ -1049,14 +1129,12 @@ bug-382986.exe: bug-382986.cs bug-382986-lib.dll
EXTRA_DIST += coreclr-security.cs
-if MOONLIGHT
coreclr-security.exe : coreclr-security.cs
$(SMCS) -out:coreclr-security.exe $(srcdir)/coreclr-security.cs
test-coreclr-security : coreclr-security.exe
@echo "Testing coreclr-security.exe..."
@$(RUNTIME_MOONLIGHT) --security=core-clr-test coreclr-security.exe
-endif
EXTRA_DIST += generic-unboxing.2.il
generic-unboxing.2.dll : generic-unboxing.2.il
diff --git a/mono/tests/block_guard_restore_aligment_on_exit.cs b/mono/tests/block_guard_restore_aligment_on_exit.cs
new file mode 100644
index 00000000000..270b1dd39b6
--- /dev/null
+++ b/mono/tests/block_guard_restore_aligment_on_exit.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Threading;
+
+class Driver {
+ static volatile bool foo = false;
+ static int res = 1;
+ static void InnerFunc () {
+ res = 2;
+ try {
+ res = 3;
+ } finally {
+ res = 4;
+ Console.WriteLine ("EEE");
+ while (!foo);
+ res = 5;
+ Console.WriteLine ("in the finally block");
+ Thread.ResetAbort ();
+ res = 6;
+ }
+ res = 7;
+ throw new Exception ("lalala");
+ }
+
+ static void Func () {
+ try {
+ InnerFunc ();
+ } catch (Exception e) {
+ res = 0;
+ }
+ }
+
+ static int Main () {
+ Thread t = new Thread (Func);
+ t.Start ();
+ Thread.Sleep (100);
+ t.Abort ();
+ foo = true;
+ Console.WriteLine ("What now?");
+ t.Join ();
+ Thread.Sleep (500);
+ return res;
+ }
+} \ No newline at end of file
diff --git a/mono/tests/bug-348522.2.cs b/mono/tests/bug-348522.2.cs
index 5d845024b28..5d845024b28 100644..100755
--- a/mono/tests/bug-348522.2.cs
+++ b/mono/tests/bug-348522.2.cs
diff --git a/mono/tests/bug-438454.cs b/mono/tests/bug-438454.cs
index baee70a67f7..0f793422181 100644..100755
--- a/mono/tests/bug-438454.cs
+++ b/mono/tests/bug-438454.cs
@@ -28,7 +28,7 @@ class Program
// ThreadPool has been shutdown, thus `a.BeginInvoke()` has no effect.
Action a = () => {
int i = 0;
- while (true)
+ while (i < 1024)
Console.WriteLine ("Ha! {0}", i++);
};
a.BeginInvoke (null, null);
diff --git a/mono/tests/debug-casts.cs b/mono/tests/debug-casts.cs
new file mode 100644
index 00000000000..129e6e210e3
--- /dev/null
+++ b/mono/tests/debug-casts.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.Runtime.CompilerServices;
+
+public class Tests
+{
+ public static int Main (string[] args) {
+ return TestDriver.RunTests (typeof (Tests), args);
+ }
+
+ public static int test_0_simple () {
+ object o = new object ();
+ try {
+ string s = (string)o;
+ return 1;
+ } catch (InvalidCastException ex) {
+ if (!ex.Message.Contains ("System.Object") || !ex.Message.Contains ("System.String"))
+ return 2;
+ }
+ return 0;
+ }
+
+ public static int test_0_complex_1 () {
+ object o = new object ();
+ try {
+ IEnumerable<object> ie = (IEnumerable<object>)o;
+ return 1;
+ } catch (InvalidCastException ex) {
+ if (!ex.Message.Contains ("System.Object") || !ex.Message.Contains ("System.Collections.Generic.IEnumerable`1[System.Object]"))
+ return 2;
+ }
+ return 0;
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static object return_null () {
+ return null;
+ }
+
+ public static int test_0_complex_1_null () {
+ object o = return_null ();
+ IEnumerable<object> ie = (IEnumerable<object>)o;
+ return 0;
+ }
+}
diff --git a/mono/tests/finalizer-exception.cs b/mono/tests/finalizer-exception.cs
index 1496dc54b47..f11a1dcdeff 100644
--- a/mono/tests/finalizer-exception.cs
+++ b/mono/tests/finalizer-exception.cs
@@ -10,7 +10,9 @@ public class FinalizerException {
* We allocate the exception object deep down the stack so
* that it doesn't get pinned.
*/
- public static void MakeException (int depth) {
+ public static unsafe void MakeException (int depth) {
+ // Avoid tail calls
+ int* values = stackalloc int [20];
if (depth <= 0) {
new FinalizerException ();
return;
@@ -24,7 +26,7 @@ public class FinalizerException {
Environment.Exit (0);
};
- MakeException (100);
+ MakeException (1024);
GC.Collect ();
GC.WaitForPendingFinalizers ();
diff --git a/mono/tests/finally_block_ending_in_dead_bb.cs b/mono/tests/finally_block_ending_in_dead_bb.cs
new file mode 100644
index 00000000000..162b8a0f18c
--- /dev/null
+++ b/mono/tests/finally_block_ending_in_dead_bb.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Threading;
+
+class Driver {
+ static volatile bool foo = false;
+ static int res = 1;
+
+ static void Stuff () {
+ res = 2;
+ try {
+ res = 3;
+ } finally {
+ res = 4;
+ while (!foo);
+ Thread.ResetAbort ();
+ res = 0;
+ }
+ }
+
+ static int Main () {
+ Thread t = new Thread (Stuff);
+ t.Start ();
+ Thread.Sleep (100);
+ t.Abort ();
+ foo = true;
+ t.Join ();
+ Thread.Sleep (500);
+ if (res != 0)
+ Console.WriteLine ("Could not abort thread final state {0}", res);
+ return res;
+ }
+} \ No newline at end of file
diff --git a/mono/tests/gc-descriptors/Makefile.am b/mono/tests/gc-descriptors/Makefile.am
index 869850e9478..4daa22ba806 100644..100755
--- a/mono/tests/gc-descriptors/Makefile.am
+++ b/mono/tests/gc-descriptors/Makefile.am
@@ -14,3 +14,6 @@ descriptor-tests.cs : descriptor-tests-driver.cs descriptor-tests-prefix.cs gen-
$(srcdir)/gen-descriptor-tests.py >descriptor-tests.cs
EXTRA_DIST = descriptor-tests-driver.cs descriptor-tests-prefix.cs gen-descriptor-tests.py
+
+.DELETE_ON_ERROR:
+
diff --git a/mono/tests/libtest.c b/mono/tests/libtest.c
index dc1606e86c9..f683ee2b66e 100644
--- a/mono/tests/libtest.c
+++ b/mono/tests/libtest.c
@@ -581,6 +581,29 @@ mono_test_marshal_out_struct (int a, simplestruct *ss, int b, OutVTypeDelegate f
return 1;
}
+typedef int (STDCALL *InVTypeDelegate) (int a, simplestruct *ss, int b);
+
+LIBTEST_API int STDCALL
+mono_test_marshal_in_struct (int a, simplestruct *ss, int b, InVTypeDelegate func)
+{
+ simplestruct ss2;
+ int res;
+
+ memcpy (&ss2, ss, sizeof (simplestruct));
+
+ res = func (a, ss, b);
+ if (res) {
+ printf ("mono_test_marshal_in_struct () failed: %d\n", res);
+ return 1;
+ }
+
+ /* Check that no modifications is made to the struct */
+ if (ss2.a == ss->a && ss2.b == ss->b && ss2.c == ss->c && ss2.d == ss->d)
+ return 0;
+ else
+ return 1;
+}
+
typedef struct {
int a;
SimpleDelegate func, func2, func3;
@@ -2856,7 +2879,7 @@ mono_test_marshal_variant_out_bstr_byref(VARIANT* variant)
{
variant->vt = VT_BSTR|VT_BYREF;
variant->byref = marshal_alloc(sizeof(gpointer));
- *((gunichar**)variant->byref) = marshal_bstr_alloc("PI");
+ *((gunichar**)variant->byref) = (gunichar*)marshal_bstr_alloc("PI");
return 0;
}
@@ -5277,3 +5300,81 @@ mono_test_marshal_return_lpwstr (void)
return res;
}
+
+
+#ifndef TARGET_X86
+
+LIBTEST_API int STDCALL
+mono_test_has_thiscall (void)
+{
+ return 1;
+}
+
+LIBTEST_API int
+_mono_test_native_thiscall1 (int arg)
+{
+ return arg;
+}
+
+LIBTEST_API int
+_mono_test_native_thiscall2 (int arg, int arg2)
+{
+ return arg + (arg2^1);
+}
+
+LIBTEST_API int
+_mono_test_native_thiscall3 (int arg, int arg2, int arg3)
+{
+ return arg + (arg2^1) + (arg3^2);
+}
+
+#elif defined(__GNUC__)
+
+LIBTEST_API int STDCALL
+mono_test_has_thiscall (void)
+{
+ return 1;
+}
+
+#define def_asm_fn(name) \
+ "\t.align 4\n" \
+ "\t.globl _" #name "\n" \
+ "_" #name ":\n" \
+ "\t.globl __" #name "\n" \
+ "__" #name ":\n"
+
+asm(".text\n"
+
+def_asm_fn(mono_test_native_thiscall1)
+"\tmovl %ecx,%eax\n"
+"\tret\n"
+
+def_asm_fn(mono_test_native_thiscall2)
+"\tmovl %ecx,%eax\n"
+"\tmovl 4(%esp),%ecx\n"
+"\txorl $1,%ecx\n"
+"\taddl %ecx,%eax\n"
+"\tret $4\n"
+
+def_asm_fn(mono_test_native_thiscall3)
+"\tmovl %ecx,%eax\n"
+"\tmovl 4(%esp),%ecx\n"
+"\txorl $1,%ecx\n"
+"\taddl %ecx,%eax\n"
+"\tmovl 8(%esp),%ecx\n"
+"\txorl $2,%ecx\n"
+"\taddl %ecx,%eax\n"
+"\tret $8\n"
+
+);
+
+#else
+
+LIBTEST_API int STDCALL
+mono_test_has_thiscall (void)
+{
+ return 0;
+}
+
+#endif
+
diff --git a/mono/tests/marshal.cs b/mono/tests/marshal.cs
index 166a4d1de2c..aadf7adf743 100644
--- a/mono/tests/marshal.cs
+++ b/mono/tests/marshal.cs
@@ -29,12 +29,7 @@ public class Tests {
public static extern IntPtr mono_test_marshal_return_delegate_2 ();
static int test_0_get_function_pointer_for_delegate () {
- // This is a 2.0 feature
- MethodInfo mi = typeof (Marshal).GetMethod ("GetFunctionPointerForDelegate");
- if (mi == null)
- return 0;
-
- IntPtr fnPtr = (IntPtr)mi.Invoke (null, new object [] { new SimpleDelegate (delegate_test)});
+ IntPtr fnPtr = Marshal.GetFunctionPointerForDelegate (new SimpleDelegate (delegate_test));
if (mono_test_marshal_delegate (fnPtr) != 3)
return 1;
@@ -43,28 +38,18 @@ public class Tests {
}
static int test_0_get_delegate_for_function_pointer () {
- // This is a 2.0 feature
- MethodInfo mi = typeof (Marshal).GetMethod ("GetDelegateForFunctionPointer");
- if (mi == null)
- return 0;
-
IntPtr ptr = mono_test_marshal_return_delegate (new SimpleDelegate (delegate_test));
-
- SimpleDelegate d = (SimpleDelegate)mi.Invoke (null, new object [] { ptr, typeof (SimpleDelegate) });
+
+ SimpleDelegate d = (SimpleDelegate)Marshal.GetDelegateForFunctionPointer (ptr, typeof (SimpleDelegate));
return d (5) == 6 ? 0 : 1;
}
/* Obtain a delegate from a native function pointer */
static int test_0_get_delegate_for_ftnptr_native () {
- // This is a 2.0 feature
- MethodInfo mi = typeof (Marshal).GetMethod ("GetDelegateForFunctionPointer");
- if (mi == null)
- return 0;
-
IntPtr ptr = mono_test_marshal_return_delegate_2 ();
- SimpleDelegate d = (SimpleDelegate)mi.Invoke (null, new object [] { ptr, typeof (SimpleDelegate) });
+ SimpleDelegate d = (SimpleDelegate)Marshal.GetDelegateForFunctionPointer (ptr, typeof (SimpleDelegate));
return d (5) == 6 ? 0 : 1;
}
diff --git a/mono/tests/marshal2.cs b/mono/tests/marshal2.cs
index 7ca7bb62759..a4d02ab1431 100644
--- a/mono/tests/marshal2.cs
+++ b/mono/tests/marshal2.cs
@@ -42,6 +42,17 @@ public class Tests {
[MarshalAs (UnmanagedType.ByValTStr, SizeConst=4)] public string s1;
public int i;
}
+
+ [StructLayout (LayoutKind.Sequential, Pack=1)]
+ public struct PackStruct1 {
+ float f;
+ }
+
+ [StructLayout (LayoutKind.Sequential)]
+ public struct PackStruct2 {
+ byte b;
+ PackStruct1 s;
+ }
public unsafe static int Main (String[] args) {
if (TestDriver.RunTests (typeof (Tests), args) != 0)
@@ -214,4 +225,11 @@ public class Tests {
return 3;
return 0;
}
+
+ // Check that the 'Pack' directive on a struct changes the min alignment of the struct as well (#12110)
+ public static int test_0_struct_pack () {
+ if (Marshal.OffsetOf (typeof (PackStruct2), "s") != new IntPtr (1))
+ return 1;
+ return 0;
+ }
}
diff --git a/mono/tests/pinvoke2.cs b/mono/tests/pinvoke2.cs
index 3f1f6dc43fe..22c83573c40 100644
--- a/mono/tests/pinvoke2.cs
+++ b/mono/tests/pinvoke2.cs
@@ -84,6 +84,15 @@ public class Tests {
public int x;
public double y;
}
+
+ [StructLayout (LayoutKind.Sequential)]
+ public struct TinyStruct {
+ public TinyStruct (int i)
+ {
+ this.i = i;
+ }
+ public int i;
+ }
[StructLayout (LayoutKind.Sequential)]
public class SimpleClass {
@@ -1725,5 +1734,51 @@ public class Tests {
return 1;
}
+ [DllImport ("libtest", EntryPoint="mono_test_has_thiscall")]
+ public static extern int mono_test_has_thiscall ();
+
+ [DllImport ("libtest", EntryPoint = "_mono_test_native_thiscall1", CallingConvention=CallingConvention.ThisCall)]
+ public static extern int mono_test_native_thiscall (int a);
+
+ [DllImport ("libtest", EntryPoint = "_mono_test_native_thiscall2", CallingConvention=CallingConvention.ThisCall)]
+ public static extern int mono_test_native_thiscall (int a, int b);
+
+ [DllImport ("libtest", EntryPoint = "_mono_test_native_thiscall3", CallingConvention=CallingConvention.ThisCall)]
+ public static extern int mono_test_native_thiscall (int a, int b, int c);
+
+ [DllImport ("libtest", EntryPoint = "_mono_test_native_thiscall1", CallingConvention=CallingConvention.ThisCall)]
+ public static extern int mono_test_native_thiscall (TinyStruct a);
+
+ [DllImport ("libtest", EntryPoint = "_mono_test_native_thiscall2", CallingConvention=CallingConvention.ThisCall)]
+ public static extern int mono_test_native_thiscall (TinyStruct a, int b);
+
+ [DllImport ("libtest", EntryPoint = "_mono_test_native_thiscall3", CallingConvention=CallingConvention.ThisCall)]
+ public static extern int mono_test_native_thiscall (TinyStruct a, int b, int c);
+
+ public static int test_0_native_thiscall ()
+ {
+ if (mono_test_has_thiscall () == 0)
+ return 0;
+
+ if (mono_test_native_thiscall (1968329802) != 1968329802)
+ return 1;
+
+ if (mono_test_native_thiscall (268894549, 1212675791) != 1481570339)
+ return 2;
+
+ if (mono_test_native_thiscall (1288082683, -421187449, -1733670329) != -866775098)
+ return 3;
+
+ if (mono_test_native_thiscall (new TinyStruct(1968329802)) != 1968329802)
+ return 4;
+
+ if (mono_test_native_thiscall (new TinyStruct(268894549), 1212675791) != 1481570339)
+ return 5;
+
+ if (mono_test_native_thiscall (new TinyStruct(1288082683), -421187449, -1733670329) != -866775098)
+ return 6;
+
+ return 0;
+ }
}
diff --git a/mono/tests/pinvoke3.cs b/mono/tests/pinvoke3.cs
index c5e7fa6ad67..ded0626819a 100644
--- a/mono/tests/pinvoke3.cs
+++ b/mono/tests/pinvoke3.cs
@@ -66,6 +66,19 @@ public class Tests {
return 0;
}
+ public static int delegate_test_struct_in (int a, [In] ref SimpleStruct ss, int b)
+ {
+ if (a == 1 && b == 2 && ss.a && !ss.b && ss.c && ss.d == "TEST2") {
+ ss.a = true;
+ ss.b = true;
+ ss.c = true;
+ ss.d = "TEST3";
+ return 0;
+ }
+
+ return 1;
+ }
+
public static SimpleClass delegate_test_class (SimpleClass ss)
{
if (ss == null)
@@ -134,8 +147,13 @@ public class Tests {
public delegate int OutStructDelegate (int a, out SimpleStruct ss, int b);
+ public delegate int InStructDelegate (int a, [In] ref SimpleStruct ss, int b);
+
[DllImport ("libtest", EntryPoint="mono_test_marshal_out_struct")]
public static extern int mono_test_marshal_out_struct (int a, out SimpleStruct ss, int b, OutStructDelegate d);
+
+ [DllImport ("libtest", EntryPoint="mono_test_marshal_in_struct")]
+ public static extern int mono_test_marshal_in_struct (int a, ref SimpleStruct ss, int b, InStructDelegate d);
[DllImport ("libtest", EntryPoint="mono_test_marshal_delegate2")]
public static extern int mono_test_marshal_delegate2 (SimpleDelegate2 d);
@@ -228,6 +246,14 @@ public class Tests {
return mono_test_marshal_out_struct (1, out ss, 2, d);
}
+ /* Test structures as in arguments of delegates */
+ public static int test_0_marshal_in_struct_delegate () {
+ SimpleStruct ss = new SimpleStruct () { a = true, b = false, c = true, d = "TEST2" };
+ InStructDelegate d = new InStructDelegate (delegate_test_struct_in);
+
+ return mono_test_marshal_in_struct (1, ref ss, 2, d);
+ }
+
/* Test classes as arguments and return values of delegates */
public static int test_0_marshal_class_delegate () {
SimpleDelegate4 d = new SimpleDelegate4 (delegate_test_class);
diff --git a/mono/tests/runtime-invoke.cs b/mono/tests/runtime-invoke.cs
index b340cd13065..624feae80cd 100644
--- a/mono/tests/runtime-invoke.cs
+++ b/mono/tests/runtime-invoke.cs
@@ -215,4 +215,38 @@ class Tests
var res = typeof (Tests).GetMethod ("pack_i1").Invoke (null, new object [] { (sbyte)-0x40 });
return (bool)res ? 0 : 1;
}
+
+ struct Point {
+ public int x, y;
+ }
+
+ struct Foo2 {
+ public Point Location {
+ get {
+ return new Point () { x = 10, y = 20 };
+ }
+ }
+ }
+
+ public static int test_0_vtype_method_vtype_ret () {
+ var f = new Foo2 ();
+ var p = (Point)typeof (Foo2).GetMethod ("get_Location").Invoke (f, null);
+ if (p.x != 10 || p.y != 20)
+ return 1;
+ return 0;
+ }
+
+ public static int test_0_array_get_set () {
+ int[,,] arr = new int [10, 10, 10];
+ arr [0, 1, 2] = 42;
+ var gm = arr.GetType ().GetMethod ("Get");
+ int i = (int) gm.Invoke (arr, new object [] { 0, 1, 2 });
+ if (i != 42)
+ return 1;
+ var sm = arr.GetType ().GetMethod ("Set");
+ sm.Invoke (arr, new object [] { 0, 1, 2, 33 });
+ if (arr [0, 1, 2] != 33)
+ return 2;
+ return 0;
+ }
}
diff --git a/mono/tests/sgen-bridge-xref.cs b/mono/tests/sgen-bridge-xref.cs
new file mode 100644
index 00000000000..82892803ce9
--- /dev/null
+++ b/mono/tests/sgen-bridge-xref.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Threading;
+
+public class Bridge {
+ public int __test;
+ public string id;
+ public List<object> link = new List<object> ();
+
+ ~Bridge () {
+ }
+}
+
+class Driver {
+ static WeakReference<Bridge> root, child;
+
+ static void SetupLinks () {
+ var a = new Bridge () { id = "bridge" };
+ var b = new Bridge () { id = "child" };
+ a.link.Add (b);
+ a.__test = 1;
+ b.__test = 0;
+ root = new WeakReference<Bridge> (a, true);
+ child = new WeakReference<Bridge> (b, true);
+ }
+
+ static int Main ()
+ {
+ var t = new Thread (SetupLinks);
+ t.Start ();
+ t.Join ();
+
+ GC.Collect ();
+ Bridge a, b;
+ a = b = null;
+ Console.WriteLine ("try get A {0}", root.TryGetTarget (out a));
+ Console.WriteLine ("try get B {0}", child.TryGetTarget (out b));
+ Console.WriteLine ("a is null {0}", a == null);
+ Console.WriteLine ("b is null {0}", b == null);
+ if (a == null || b == null)
+ return 1;
+
+ Console.WriteLine ("a test {0}", a.__test);
+ Console.WriteLine ("b test {0}", b.__test);
+
+ if (a.__test != 1 || b.__test != 3)
+ return 2;
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mono/tests/sgen-descriptors.cs b/mono/tests/sgen-descriptors.cs
index ae000849cee..246e5aac59d 100644
--- a/mono/tests/sgen-descriptors.cs
+++ b/mono/tests/sgen-descriptors.cs
@@ -1,4 +1,5 @@
using System;
+using System.Runtime.InteropServices;
public struct SmallMixed
{
@@ -47,6 +48,13 @@ public class HugePtrFree {
public LargeStruct2 c;
}
+[StructLayout (LayoutKind.Sequential)]
+public class Non32bitBitmap {
+ public object o;
+ public long i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33, i34, i35;
+ public object o2;
+}
+
/*
This is a stress test for descriptors.
*/
@@ -54,10 +62,10 @@ class Driver {
static char[] FOO = new char[] { 'f', 'o', 'b' };
static void Fill (int cycles) {
- object[] root = new object [12];
+ object[] root = new object [13];
object[] current = root;
for (int i = 0; i < cycles; ++i) {
- current [0] = new object [12];
+ current [0] = new object [13];
current [1] = new int [6];
current [2] = new int [2,3];
current [3] = new string (FOO);
@@ -72,6 +80,9 @@ class Driver {
current [10] = new HugePtrFree ();
if ((i % 10000) == 0)
current [11] = new LargeStruct2 [1];
+
+ /* Test for 64 bit bitmap descriptors (#14834) */
+ current [12] = new Non32bitBitmap () { o = new object (), i32 = 1, i33 = 1, i34 = 1, i35 = 1, o2 = new object () };
current = (object[])current [0];
}
diff --git a/mono/tests/sgen-new-threads-dont-join-stw.cs b/mono/tests/sgen-new-threads-dont-join-stw.cs
new file mode 100644
index 00000000000..b6d0a9b693b
--- /dev/null
+++ b/mono/tests/sgen-new-threads-dont-join-stw.cs
@@ -0,0 +1,95 @@
+using System;
+using System.Timers;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+
+class T {
+
+ static int count = 0;
+ static object count_lock = new object();
+
+ const long N = 500000;
+ const int num_threads = 8;
+
+ static void UseMemory () {
+
+ for (int i = 0; i < N; ++i) {
+
+ var l1 = new ArrayList ();
+ l1.Add(""+i);
+ var l2 = new ArrayList ();
+ l2.Add(""+(i+1));
+ var l3 = new ArrayList ();
+ l3.Add(""+(i+2));
+ var l4 = new ArrayList ();
+ l4.Add(""+(i+3));
+ }
+
+
+ lock (count_lock)
+ {
+ count++;
+ Monitor.PulseAll(count_lock);
+ }
+ }
+
+ static void Timer_Elapsed(object sender, EventArgs e)
+ {
+ HashSet<string> h = new HashSet<string>();
+ for (int j = 0; j < 10000; j++)
+ {
+ h.Add(""+j+""+j);
+ }
+ }
+
+ static void Main (string[] args) {
+
+ for (int j = 0; j < 2; j++)
+ {
+ count = 0;
+
+ List<Thread> threads = new List<Thread>();
+ List<System.Timers.Timer> timers = new List<System.Timers.Timer>();
+
+ for (int i = 0; i < num_threads; i++)
+ {
+ Thread t3 = new Thread (delegate () {
+ UseMemory();
+ });
+
+ t3.Start ();
+
+ System.Timers.Timer timer = new System.Timers.Timer();
+ timer.Elapsed += Timer_Elapsed;
+ timer.AutoReset = false;
+ timer.Interval = 1000;
+ timer.Start();
+ timers.Add(timer);
+ }
+
+ for (int i = 0; i < 4000; i++)
+ {
+ System.Timers.Timer timer = new System.Timers.Timer();
+ timer.Elapsed += Timer_Elapsed;
+ timer.AutoReset = false;
+ timer.Interval = 500;
+ timer.Start();
+ timers.Add(timer);
+ }
+
+ lock (count_lock)
+ {
+ while (count < num_threads)
+ {
+ Monitor.Wait(count_lock);
+ }
+ }
+
+ foreach (var t in threads)
+ {
+ t.Join();
+ }
+ }
+ }
+}
diff --git a/mono/tests/test-driver b/mono/tests/test-driver
index 6945eb9b488..b007040a62e 100755
--- a/mono/tests/test-driver
+++ b/mono/tests/test-driver
@@ -34,6 +34,7 @@ $| = 0;
print "Testing $test... ";
foreach $disabled (split (/ /, $disabled_tests)) {
+ $disabled =~ s/^\s+|\s+$//g;
if ($disabled eq $test) {
print "disabled.\n";
exit (0);
diff --git a/mono/tests/thread_static_gc_layout.cs b/mono/tests/thread_static_gc_layout.cs
new file mode 100644
index 00000000000..d0ea8b4e344
--- /dev/null
+++ b/mono/tests/thread_static_gc_layout.cs
@@ -0,0 +1,26 @@
+using System;
+
+public struct Sandwich
+{
+ public IntPtr a;
+ public object b;
+ public IntPtr c;
+ public IntPtr d;
+}
+
+class Driver {
+ [ThreadStatic]
+ static Sandwich blt;
+ // const long initial_val = 0x0100000001L;
+ const int initial_val = 1;
+
+ static int Main ()
+ {
+ blt.a = (IntPtr)initial_val;
+ blt.b = new object ();
+ blt.c = (IntPtr)initial_val;
+ blt.d = (IntPtr)initial_val;
+ GC.Collect ();
+ return (blt.a == blt.c && blt.c == blt.d && blt.a == (IntPtr)initial_val) ? 0 : -1;
+ }
+} \ No newline at end of file
diff --git a/mono/utils/Makefile.am b/mono/utils/Makefile.am
index b97e1033621..21e47bb648e 100644
--- a/mono/utils/Makefile.am
+++ b/mono/utils/Makefile.am
@@ -100,10 +100,16 @@ monoutils_sources = \
mono-threads-windows.c \
mono-threads.h \
mono-tls.h \
+ mono-tls.c \
linux_magic.h \
mono-memory-model.h \
atomic.h \
- atomic.c
+ atomic.c \
+ mono-hwcap.h \
+ mono-hwcap.c \
+ bsearch.h \
+ bsearch.c \
+ mono-signal-handler.h
arch_sources =
@@ -127,6 +133,46 @@ arch_sources += mach-support-unknown.c
endif
+if X86
+arch_sources += mono-hwcap-x86.c mono-hwcap-x86.h
+endif
+
+if AMD64
+arch_sources += mono-hwcap-x86.c mono-hwcap-x86.h
+endif
+
+if ARM
+arch_sources += mono-hwcap-arm.c mono-hwcap-arm.h
+endif
+
+if MIPS
+arch_sources += mono-hwcap-mips.c mono-hwcap-mips.h
+endif
+
+if POWERPC
+arch_sources += mono-hwcap-ppc.c mono-hwcap-ppc.h
+endif
+
+if POWERPC64
+arch_sources += mono-hwcap-ppc.c mono-hwcap-ppc.h
+endif
+
+if SPARC
+arch_sources += mono-hwcap-sparc.c mono-hwcap-sparc.h
+endif
+
+if SPARC64
+arch_sources += mono-hwcap-sparc.c mono-hwcap-sparc.h
+endif
+
+if IA64
+arch_sources += mono-hwcap-ia64.c mono-hwcap-ia64.h
+endif
+
+if S390X
+arch_sources += mono-hwcap-s390x.c mono-hwcap-s390x.h
+endif
+
libmonoutils_la_SOURCES = $(monoutils_sources) $(arch_sources)
libmonoutilsincludedir = $(includedir)/mono-$(API_VER)/mono/utils
diff --git a/mono/utils/atomic.c b/mono/utils/atomic.c
index 8141bfd39c1..7cd884e61d9 100644..100755
--- a/mono/utils/atomic.c
+++ b/mono/utils/atomic.c
@@ -10,13 +10,21 @@
#include <config.h>
#include <glib.h>
-#include <pthread.h>
#include <mono/utils/atomic.h>
-#ifdef WAPI_NO_ATOMIC_ASM
+#if defined (WAPI_NO_ATOMIC_ASM) || defined (BROKEN_64BIT_ATOMICS_INTRINSIC)
+
+#include <pthread.h>
static pthread_mutex_t spin = PTHREAD_MUTEX_INITIALIZER;
+
+#define NEED_64BIT_CMPXCHG_FALLBACK
+
+#endif
+
+#ifdef WAPI_NO_ATOMIC_ASM
+
static mono_once_t spin_once=MONO_ONCE_INIT;
static void spin_init(void)
@@ -76,6 +84,52 @@ gpointer InterlockedCompareExchangePointer(volatile gpointer *dest,
return(old);
}
+gint32 InterlockedAdd(volatile gint32 *dest, gint32 add)
+{
+ gint32 ret;
+ int thr_ret;
+
+ mono_once(&spin_once, spin_init);
+
+ pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
+ (void *)&spin);
+ thr_ret = pthread_mutex_lock(&spin);
+ g_assert (thr_ret == 0);
+
+ *dest += add;
+ ret= *dest;
+
+ thr_ret = pthread_mutex_unlock(&spin);
+ g_assert (thr_ret == 0);
+
+ pthread_cleanup_pop (0);
+
+ return(ret);
+}
+
+gint64 InterlockedAdd64(volatile gint64 *dest, gint64 add)
+{
+ gint64 ret;
+ int thr_ret;
+
+ mono_once(&spin_once, spin_init);
+
+ pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
+ (void *)&spin);
+ thr_ret = pthread_mutex_lock(&spin);
+ g_assert (thr_ret == 0);
+
+ *dest += add;
+ ret= *dest;
+
+ thr_ret = pthread_mutex_unlock(&spin);
+ g_assert (thr_ret == 0);
+
+ pthread_cleanup_pop (0);
+
+ return(ret);
+}
+
gint32 InterlockedIncrement(volatile gint32 *dest)
{
gint32 ret;
@@ -99,6 +153,29 @@ gint32 InterlockedIncrement(volatile gint32 *dest)
return(ret);
}
+gint64 InterlockedIncrement64(volatile gint64 *dest)
+{
+ gint64 ret;
+ int thr_ret;
+
+ mono_once(&spin_once, spin_init);
+
+ pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
+ (void *)&spin);
+ thr_ret = pthread_mutex_lock(&spin);
+ g_assert (thr_ret == 0);
+
+ (*dest)++;
+ ret= *dest;
+
+ thr_ret = pthread_mutex_unlock(&spin);
+ g_assert (thr_ret == 0);
+
+ pthread_cleanup_pop (0);
+
+ return(ret);
+}
+
gint32 InterlockedDecrement(volatile gint32 *dest)
{
gint32 ret;
@@ -122,6 +199,29 @@ gint32 InterlockedDecrement(volatile gint32 *dest)
return(ret);
}
+gint64 InterlockedDecrement64(volatile gint64 *dest)
+{
+ gint64 ret;
+ int thr_ret;
+
+ mono_once(&spin_once, spin_init);
+
+ pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
+ (void *)&spin);
+ thr_ret = pthread_mutex_lock(&spin);
+ g_assert (thr_ret == 0);
+
+ (*dest)--;
+ ret= *dest;
+
+ thr_ret = pthread_mutex_unlock(&spin);
+ g_assert (thr_ret == 0);
+
+ pthread_cleanup_pop (0);
+
+ return(ret);
+}
+
gint32 InterlockedExchange(volatile gint32 *dest, gint32 exch)
{
gint32 ret;
@@ -145,6 +245,29 @@ gint32 InterlockedExchange(volatile gint32 *dest, gint32 exch)
return(ret);
}
+gint64 InterlockedExchange64(volatile gint64 *dest, gint64 exch)
+{
+ gint64 ret;
+ int thr_ret;
+
+ mono_once(&spin_once, spin_init);
+
+ pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
+ (void *)&spin);
+ thr_ret = pthread_mutex_lock(&spin);
+ g_assert (thr_ret == 0);
+
+ ret=*dest;
+ *dest=exch;
+
+ thr_ret = pthread_mutex_unlock(&spin);
+ g_assert (thr_ret == 0);
+
+ pthread_cleanup_pop (0);
+
+ return(ret);
+}
+
gpointer InterlockedExchangePointer(volatile gpointer *dest, gpointer exch)
{
gpointer ret;
@@ -191,4 +314,271 @@ gint32 InterlockedExchangeAdd(volatile gint32 *dest, gint32 add)
return(ret);
}
+gint64 InterlockedExchangeAdd64(volatile gint64 *dest, gint64 add)
+{
+ gint64 ret;
+ int thr_ret;
+
+ mono_once(&spin_once, spin_init);
+
+ pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
+ (void *)&spin);
+ thr_ret = pthread_mutex_lock(&spin);
+ g_assert (thr_ret == 0);
+
+ ret= *dest;
+ *dest+=add;
+
+ thr_ret = pthread_mutex_unlock(&spin);
+ g_assert (thr_ret == 0);
+
+ pthread_cleanup_pop (0);
+
+ return(ret);
+}
+
+gint8 InterlockedRead8(volatile gint8 *src)
+{
+ gint8 ret;
+ int thr_ret;
+
+ mono_once(&spin_once, spin_init);
+
+ pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
+ (void *)&spin);
+ thr_ret = pthread_mutex_lock(&spin);
+ g_assert (thr_ret == 0);
+
+ ret= *src;
+
+ thr_ret = pthread_mutex_unlock(&spin);
+ g_assert (thr_ret == 0);
+
+ pthread_cleanup_pop (0);
+
+ return(ret);
+}
+
+gint16 InterlockedRead16(volatile gint16 *src)
+{
+ gint16 ret;
+ int thr_ret;
+
+ mono_once(&spin_once, spin_init);
+
+ pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
+ (void *)&spin);
+ thr_ret = pthread_mutex_lock(&spin);
+ g_assert (thr_ret == 0);
+
+ ret= *src;
+
+ thr_ret = pthread_mutex_unlock(&spin);
+ g_assert (thr_ret == 0);
+
+ pthread_cleanup_pop (0);
+
+ return(ret);
+}
+
+gint32 InterlockedRead(volatile gint32 *src)
+{
+ gint32 ret;
+ int thr_ret;
+
+ mono_once(&spin_once, spin_init);
+
+ pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
+ (void *)&spin);
+ thr_ret = pthread_mutex_lock(&spin);
+ g_assert (thr_ret == 0);
+
+ ret= *src;
+
+ thr_ret = pthread_mutex_unlock(&spin);
+ g_assert (thr_ret == 0);
+
+ pthread_cleanup_pop (0);
+
+ return(ret);
+}
+
+gint64 InterlockedRead64(volatile gint64 *src)
+{
+ gint64 ret;
+ int thr_ret;
+
+ mono_once(&spin_once, spin_init);
+
+ pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
+ (void *)&spin);
+ thr_ret = pthread_mutex_lock(&spin);
+ g_assert (thr_ret == 0);
+
+ ret= *src;
+
+ thr_ret = pthread_mutex_unlock(&spin);
+ g_assert (thr_ret == 0);
+
+ pthread_cleanup_pop (0);
+
+ return(ret);
+}
+
+gpointer InterlockedReadPointer(volatile gpointer *src)
+{
+ gpointer ret;
+ int thr_ret;
+
+ mono_once(&spin_once, spin_init);
+
+ pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
+ (void *)&spin);
+ thr_ret = pthread_mutex_lock(&spin);
+ g_assert (thr_ret == 0);
+
+ ret= *src;
+
+ thr_ret = pthread_mutex_unlock(&spin);
+ g_assert (thr_ret == 0);
+
+ pthread_cleanup_pop (0);
+
+ return(ret);
+}
+
+void InterlockedWrite(volatile gint8 *dst, gint8 val)
+{
+ int thr_ret;
+
+ mono_once(&spin_once, spin_init);
+
+ pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
+ (void *)&spin);
+ thr_ret = pthread_mutex_lock(&spin);
+ g_assert (thr_ret == 0);
+
+ *dst=val;
+
+ thr_ret = pthread_mutex_unlock(&spin);
+ g_assert (thr_ret == 0);
+
+ pthread_cleanup_pop (0);
+}
+
+void InterlockedWrite16(volatile gint16 *dst, gint16 val)
+{
+ int thr_ret;
+
+ mono_once(&spin_once, spin_init);
+
+ pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
+ (void *)&spin);
+ thr_ret = pthread_mutex_lock(&spin);
+ g_assert (thr_ret == 0);
+
+ *dst=val;
+
+ thr_ret = pthread_mutex_unlock(&spin);
+ g_assert (thr_ret == 0);
+
+ pthread_cleanup_pop (0);
+}
+
+void InterlockedWrite(volatile gint32 *dst, gint32 val)
+{
+ int thr_ret;
+
+ mono_once(&spin_once, spin_init);
+
+ pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
+ (void *)&spin);
+ thr_ret = pthread_mutex_lock(&spin);
+ g_assert (thr_ret == 0);
+
+ *dst=val;
+
+ thr_ret = pthread_mutex_unlock(&spin);
+ g_assert (thr_ret == 0);
+
+ pthread_cleanup_pop (0);
+}
+
+void InterlockedWrite64(volatile gint64 *dst, gint64 val)
+{
+ int thr_ret;
+
+ mono_once(&spin_once, spin_init);
+
+ pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
+ (void *)&spin);
+ thr_ret = pthread_mutex_lock(&spin);
+ g_assert (thr_ret == 0);
+
+ *dst=val;
+
+ thr_ret = pthread_mutex_unlock(&spin);
+ g_assert (thr_ret == 0);
+
+ pthread_cleanup_pop (0);
+}
+
+void InterlockedWritePointer(volatile gpointer *dst, gpointer val)
+{
+ int thr_ret;
+
+ mono_once(&spin_once, spin_init);
+
+ pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock,
+ (void *)&spin);
+ thr_ret = pthread_mutex_lock(&spin);
+ g_assert (thr_ret == 0);
+
+ *dst=val;
+
+ thr_ret = pthread_mutex_unlock(&spin);
+ g_assert (thr_ret == 0);
+
+ pthread_cleanup_pop (0);
+}
+
+#endif
+
+#if defined (NEED_64BIT_CMPXCHG_FALLBACK)
+
+#if defined (TARGET_OSX)
+
+/* The compiler breaks if this code is in the header... */
+
+gint64
+InterlockedCompareExchange64(volatile gint64 *dest, gint64 exch, gint64 comp)
+{
+ return __sync_val_compare_and_swap (dest, comp, exch);
+}
+
+#elif defined (HAVE_64BIT_CMPXCHG_FALLBACK)
+
+#ifdef ENABLE_EXTENSION_MODULE
+#include "../../../mono-extensions/mono/utils/atomic.c"
+#endif
+
+#else
+
+gint64
+InterlockedCompareExchange64(volatile gint64 *dest, gint64 exch, gint64 comp)
+{
+ gint64 old;
+
+ pthread_mutex_lock (&spin);
+
+ old = *dest;
+ if(old == comp)
+ *dest = exch;
+
+ pthread_mutex_unlock (&spin);
+ return old;
+}
+
+#endif
+
#endif
diff --git a/mono/utils/atomic.h b/mono/utils/atomic.h
index 9b18f9bf62d..79455ad9c43 100644..100755
--- a/mono/utils/atomic.h
+++ b/mono/utils/atomic.h
@@ -11,955 +11,348 @@
#ifndef _WAPI_ATOMIC_H_
#define _WAPI_ATOMIC_H_
-#if defined(__NetBSD__)
-#include <sys/param.h>
-
-#if __NetBSD_Version__ > 499004000
-#include <sys/atomic.h>
-#define HAVE_ATOMIC_OPS
-#endif
+#include "config.h"
+#include <glib.h>
+#ifdef ENABLE_EXTENSION_MODULE
+#include "../../../mono-extensions/mono/utils/atomic.h"
#endif
-#include <glib.h>
-
+/* On Windows, we always use the functions provided by the Windows API. */
#if defined(__WIN32__) || defined(_WIN32)
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
#include <windows.h>
+#include <mono/utils/mono-membar.h>
-#elif defined(__NetBSD__) && defined(HAVE_ATOMIC_OPS)
-
-static inline gint32 InterlockedCompareExchange(volatile gint32 *dest,
- gint32 exch, gint32 comp)
+/* mingw is missing InterlockedCompareExchange64 () from winbase.h */
+#if HAVE_DECL_INTERLOCKEDCOMPAREEXCHANGE64==0
+static inline gint64 InterlockedCompareExchange64(volatile gint64 *dest, gint64 exch, gint64 comp)
{
- return atomic_cas_32((uint32_t*)dest, comp, exch);
-}
-
-static inline gpointer InterlockedCompareExchangePointer(volatile gpointer *dest, gpointer exch, gpointer comp)
-{
- return atomic_cas_ptr(dest, comp, exch);
+ return __sync_val_compare_and_swap (dest, comp, exch);
}
+#endif
-static inline gint32 InterlockedIncrement(volatile gint32 *val)
+/* mingw is missing InterlockedExchange64 () from winbase.h */
+#if HAVE_DECL_INTERLOCKEDEXCHANGE64==0
+static inline gint64 InterlockedExchange64(volatile gint64 *val, gint64 new_val)
{
- return atomic_inc_32_nv((uint32_t*)val);
+ gint64 old_val;
+ do {
+ old_val = *val;
+ } while (InterlockedCompareExchange64 (val, new_val, old_val) != old_val);
+ return old_val;
}
+#endif
-static inline gint32 InterlockedDecrement(volatile gint32 *val)
+/* mingw is missing InterlockedIncrement64 () from winbase.h */
+#if HAVE_DECL_INTERLOCKEDINCREMENT64==0
+static inline gint64 InterlockedIncrement64(volatile gint64 *val)
{
- return atomic_dec_32_nv((uint32_t*)val);
+ return __sync_add_and_fetch (val, 1);
}
+#endif
-static inline gint32 InterlockedExchange(volatile gint32 *val, gint32 new_val)
+/* mingw is missing InterlockedDecrement64 () from winbase.h */
+#if HAVE_DECL_INTERLOCKEDDECREMENT64==0
+static inline gint64 InterlockedDecrement64(volatile gint64 *val)
{
- return atomic_swap_32((uint32_t*)val, new_val);
+ return __sync_sub_and_fetch (val, 1);
}
+#endif
-static inline gpointer InterlockedExchangePointer(volatile gpointer *val,
- gpointer new_val)
+/* mingw is missing InterlockedAdd () from winbase.h */
+#if HAVE_DECL_INTERLOCKEDADD==0
+static inline gint32 InterlockedAdd(volatile gint32 *dest, gint32 add)
{
- return atomic_swap_ptr(val, new_val);
+ return __sync_add_and_fetch (dest, add);
}
+#endif
-static inline gint32 InterlockedExchangeAdd(volatile gint32 *val, gint32 add)
+/* mingw is missing InterlockedAdd64 () from winbase.h */
+#if HAVE_DECL_INTERLOCKEDADD64==0
+static inline gint64 InterlockedAdd64(volatile gint64 *dest, gint64 add)
{
- return atomic_add_32_nv((uint32_t*)val, add) - add;
+ return __sync_add_and_fetch (dest, add);
}
+#endif
-#elif defined(__i386__) || defined(__x86_64__)
-
-/*
- * NB: The *Pointer() functions here assume that
- * sizeof(pointer)==sizeof(gint32)
- *
- * NB2: These asm functions assume 486+ (some of the opcodes dont
- * exist on 386). If this becomes an issue, we can get configure to
- * fall back to the non-atomic C versions of these calls.
- */
-
-static inline gint32 InterlockedCompareExchange(volatile gint32 *dest,
- gint32 exch, gint32 comp)
-{
- gint32 old;
-
- __asm__ __volatile__ ("lock; cmpxchgl %2, %0"
- : "=m" (*dest), "=a" (old)
- : "r" (exch), "m" (*dest), "a" (comp));
- return(old);
-}
+/* And now for some dirty hacks... The Windows API doesn't
+ * provide any useful primitives for this (other than getting
+ * into architecture-specific madness), so use CAS. */
-static inline gpointer InterlockedCompareExchangePointer(volatile gpointer *dest, gpointer exch, gpointer comp)
+static inline gint32 InterlockedRead(volatile gint32 *src)
{
- gpointer old;
-
- __asm__ __volatile__ ("lock; "
-#if defined(__x86_64__) && !defined(__native_client__)
- "cmpxchgq"
-#else
- "cmpxchgl"
-#endif
- " %2, %0"
- : "=m" (*dest), "=a" (old)
- : "r" (exch), "m" (*dest), "a" (comp));
-
- return(old);
+ return InterlockedCompareExchange (src, 0, 0);
}
-static inline gint32 InterlockedIncrement(volatile gint32 *val)
+static inline gint64 InterlockedRead64(volatile gint64 *src)
{
- gint32 tmp;
-
- __asm__ __volatile__ ("lock; xaddl %0, %1"
- : "=r" (tmp), "=m" (*val)
- : "0" (1), "m" (*val));
-
- return(tmp+1);
+ return InterlockedCompareExchange64 (src, 0, 0);
}
-static inline gint32 InterlockedDecrement(volatile gint32 *val)
+static inline gpointer InterlockedReadPointer(volatile gpointer *src)
{
- gint32 tmp;
-
- __asm__ __volatile__ ("lock; xaddl %0, %1"
- : "=r" (tmp), "=m" (*val)
- : "0" (-1), "m" (*val));
-
- return(tmp-1);
+ return InterlockedCompareExchangePointer (src, NULL, NULL);
}
-/*
- * See
- * http://msdn.microsoft.com/msdnmag/issues/0700/Win32/
- * for the reasons for using cmpxchg and a loop here.
- */
-static inline gint32 InterlockedExchange(volatile gint32 *val, gint32 new_val)
+static inline void InterlockedWrite(volatile gint32 *dst, gint32 val)
{
- gint32 ret;
-
- __asm__ __volatile__ ("1:; lock; cmpxchgl %2, %0; jne 1b"
- : "=m" (*val), "=a" (ret)
- : "r" (new_val), "m" (*val), "a" (*val));
- return(ret);
+ InterlockedExchange (dst, val);
}
-static inline gpointer InterlockedExchangePointer(volatile gpointer *val,
- gpointer new_val)
+static inline void InterlockedWrite64(volatile gint64 *dst, gint64 val)
{
- gpointer ret;
-
- __asm__ __volatile__ ("1:; lock; "
-#if defined(__x86_64__) && !defined(__native_client__)
- "cmpxchgq"
-#else
- "cmpxchgl"
-#endif
- " %2, %0; jne 1b"
- : "=m" (*val), "=a" (ret)
- : "r" (new_val), "m" (*val), "a" (*val));
-
- return(ret);
+ InterlockedExchange64 (dst, val);
}
-static inline gint32 InterlockedExchangeAdd(volatile gint32 *val, gint32 add)
+static inline void InterlockedWritePointer(volatile gpointer *dst, gpointer val)
{
- gint32 ret;
-
- __asm__ __volatile__ ("lock; xaddl %0, %1"
- : "=r" (ret), "=m" (*val)
- : "0" (add), "m" (*val));
-
- return(ret);
+ InterlockedExchangePointer (dst, val);
}
-#elif (defined(sparc) || defined (__sparc__)) && defined(__GNUC__)
+/* We can't even use CAS for these, so write them out
+ * explicitly according to x86(_64) semantics... */
-G_GNUC_UNUSED
-static inline gint32 InterlockedCompareExchange(volatile gint32 *_dest, gint32 _exch, gint32 _comp)
+static inline gint8 InterlockedRead8(volatile gint8 *src)
{
- register volatile gint32 *dest asm("g1") = _dest;
- register gint32 comp asm("o4") = _comp;
- register gint32 exch asm("o5") = _exch;
-
- __asm__ __volatile__(
- /* cas [%%g1], %%o4, %%o5 */
- ".word 0xdbe0500c"
- : "=r" (exch)
- : "0" (exch), "r" (dest), "r" (comp)
- : "memory");
-
- return exch;
+ return *src;
}
-G_GNUC_UNUSED
-static inline gpointer InterlockedCompareExchangePointer(volatile gpointer *_dest, gpointer _exch, gpointer _comp)
+static inline gint16 InterlockedRead16(volatile gint16 *src)
{
- register volatile gpointer *dest asm("g1") = _dest;
- register gpointer comp asm("o4") = _comp;
- register gpointer exch asm("o5") = _exch;
-
- __asm__ __volatile__(
-#ifdef SPARCV9
- /* casx [%%g1], %%o4, %%o5 */
- ".word 0xdbf0500c"
-#else
- /* cas [%%g1], %%o4, %%o5 */
- ".word 0xdbe0500c"
-#endif
- : "=r" (exch)
- : "0" (exch), "r" (dest), "r" (comp)
- : "memory");
-
- return exch;
+ return *src;
}
-G_GNUC_UNUSED
-static inline gint32 InterlockedIncrement(volatile gint32 *_dest)
+static inline void InterlockedWrite8(volatile gint8 *dst, gint8 val)
{
- register volatile gint32 *dest asm("g1") = _dest;
- register gint32 tmp asm("o4");
- register gint32 ret asm("o5");
-
- __asm__ __volatile__(
- "1: ld [%%g1], %%o4\n\t"
- " add %%o4, 1, %%o5\n\t"
- /* cas [%%g1], %%o4, %%o5 */
- " .word 0xdbe0500c\n\t"
- " cmp %%o4, %%o5\n\t"
- " bne 1b\n\t"
- " add %%o5, 1, %%o5"
- : "=&r" (tmp), "=&r" (ret)
- : "r" (dest)
- : "memory", "cc");
-
- return ret;
+ *dst = val;
+ mono_memory_barrier ();
}
-G_GNUC_UNUSED
-static inline gint32 InterlockedDecrement(volatile gint32 *_dest)
+static inline void InterlockedWrite16(volatile gint16 *dst, gint16 val)
{
- register volatile gint32 *dest asm("g1") = _dest;
- register gint32 tmp asm("o4");
- register gint32 ret asm("o5");
-
- __asm__ __volatile__(
- "1: ld [%%g1], %%o4\n\t"
- " sub %%o4, 1, %%o5\n\t"
- /* cas [%%g1], %%o4, %%o5 */
- " .word 0xdbe0500c\n\t"
- " cmp %%o4, %%o5\n\t"
- " bne 1b\n\t"
- " sub %%o5, 1, %%o5"
- : "=&r" (tmp), "=&r" (ret)
- : "r" (dest)
- : "memory", "cc");
-
- return ret;
+ *dst = val;
+ mono_memory_barrier ();
}
-G_GNUC_UNUSED
-static inline gint32 InterlockedExchange(volatile gint32 *_dest, gint32 exch)
+/* Prefer GCC atomic ops if the target supports it (see configure.in). */
+#elif defined(USE_GCC_ATOMIC_OPS)
+
+static inline gint32 InterlockedCompareExchange(volatile gint32 *dest,
+ gint32 exch, gint32 comp)
{
- register volatile gint32 *dest asm("g1") = _dest;
- register gint32 tmp asm("o4");
- register gint32 ret asm("o5");
-
- __asm__ __volatile__(
- "1: ld [%%g1], %%o4\n\t"
- " mov %3, %%o5\n\t"
- /* cas [%%g1], %%o4, %%o5 */
- " .word 0xdbe0500c\n\t"
- " cmp %%o4, %%o5\n\t"
- " bne 1b\n\t"
- " nop"
- : "=&r" (tmp), "=&r" (ret)
- : "r" (dest), "r" (exch)
- : "memory", "cc");
-
- return ret;
+ return __sync_val_compare_and_swap (dest, comp, exch);
}
-G_GNUC_UNUSED
-static inline gpointer InterlockedExchangePointer(volatile gpointer *_dest, gpointer exch)
+static inline gpointer InterlockedCompareExchangePointer(volatile gpointer *dest, gpointer exch, gpointer comp)
{
- register volatile gpointer *dest asm("g1") = _dest;
- register gpointer tmp asm("o4");
- register gpointer ret asm("o5");
-
- __asm__ __volatile__(
-#ifdef SPARCV9
- "1: ldx [%%g1], %%o4\n\t"
-#else
- "1: ld [%%g1], %%o4\n\t"
-#endif
- " mov %3, %%o5\n\t"
-#ifdef SPARCV9
- /* casx [%%g1], %%o4, %%o5 */
- " .word 0xdbf0500c\n\t"
-#else
- /* cas [%%g1], %%o4, %%o5 */
- " .word 0xdbe0500c\n\t"
-#endif
- " cmp %%o4, %%o5\n\t"
- " bne 1b\n\t"
- " nop"
- : "=&r" (tmp), "=&r" (ret)
- : "r" (dest), "r" (exch)
- : "memory", "cc");
-
- return ret;
+ return __sync_val_compare_and_swap (dest, comp, exch);
}
-G_GNUC_UNUSED
-static inline gint32 InterlockedExchangeAdd(volatile gint32 *_dest, gint32 add)
+static inline gint32 InterlockedAdd(volatile gint32 *dest, gint32 add)
{
- register volatile gint32 *dest asm("g1") = _dest;
- register gint32 tmp asm("o4");
- register gint32 ret asm("o5");
-
- __asm__ __volatile__(
- "1: ld [%%g1], %%o4\n\t"
- " add %%o4, %3, %%o5\n\t"
- /* cas [%%g1], %%o4, %%o5 */
- " .word 0xdbe0500c\n\t"
- " cmp %%o4, %%o5\n\t"
- " bne 1b\n\t"
- " add %%o5, %3, %%o5"
- : "=&r" (tmp), "=&r" (ret)
- : "r" (dest), "r" (add)
- : "memory", "cc");
-
- return ret;
+ return __sync_add_and_fetch (dest, add);
}
-#elif __s390x__
-
-static inline gint32
-InterlockedCompareExchange(volatile gint32 *dest,
- gint32 exch, gint32 comp)
+static inline gint32 InterlockedIncrement(volatile gint32 *val)
{
- gint32 old;
-
- __asm__ __volatile__ ("\tLA\t1,%0\n"
- "\tLR\t%1,%3\n"
- "\tCS\t%1,%2,0(1)\n"
- : "+m" (*dest), "=&r" (old)
- : "r" (exch), "r" (comp)
- : "1", "cc");
- return(old);
+ return __sync_add_and_fetch (val, 1);
}
-static inline gpointer
-InterlockedCompareExchangePointer(volatile gpointer *dest,
- gpointer exch,
- gpointer comp)
+static inline gint32 InterlockedDecrement(volatile gint32 *val)
{
- gpointer old;
-
- __asm__ __volatile__ ("\tLA\t1,%0\n"
- "\tLGR\t%1,%3\n"
- "\tCSG\t%1,%2,0(1)\n"
- : "+m" (*dest), "=&r" (old)
- : "r" (exch), "r" (comp)
- : "1", "cc");
-
- return(old);
+ return __sync_sub_and_fetch (val, 1);
}
-static inline gint32
-InterlockedIncrement(volatile gint32 *val)
+static inline gint32 InterlockedExchange(volatile gint32 *val, gint32 new_val)
{
- gint32 tmp;
-
- __asm__ __volatile__ ("\tLA\t2,%1\n"
- "0:\tLGF\t%0,%1\n"
- "\tLGFR\t1,%0\n"
- "\tAGHI\t1,1\n"
- "\tCS\t%0,1,0(2)\n"
- "\tJNZ\t0b\n"
- "\tLGFR\t%0,1"
- : "=r" (tmp), "+m" (*val)
- : : "1", "2", "cc");
-
- return(tmp);
+ gint32 old_val;
+ do {
+ old_val = *val;
+ } while (__sync_val_compare_and_swap (val, old_val, new_val) != old_val);
+ return old_val;
}
-static inline gint32
-InterlockedDecrement(volatile gint32 *val)
+static inline gpointer InterlockedExchangePointer(volatile gpointer *val,
+ gpointer new_val)
{
- gint32 tmp;
-
- __asm__ __volatile__ ("\tLA\t2,%1\n"
- "0:\tLGF\t%0,%1\n"
- "\tLGFR\t1,%0\n"
- "\tAGHI\t1,-1\n"
- "\tCS\t%0,1,0(2)\n"
- "\tJNZ\t0b\n"
- "\tLGFR\t%0,1"
- : "=r" (tmp), "+m" (*val)
- : : "1", "2", "cc");
-
- return(tmp);
+ gpointer old_val;
+ do {
+ old_val = *val;
+ } while (__sync_val_compare_and_swap (val, old_val, new_val) != old_val);
+ return old_val;
}
-static inline gint32
-InterlockedExchange(volatile gint32 *val, gint32 new_val)
+static inline gint32 InterlockedExchangeAdd(volatile gint32 *val, gint32 add)
{
- gint32 ret;
-
- __asm__ __volatile__ ("\tLA\t1,%0\n"
- "0:\tL\t%1,%0\n"
- "\tCS\t%1,%2,0(1)\n"
- "\tJNZ\t0b"
- : "+m" (*val), "=&r" (ret)
- : "r" (new_val)
- : "1", "cc");
-
- return(ret);
+ return __sync_fetch_and_add (val, add);
}
-static inline gpointer
-InterlockedExchangePointer(volatile gpointer *val, gpointer new_val)
+static inline gint8 InterlockedRead8(volatile gint8 *src)
{
- gpointer ret;
-
- __asm__ __volatile__ ("\tLA\t1,%0\n"
- "0:\tLG\t%1,%0\n"
- "\tCSG\t%1,%2,0(1)\n"
- "\tJNZ\t0b"
- : "+m" (*val), "=&r" (ret)
- : "r" (new_val)
- : "1", "cc");
-
- return(ret);
+ /* Kind of a hack, but GCC doesn't give us anything better, and it's
+ * certainly not as bad as using a CAS loop. */
+ return __sync_fetch_and_add (src, 0);
}
-static inline gint32
-InterlockedExchangeAdd(volatile gint32 *val, gint32 add)
+static inline gint16 InterlockedRead16(volatile gint16 *src)
{
- gint32 ret;
-
- __asm__ __volatile__ ("\tLA\t2,%1\n"
- "0:\tLGF\t%0,%1\n"
- "\tLGFR\t1,%0\n"
- "\tAGR\t1,%2\n"
- "\tCS\t%0,1,0(2)\n"
- "\tJNZ\t0b"
- : "=&r" (ret), "+m" (*val)
- : "r" (add)
- : "1", "2", "cc");
-
- return(ret);
+ return __sync_fetch_and_add (src, 0);
}
-#elif defined(__mono_ppc__)
-
-#ifdef G_COMPILER_CODEWARRIOR
-static inline gint32 InterlockedIncrement(volatile register gint32 *val)
+static inline gint32 InterlockedRead(volatile gint32 *src)
{
- gint32 result = 0, tmp;
- register gint32 result = 0;
- register gint32 tmp;
-
- asm
- {
- @1:
- lwarx tmp, 0, val
- addi result, tmp, 1
- stwcx. result, 0, val
- bne- @1
- }
-
- return result;
+ return __sync_fetch_and_add (src, 0);
}
-static inline gint32 InterlockedDecrement(register volatile gint32 *val)
+static inline void InterlockedWrite8(volatile gint8 *dst, gint8 val)
{
- register gint32 result = 0;
- register gint32 tmp;
-
- asm
- {
- @1:
- lwarx tmp, 0, val
- addi result, tmp, -1
- stwcx. result, 0, val
- bne- @1
- }
-
- return result;
+ /* Nothing useful from GCC at all, so fall back to CAS. */
+ gint8 old_val;
+ do {
+ old_val = *dst;
+ } while (__sync_val_compare_and_swap (dst, old_val, val) != old_val);
}
-#define InterlockedCompareExchangePointer(dest,exch,comp) (void*)InterlockedCompareExchange((volatile gint32 *)(dest), (gint32)(exch), (gint32)(comp))
-static inline gint32 InterlockedCompareExchange(volatile register gint32 *dest, register gint32 exch, register gint32 comp)
+static inline void InterlockedWrite16(volatile gint16 *dst, gint16 val)
{
- register gint32 tmp = 0;
-
- asm
- {
- @1:
- lwarx tmp, 0, dest
- cmpw tmp, comp
- bne- @2
- stwcx. exch, 0, dest
- bne- @1
- @2:
- }
-
- return tmp;
+ gint16 old_val;
+ do {
+ old_val = *dst;
+ } while (__sync_val_compare_and_swap (dst, old_val, val) != old_val);
}
-static inline gint32 InterlockedExchange(register volatile gint32 *dest, register gint32 exch)
-{
- register gint32 tmp = 0;
-
- asm
- {
- @1:
- lwarx tmp, 0, dest
- stwcx. exch, 0, dest
- bne- @1
- }
- return tmp;
+static inline void InterlockedWrite(volatile gint32 *dst, gint32 val)
+{
+ /* Nothing useful from GCC at all, so fall back to CAS. */
+ gint32 old_val;
+ do {
+ old_val = *dst;
+ } while (__sync_val_compare_and_swap (dst, old_val, val) != old_val);
}
-#define InterlockedExchangePointer(dest,exch) (void*)InterlockedExchange((volatile gint32 *)(dest), (gint32)(exch))
-#else
-#if defined(__mono_ppc64__) && !defined(__mono_ilp32__)
-#define LDREGX "ldarx"
-#define STREGCXD "stdcx."
-#define CMPREG "cmpd"
-#else
-#define LDREGX "lwarx"
-#define STREGCXD "stwcx."
-#define CMPREG "cmpw"
+#if defined (TARGET_OSX) || defined (__arm__) || (defined (__mips__) && !defined (__mips64)) || (defined (__powerpc__) && !defined (__powerpc64__)) || (defined (__sparc__) && !defined (__arch64__))
+#define BROKEN_64BIT_ATOMICS_INTRINSIC 1
#endif
-static inline gint32 InterlockedIncrement(volatile gint32 *val)
-{
- gint32 result = 0, tmp;
-
- __asm__ __volatile__ ("\n1:\n\t"
- "lwarx %0, 0, %2\n\t"
- "addi %1, %0, 1\n\t"
- "stwcx. %1, 0, %2\n\t"
- "bne- 1b"
- : "=&b" (result), "=&b" (tmp): "r" (val): "cc", "memory");
- return result + 1;
-}
+#if !defined (BROKEN_64BIT_ATOMICS_INTRINSIC)
-static inline gint32 InterlockedDecrement(volatile gint32 *val)
+static inline gint64 InterlockedCompareExchange64(volatile gint64 *dest, gint64 exch, gint64 comp)
{
- gint32 result = 0, tmp;
-
- __asm__ __volatile__ ("\n1:\n\t"
- "lwarx %0, 0, %2\n\t"
- "addi %1, %0, -1\n\t"
- "stwcx. %1, 0, %2\n\t"
- "bne- 1b"
- : "=&b" (result), "=&b" (tmp): "r" (val): "cc", "memory");
- return result - 1;
+ return __sync_val_compare_and_swap (dest, comp, exch);
}
-static inline gpointer InterlockedCompareExchangePointer (volatile gpointer *dest,
- gpointer exch, gpointer comp)
+static inline gint64 InterlockedAdd64(volatile gint64 *dest, gint64 add)
{
- gpointer tmp = NULL;
-
- __asm__ __volatile__ ("\n1:\n\t"
- LDREGX " %0, 0, %1\n\t"
- CMPREG " %0, %2\n\t"
- "bne- 2f\n\t"
- STREGCXD " %3, 0, %1\n\t"
- "bne- 1b\n"
- "2:"
- : "=&r" (tmp)
- : "b" (dest), "r" (comp), "r" (exch): "cc", "memory");
- return(tmp);
+ return __sync_add_and_fetch (dest, add);
}
-static inline gint32 InterlockedCompareExchange(volatile gint32 *dest,
- gint32 exch, gint32 comp) {
- gint32 tmp = 0;
-
- __asm__ __volatile__ ("\n1:\n\t"
- "lwarx %0, 0, %1\n\t"
- "cmpw %0, %2\n\t"
- "bne- 2f\n\t"
- "stwcx. %3, 0, %1\n\t"
- "bne- 1b\n"
- "2:"
- : "=&r" (tmp)
- : "b" (dest), "r" (comp), "r" (exch): "cc", "memory");
- return(tmp);
+static inline gint64 InterlockedIncrement64(volatile gint64 *val)
+{
+ return __sync_add_and_fetch (val, 1);
}
-static inline gint32 InterlockedExchange(volatile gint32 *dest, gint32 exch)
+static inline gint64 InterlockedDecrement64(volatile gint64 *val)
{
- gint32 tmp = 0;
-
- __asm__ __volatile__ ("\n1:\n\t"
- "lwarx %0, 0, %2\n\t"
- "stwcx. %3, 0, %2\n\t"
- "bne 1b"
- : "=r" (tmp) : "0" (tmp), "b" (dest), "r" (exch): "cc", "memory");
- return(tmp);
+ return __sync_sub_and_fetch (val, 1);
}
-static inline gpointer InterlockedExchangePointer (volatile gpointer *dest, gpointer exch)
+static inline gint64 InterlockedExchangeAdd64(volatile gint64 *val, gint64 add)
{
- gpointer tmp = NULL;
-
- __asm__ __volatile__ ("\n1:\n\t"
- LDREGX " %0, 0, %2\n\t"
- STREGCXD " %3, 0, %2\n\t"
- "bne 1b"
- : "=r" (tmp) : "0" (tmp), "b" (dest), "r" (exch): "cc", "memory");
- return(tmp);
+ return __sync_fetch_and_add (val, add);
}
-static inline gint32 InterlockedExchangeAdd(volatile gint32 *dest, gint32 add)
+static inline gint64 InterlockedRead64(volatile gint64 *src)
{
- gint32 result, tmp;
- __asm__ __volatile__ ("\n1:\n\t"
- "lwarx %0, 0, %2\n\t"
- "add %1, %0, %3\n\t"
- "stwcx. %1, 0, %2\n\t"
- "bne 1b"
- : "=&r" (result), "=&r" (tmp)
- : "r" (dest), "r" (add) : "cc", "memory");
- return(result);
+ /* Kind of a hack, but GCC doesn't give us anything better. */
+ return __sync_fetch_and_add (src, 0);
}
-#undef LDREGX
-#undef STREGCXD
-#undef CMPREG
-
-#endif /* !G_COMPILER_CODEWARRIOR */
-
-#elif defined(__arm__)
-
-#ifdef __native_client__
-#define MASK_REGISTER(reg, cond) "bic" cond " " reg ", " reg ", #0xc0000000\n"
-#define NACL_ALIGN() ".align 4\n"
#else
-#define MASK_REGISTER(reg, cond)
-#define NACL_ALIGN()
-#endif
-/*
- * Atomic operations on ARM doesn't contain memory barriers, and the runtime code
- * depends on this, so we add them explicitly.
+/* Implement 64-bit cmpxchg by hand or emulate it. */
+extern gint64 InterlockedCompareExchange64(volatile gint64 *dest, gint64 exch, gint64 comp);
+
+/* Implement all other 64-bit atomics in terms of a specialized CAS
+ * in this case, since chances are that the other 64-bit atomic
+ * intrinsics are broken too.
*/
-static inline gint32 InterlockedCompareExchange(volatile gint32 *dest, gint32 exch, gint32 comp)
+static inline gint64 InterlockedExchangeAdd64(volatile gint64 *dest, gint64 add)
{
-#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7S__)
- gint32 ret, tmp;
- __asm__ __volatile__ ( "1:\n"
- NACL_ALIGN()
- "dmb\n"
- "mov %0, #0\n"
- NACL_ALIGN()
- MASK_REGISTER("%2", "al")
- "ldrex %1, [%2]\n"
- "teq %1, %3\n"
- "it eq\n"
- NACL_ALIGN()
- MASK_REGISTER("%2", "eq")
- "strexeq %0, %4, [%2]\n"
- "teq %0, #0\n"
- "bne 1b\n"
- "dmb\n"
- : "=&r" (tmp), "=&r" (ret)
- : "r" (dest), "r" (comp), "r" (exch)
- : "memory", "cc");
-
- return ret;
-#else
- gint32 a, b;
-
- __asm__ __volatile__ ( "0:\n\t"
- NACL_ALIGN()
- MASK_REGISTER("%2", "al")
- "ldr %1, [%2]\n\t"
- "cmp %1, %4\n\t"
- "mov %0, %1\n\t"
- "bne 1f\n\t"
- NACL_ALIGN()
- MASK_REGISTER("%2", "al")
- "swp %0, %3, [%2]\n\t"
- "cmp %0, %1\n\t"
- NACL_ALIGN()
- MASK_REGISTER("%2", "ne")
- "swpne %3, %0, [%2]\n\t"
- "bne 0b\n\t"
- "1:"
- : "=&r" (a), "=&r" (b)
- : "r" (dest), "r" (exch), "r" (comp)
- : "cc", "memory");
-
- return a;
-#endif
+ gint64 old_val;
+ do {
+ old_val = *dest;
+ } while (InterlockedCompareExchange64 (dest, old_val + add, old_val) != old_val);
+ return old_val;
}
-static inline gpointer InterlockedCompareExchangePointer(volatile gpointer *dest, gpointer exch, gpointer comp)
+static inline gint64 InterlockedIncrement64(volatile gint64 *val)
{
-#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7S__)
- gpointer ret, tmp;
- __asm__ __volatile__ (
- "dmb\n"
- "1:\n"
- NACL_ALIGN()
- "mov %0, #0\n"
- NACL_ALIGN()
- MASK_REGISTER("%2", "al")
- "ldrex %1, [%2]\n"
- "teq %1, %3\n"
- "it eq\n"
- NACL_ALIGN()
- MASK_REGISTER("%2", "eq")
- "strexeq %0, %4, [%2]\n"
- "teq %0, #0\n"
- "bne 1b\n"
- "dmb\n"
- : "=&r" (tmp), "=&r" (ret)
- : "r" (dest), "r" (comp), "r" (exch)
- : "memory", "cc");
-
- return ret;
-#else
- gpointer a, b;
-
- __asm__ __volatile__ ( "0:\n\t"
- NACL_ALIGN()
- MASK_REGISTER("%2", "al")
- "ldr %1, [%2]\n\t"
- "cmp %1, %4\n\t"
- "mov %0, %1\n\t"
- "bne 1f\n\t"
- NACL_ALIGN()
- MASK_REGISTER("%2", "eq")
- "swpeq %0, %3, [%2]\n\t"
- "cmp %0, %1\n\t"
- NACL_ALIGN()
- MASK_REGISTER("%2", "ne")
- "swpne %3, %0, [%2]\n\t"
- "bne 0b\n\t"
- "1:"
- : "=&r" (a), "=&r" (b)
- : "r" (dest), "r" (exch), "r" (comp)
- : "cc", "memory");
-
- return a;
-#endif
+ gint64 get, set;
+ do {
+ get = *val;
+ set = get + 1;
+ } while (InterlockedCompareExchange64 (val, set, get) != get);
+ return set;
}
-static inline gint32 InterlockedIncrement(volatile gint32 *dest)
+static inline gint64 InterlockedDecrement64(volatile gint64 *val)
{
-#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7S__)
- gint32 ret, flag;
- __asm__ __volatile__ (
- "dmb\n"
- "1:\n"
- NACL_ALIGN()
- MASK_REGISTER("%2", "al")
- "ldrex %0, [%2]\n"
- "add %0, %0, %3\n"
- NACL_ALIGN()
- MASK_REGISTER("%2", "al")
- "strex %1, %0, [%2]\n"
- "teq %1, #0\n"
- "bne 1b\n"
- "dmb\n"
- : "=&r" (ret), "=&r" (flag)
- : "r" (dest), "r" (1)
- : "memory", "cc");
-
- return ret;
-#else
- gint32 a, b, c;
-
- __asm__ __volatile__ ( "0:\n\t"
- NACL_ALIGN()
- MASK_REGISTER("%3", "al")
- "ldr %0, [%3]\n\t"
- "add %1, %0, %4\n\t"
- NACL_ALIGN()
- MASK_REGISTER("%3", "al")
- "swp %2, %1, [%3]\n\t"
- "cmp %0, %2\n\t"
- NACL_ALIGN()
- MASK_REGISTER("%3", "ne")
- "swpne %1, %2, [%3]\n\t"
- "bne 0b"
- : "=&r" (a), "=&r" (b), "=&r" (c)
- : "r" (dest), "r" (1)
- : "cc", "memory");
-
- return b;
-#endif
+ gint64 get, set;
+ do {
+ get = *val;
+ set = get - 1;
+ } while (InterlockedCompareExchange64 (val, set, get) != get);
+ return set;
}
-static inline gint32 InterlockedDecrement(volatile gint32 *dest)
+static inline gint64 InterlockedAdd64(volatile gint64 *dest, gint64 add)
{
-#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7S__)
- gint32 ret, flag;
- __asm__ __volatile__ (
- "dmb\n"
- "1:\n"
- NACL_ALIGN()
- MASK_REGISTER("%2", "al")
- "ldrex %0, [%2]\n"
- "sub %0, %0, %3\n"
- NACL_ALIGN()
- MASK_REGISTER("%2", "al")
- "strex %1, %0, [%2]\n"
- "teq %1, #0\n"
- "bne 1b\n"
- "dmb\n"
- : "=&r" (ret), "=&r" (flag)
- : "r" (dest), "r" (1)
- : "memory", "cc");
-
- return ret;
-#else
- gint32 a, b, c;
-
- __asm__ __volatile__ ( "0:\n\t"
- NACL_ALIGN()
- MASK_REGISTER("%3", "al")
- "ldr %0, [%3]\n\t"
- "add %1, %0, %4\n\t"
- NACL_ALIGN()
- MASK_REGISTER("%3", "al")
- "swp %2, %1, [%3]\n\t"
- "cmp %0, %2\n\t"
- NACL_ALIGN()
- MASK_REGISTER("%3", "ne")
- "swpne %1, %2, [%3]\n\t"
- "bne 0b"
- : "=&r" (a), "=&r" (b), "=&r" (c)
- : "r" (dest), "r" (-1)
- : "cc", "memory");
-
- return b;
-#endif
+ gint64 get, set;
+ do {
+ get = *dest;
+ set = get + add;
+ } while (InterlockedCompareExchange64 (dest, set, get) != get);
+ return set;
}
-static inline gint32 InterlockedExchange(volatile gint32 *dest, gint32 exch)
+static inline gint64 InterlockedRead64(volatile gint64 *src)
{
-#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7S__)
- gint32 ret, flag;
- __asm__ __volatile__ (
- "dmb\n"
- "1:\n"
- NACL_ALIGN()
- MASK_REGISTER("%3", "al")
- "ldrex %0, [%3]\n"
- NACL_ALIGN()
- MASK_REGISTER("%3", "al")
- "strex %1, %2, [%3]\n"
- "teq %1, #0\n"
- "bne 1b\n"
- "dmb\n"
- : "=&r" (ret), "=&r" (flag)
- : "r" (exch), "r" (dest)
- : "memory", "cc");
- return ret;
-#else
- gint32 a;
-
- __asm__ __volatile__ ( NACL_ALIGN()
- MASK_REGISTER("%1", "al")
- "swp %0, %2, [%1]"
- : "=&r" (a)
- : "r" (dest), "r" (exch));
+ return InterlockedCompareExchange64 (src, 0, 0);
+}
- return a;
#endif
-}
-static inline gpointer InterlockedExchangePointer(volatile gpointer *dest, gpointer exch)
+static inline gpointer InterlockedReadPointer(volatile gpointer *src)
{
-#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7S__)
- gpointer ret, flag;
- __asm__ __volatile__ (
- "dmb\n"
- "1:\n"
- NACL_ALIGN()
- MASK_REGISTER("%3", "al")
- "ldrex %0, [%3]\n"
- NACL_ALIGN()
- MASK_REGISTER("%3", "al")
- "strex %1, %2, [%3]\n"
- "teq %1, #0\n"
- "bne 1b\n"
- "dmb\n"
- : "=&r" (ret), "=&r" (flag)
- : "r" (exch), "r" (dest)
- : "memory", "cc");
- return ret;
-#else
- gpointer a;
-
- __asm__ __volatile__ ( NACL_ALIGN()
- MASK_REGISTER("%1", "al")
- "swp %0, %2, [%1]"
- : "=&r" (a)
- : "r" (dest), "r" (exch));
+ return InterlockedCompareExchangePointer (src, NULL, NULL);
+}
- return a;
-#endif
+static inline void InterlockedWritePointer(volatile gpointer *dst, gpointer val)
+{
+ InterlockedExchangePointer (dst, val);
}
-static inline gint32 InterlockedExchangeAdd(volatile gint32 *dest, gint32 add)
+/* We always implement this in terms of a 64-bit cmpxchg since
+ * GCC doesn't have an intrisic to model it anyway. */
+static inline gint64 InterlockedExchange64(volatile gint64 *val, gint64 new_val)
{
-#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7S__)
- gint32 ret, tmp, flag;
- __asm__ __volatile__ (
- "dmb\n"
- "1:\n"
- NACL_ALIGN()
- MASK_REGISTER("%3", "al")
- "ldrex %0, [%3]\n"
- "add %1, %0, %4\n"
- NACL_ALIGN()
- MASK_REGISTER("%3", "al")
- "strex %2, %1, [%3]\n"
- "teq %2, #0\n"
- "bne 1b\n"
- "dmb\n"
- : "=&r" (ret), "=&r" (tmp), "=&r" (flag)
- : "r" (dest), "r" (add)
- : "memory", "cc");
-
- return ret;
-#else
- int a, b, c;
-
- __asm__ __volatile__ ( "0:\n\t"
- NACL_ALIGN()
- MASK_REGISTER("%3", "al")
- "ldr %0, [%3]\n\t"
- "add %1, %0, %4\n\t"
- NACL_ALIGN()
- MASK_REGISTER("%3", "al")
- "swp %2, %1, [%3]\n\t"
- "cmp %0, %2\n\t"
- NACL_ALIGN()
- MASK_REGISTER("%3", "ne")
- "swpne %1, %2, [%3]\n\t"
- "bne 0b"
- : "=&r" (a), "=&r" (b), "=&r" (c)
- : "r" (dest), "r" (add)
- : "cc", "memory");
-
- return a;
-#endif
+ gint64 old_val;
+ do {
+ old_val = *val;
+ } while (InterlockedCompareExchange64 (val, new_val, old_val) != old_val);
+ return old_val;
}
-#undef NACL_ALIGN
-#undef MASK_REGISTER
+static inline void InterlockedWrite64(volatile gint64 *dst, gint64 val)
+{
+ /* Nothing useful from GCC at all, so fall back to CAS. */
+ InterlockedExchange64 (dst, val);
+}
#elif defined(__ia64__)
@@ -1077,159 +470,35 @@ static inline gint32 InterlockedExchangeAdd(gint32 volatile *val, gint32 add)
#endif
}
-#elif defined(__mips__)
-
-#if SIZEOF_REGISTER == 8
-#error "Not implemented."
-#endif
-
-static inline gint32 InterlockedIncrement(volatile gint32 *val)
-{
- gint32 tmp, result = 0;
-
- __asm__ __volatile__ (" .set mips32\n"
- "1: ll %0, %2\n"
- " addu %1, %0, 1\n"
- " sc %1, %2\n"
- " beqz %1, 1b\n"
- " .set mips0\n"
- : "=&r" (result), "=&r" (tmp), "=m" (*val)
- : "m" (*val));
- return result + 1;
-}
-
-static inline gint32 InterlockedDecrement(volatile gint32 *val)
-{
- gint32 tmp, result = 0;
-
- __asm__ __volatile__ (" .set mips32\n"
- "1: ll %0, %2\n"
- " subu %1, %0, 1\n"
- " sc %1, %2\n"
- " beqz %1, 1b\n"
- " .set mips0\n"
- : "=&r" (result), "=&r" (tmp), "=m" (*val)
- : "m" (*val));
- return result - 1;
-}
-
-static inline gint32 InterlockedCompareExchange(volatile gint32 *dest,
- gint32 exch, gint32 comp) {
- gint32 old, tmp;
-
- __asm__ __volatile__ (" .set mips32\n"
- "1: ll %0, %2\n"
- " bne %0, %5, 2f\n"
- " move %1, %4\n"
- " sc %1, %2\n"
- " beqz %1, 1b\n"
- "2: .set mips0\n"
- : "=&r" (old), "=&r" (tmp), "=m" (*dest)
- : "m" (*dest), "r" (exch), "r" (comp));
- return(old);
-}
-
-static inline gpointer InterlockedCompareExchangePointer(volatile gpointer *dest, gpointer exch, gpointer comp)
-{
- return (gpointer)(InterlockedCompareExchange((volatile gint32 *)(dest), (gint32)(exch), (gint32)(comp)));
-}
-
-static inline gint32 InterlockedExchange(volatile gint32 *dest, gint32 exch)
-{
- gint32 result, tmp;
-
- __asm__ __volatile__ (" .set mips32\n"
- "1: ll %0, %2\n"
- " move %1, %4\n"
- " sc %1, %2\n"
- " beqz %1, 1b\n"
- " .set mips0\n"
- : "=&r" (result), "=&r" (tmp), "=m" (*dest)
- : "m" (*dest), "r" (exch));
- return(result);
-}
-
-static inline gpointer InterlockedExchangePointer(volatile gpointer *dest, gpointer exch)
-{
- return (gpointer)InterlockedExchange((volatile gint32 *)(dest), (gint32)(exch));
-}
-
-static inline gint32 InterlockedExchangeAdd(volatile gint32 *dest, gint32 add)
-{
- gint32 result, tmp;
-
- __asm__ __volatile__ (" .set mips32\n"
- "1: ll %0, %2\n"
- " addu %1, %0, %4\n"
- " sc %1, %2\n"
- " beqz %1, 1b\n"
- " .set mips0\n"
- : "=&r" (result), "=&r" (tmp), "=m" (*dest)
- : "m" (*dest), "r" (add));
- return result;
-}
-
#else
#define WAPI_NO_ATOMIC_ASM
extern gint32 InterlockedCompareExchange(volatile gint32 *dest, gint32 exch, gint32 comp);
+extern gint64 InterlockedCompareExchange64(volatile gint64 *dest, gint64 exch, gint64 comp);
extern gpointer InterlockedCompareExchangePointer(volatile gpointer *dest, gpointer exch, gpointer comp);
+extern gint32 InterlockedAdd(volatile gint32 *dest, gint32 add);
+extern gint64 InterlockedAdd64(volatile gint64 *dest, gint64 add);
extern gint32 InterlockedIncrement(volatile gint32 *dest);
+extern gint64 InterlockedIncrement64(volatile gint64 *dest);
extern gint32 InterlockedDecrement(volatile gint32 *dest);
+extern gint64 InterlockedDecrement64(volatile gint64 *dest);
extern gint32 InterlockedExchange(volatile gint32 *dest, gint32 exch);
+extern gint64 InterlockedExchange64(volatile gint64 *dest, gint64 exch);
extern gpointer InterlockedExchangePointer(volatile gpointer *dest, gpointer exch);
extern gint32 InterlockedExchangeAdd(volatile gint32 *dest, gint32 add);
+extern gint64 InterlockedExchangeAdd64(volatile gint64 *dest, gint64 add);
+extern gint8 InterlockedRead8(volatile gint8 *src);
+extern gint16 InterlockedRead16(volatile gint16 *src);
+extern gint32 InterlockedRead(volatile gint32 *src);
+extern gint64 InterlockedRead64(volatile gint64 *src);
+extern gpointer InterlockedReadPointer(volatile gpointer *src);
+extern void InterlockedWrite8(volatile gint8 *dst, gint8 val);
+extern void InterlockedWrite16(volatile gint16 *dst, gint16 val);
+extern void InterlockedWrite(volatile gint32 *dst, gint32 val);
+extern void InterlockedWrite64(volatile gint64 *dst, gint64 val);
+extern void InterlockedWritePointer(volatile gpointer *dst, gpointer val);
#endif
-/* Not yet used */
-#ifdef USE_GCC_ATOMIC_OPS
-
-static inline gint32 InterlockedCompareExchange(volatile gint32 *dest,
- gint32 exch, gint32 comp)
-{
- return __sync_val_compare_and_swap (dest, comp, exch);
-}
-
-static inline gpointer InterlockedCompareExchangePointer(volatile gpointer *dest, gpointer exch, gpointer comp)
-{
- return __sync_val_compare_and_swap (dest, comp, exch);
-}
-
-static inline gint32 InterlockedIncrement(volatile gint32 *val)
-{
- return __sync_add_and_fetch (val, 1);
-}
-
-static inline gint32 InterlockedDecrement(volatile gint32 *val)
-{
- return __sync_add_and_fetch (val, -1);
-}
-
-static inline gint32 InterlockedExchange(volatile gint32 *val, gint32 new_val)
-{
- gint32 old_val;
- do {
- old_val = *val;
- } while (__sync_val_compare_and_swap (val, old_val, new_val) != old_val);
- return old_val;
-}
-
-static inline gpointer InterlockedExchangePointer(volatile gpointer *val,
- gpointer new_val)
-{
- gpointer old_val;
- do {
- old_val = *val;
- } while (__sync_val_compare_and_swap (val, old_val, new_val) != old_val);
- return old_val;
-}
-
-static inline gint32 InterlockedExchangeAdd(volatile gint32 *val, gint32 add)
-{
- return __sync_fetch_and_add (val, add);
-}
-#endif
-
#endif /* _WAPI_ATOMIC_H_ */
diff --git a/mono/utils/bsearch.c b/mono/utils/bsearch.c
new file mode 100644
index 00000000000..47be44419ae
--- /dev/null
+++ b/mono/utils/bsearch.c
@@ -0,0 +1,63 @@
+/*
+ * bsearch () implementation. Needed because some broken platforms
+ * have implementations that have unreasonable, non-standard
+ * requirements (e.g. "key must not be null"). Taken from NetBSD
+ * with some minor modifications.
+ *
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "mono/utils/bsearch.h"
+
+void *
+mono_binary_search (
+ const void *key,
+ const void *array,
+ size_t array_length,
+ size_t member_size,
+ BinarySearchComparer comparer)
+{
+ const char *base = array;
+ size_t lim;
+ int cmp;
+ const void *p;
+
+ for (lim = array_length; lim; lim >>= 1) {
+ p = base + (lim >> 1) * member_size;
+ cmp = (* comparer) (key, p);
+
+ if (!cmp)
+ return (void *) p;
+ else if (cmp > 0) {
+ base = (const char *) p + member_size;
+ lim--;
+ }
+ }
+
+ return NULL;
+}
diff --git a/mono/utils/bsearch.h b/mono/utils/bsearch.h
new file mode 100644
index 00000000000..82137ef4a4f
--- /dev/null
+++ b/mono/utils/bsearch.h
@@ -0,0 +1,18 @@
+#ifndef __MONO_BSEARCH_H__
+#define __MONO_BSEARCH_H__
+
+#include <stdlib.h>
+
+#include "mono/utils/mono-compiler.h"
+
+typedef int (* BinarySearchComparer) (const void *key, const void *member);
+
+void *
+mono_binary_search (
+ const void *key,
+ const void *array,
+ size_t array_length,
+ size_t member_size,
+ BinarySearchComparer comparer);
+
+#endif
diff --git a/mono/utils/dlmalloc.c b/mono/utils/dlmalloc.c
index 9ca6ed4a0fa..f83272f88e6 100644
--- a/mono/utils/dlmalloc.c
+++ b/mono/utils/dlmalloc.c
@@ -24,6 +24,7 @@
/* Use mmap for allocating memory */
#define HAVE_MORECORE 0
#define NO_MALLINFO 1
+#include <mono/utils/dlmalloc.h>
/*
* Quickstart
@@ -2511,6 +2512,7 @@ static int init_mparams(void) {
return 0;
}
+#if 0
/* support for mallopt */
static int change_mparam(int param_number, int value) {
size_t val = (size_t)value;
@@ -2533,6 +2535,7 @@ static int change_mparam(int param_number, int value) {
return 0;
}
}
+#endif
#if DEBUG
/* ------------------------- Debugging Support --------------------------- */
@@ -2844,6 +2847,7 @@ static struct mallinfo internal_mallinfo(mstate m) {
}
#endif /* !NO_MALLINFO */
+#if 0
static void internal_malloc_stats(mstate m) {
if (!PREACTION(m)) {
size_t maxfp = 0;
@@ -2875,6 +2879,7 @@ static void internal_malloc_stats(mstate m) {
POSTACTION(m);
}
}
+#endif
/* ----------------------- Operations on smallbins ----------------------- */
diff --git a/mono/utils/dlmalloc.h b/mono/utils/dlmalloc.h
index 6b27a98c102..074f947f291 100644
--- a/mono/utils/dlmalloc.h
+++ b/mono/utils/dlmalloc.h
@@ -30,6 +30,7 @@ extern "C" {
#endif
#include <stddef.h> /* for size_t */
+#include <mono/utils/mono-compiler.h>
#if !ONLY_MSPACES
@@ -51,6 +52,9 @@ extern "C" {
#define dlindependent_comalloc independent_comalloc
#endif /* USE_DL_PREFIX */
+#ifdef ENABLE_EXTENSION_MODULE
+#include "../../../mono-extensions/mono/utils/dlmalloc.h"
+#endif
/*
malloc(size_t n)
diff --git a/mono/utils/mach-support-arm.c b/mono/utils/mach-support-arm.c
index 0aaf76c220c..eb5fd603514 100644
--- a/mono/utils/mach-support-arm.c
+++ b/mono/utils/mach-support-arm.c
@@ -16,13 +16,24 @@
#include <glib.h>
#include <pthread.h>
#include "utils/mono-sigcontext.h"
+#include "utils/mono-compiler.h"
#include "mach-support.h"
/* Known offsets used for TLS storage*/
-/*Found on iOS 6 */
-#define TLS_VECTOR_OFFSET_0 0x48
-#define TLS_VECTOR_OFFSET_1 0xA8
+
+static const int known_tls_offsets[] = {
+ 0x48, /*Found on iOS 6 */
+ 0xA4,
+ 0xA8,
+};
+
+#define TLS_PROBE_COUNT (sizeof (known_tls_offsets) / sizeof (int))
+
+/* This is 2 slots less than the known low */
+#define TLS_PROBE_LOW_WATERMARK 0x40
+/* This is 24 slots above the know high, which is the same diff as the knowns high-low*/
+#define TLS_PROBE_HIGH_WATERMARK 0x108
static int tls_vector_offset;
@@ -113,6 +124,7 @@ mono_mach_arch_get_tls_value_from_thread (pthread_t thread, guint32 key)
void
mono_mach_init (pthread_key_t key)
{
+ int i;
void *old_value = pthread_getspecific (key);
void *canary = (void*)0xDEADBEEFu;
@@ -122,13 +134,20 @@ mono_mach_init (pthread_key_t key)
pthread_setspecific (key, canary);
/*First we probe for cats*/
- tls_vector_offset = TLS_VECTOR_OFFSET_0;
- if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
- goto ok;
-
- tls_vector_offset = TLS_VECTOR_OFFSET_1;
- if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
- goto ok;
+ for (i = 0; i < TLS_PROBE_COUNT; ++i) {
+ tls_vector_offset = known_tls_offsets [i];
+ if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
+ goto ok;
+ }
+
+ /*Fallback to scanning a large range of offsets*/
+ for (i = TLS_PROBE_LOW_WATERMARK; i <= TLS_PROBE_HIGH_WATERMARK; i += 4) {
+ tls_vector_offset = i;
+ if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary) {
+ g_warning ("Found new TLS offset at %d", i);
+ goto ok;
+ }
+ }
g_error ("could not discover the mach TLS offset");
ok:
diff --git a/mono/utils/mono-codeman.h b/mono/utils/mono-codeman.h
index 2c3c7e2809d..17d53b3b032 100644
--- a/mono/utils/mono-codeman.h
+++ b/mono/utils/mono-codeman.h
@@ -1,21 +1,23 @@
#ifndef __MONO_CODEMAN_H__
#define __MONO_CODEMAN_H__
+#include <mono/utils/mono-publib.h>
+
typedef struct _MonoCodeManager MonoCodeManager;
-MonoCodeManager* mono_code_manager_new (void);
-MonoCodeManager* mono_code_manager_new_dynamic (void);
-void mono_code_manager_destroy (MonoCodeManager *cman);
-void mono_code_manager_invalidate (MonoCodeManager *cman);
-void mono_code_manager_set_read_only (MonoCodeManager *cman);
+MONO_API MonoCodeManager* mono_code_manager_new (void);
+MONO_API MonoCodeManager* mono_code_manager_new_dynamic (void);
+MONO_API void mono_code_manager_destroy (MonoCodeManager *cman);
+MONO_API void mono_code_manager_invalidate (MonoCodeManager *cman);
+MONO_API void mono_code_manager_set_read_only (MonoCodeManager *cman);
-void* mono_code_manager_reserve_align (MonoCodeManager *cman, int size, int alignment);
+MONO_API void* mono_code_manager_reserve_align (MonoCodeManager *cman, int size, int alignment);
-void* mono_code_manager_reserve (MonoCodeManager *cman, int size);
-void mono_code_manager_commit (MonoCodeManager *cman, void *data, int size, int newsize);
-int mono_code_manager_size (MonoCodeManager *cman, int *used_size);
-void mono_code_manager_init (void);
-void mono_code_manager_cleanup (void);
+MONO_API void* mono_code_manager_reserve (MonoCodeManager *cman, int size);
+MONO_API void mono_code_manager_commit (MonoCodeManager *cman, void *data, int size, int newsize);
+MONO_API int mono_code_manager_size (MonoCodeManager *cman, int *used_size);
+MONO_API void mono_code_manager_init (void);
+MONO_API void mono_code_manager_cleanup (void);
/* find the extra block allocated to resolve branches close to code */
typedef int (*MonoCodeManagerFunc) (void *data, int csize, int size, void *user_data);
diff --git a/mono/utils/mono-compiler.h b/mono/utils/mono-compiler.h
index 52e8215d577..6772dacfd50 100644
--- a/mono/utils/mono-compiler.h
+++ b/mono/utils/mono-compiler.h
@@ -187,6 +187,7 @@
/* Deal with Microsoft C compiler differences */
#ifdef _MSC_VER
+#include <math.h>
#include <float.h>
#define isnan(x) _isnan(x)
#define trunc(x) (((x) < 0) ? ceil((x)) : floor((x)))
@@ -226,6 +227,8 @@
#ifdef __GNUC__
#define MONO_ALWAYS_INLINE __attribute__((always_inline))
+#elif defined(_MSC_VER)
+#define MONO_ALWAYS_INLINE __forceinline
#else
#define MONO_ALWAYS_INLINE
#endif
diff --git a/mono/utils/mono-context.h b/mono/utils/mono-context.h
index 43ceb8401f7..84409cf1e77 100644..100755
--- a/mono/utils/mono-context.h
+++ b/mono/utils/mono-context.h
@@ -105,6 +105,24 @@ typedef struct {
#define MONO_CONTEXT_GET_SP(ctx) ((gpointer)((ctx)->esp))
/*We set EAX to zero since we are clobering it anyway*/
+#ifdef _MSC_VER
+#define MONO_CONTEXT_GET_CURRENT(ctx) do { \
+ void *_ptr = &(ctx); \
+ __asm { \
+ __asm mov eax, _ptr \
+ __asm mov [eax+0x00], eax \
+ __asm mov [eax+0x04], ebx \
+ __asm mov [eax+0x08], ecx \
+ __asm mov [eax+0x0c], edx \
+ __asm mov [eax+0x10], ebp \
+ __asm mov [eax+0x14], esp \
+ __asm mov [eax+0x18], esi \
+ __asm mov [eax+0x1c], edi \
+ __asm call $+5 \
+ __asm pop dword ptr [eax+0x20] \
+ } \
+ } while (0)
+#else
#define MONO_CONTEXT_GET_CURRENT(ctx) \
__asm__ __volatile__( \
"movl $0x0, 0x00(%0)\n" \
@@ -120,10 +138,9 @@ typedef struct {
: \
: "a" (&(ctx)) \
: "memory")
+#endif
-#if !defined(HOST_WIN32)
#define MONO_ARCH_HAS_MONO_CONTEXT 1
-#endif
#elif (defined(__x86_64__) && !defined(MONO_CROSS_COMPILE)) || (defined(TARGET_AMD64)) /* defined(__i386__) */
diff --git a/mono/utils/mono-counters.h b/mono/utils/mono-counters.h
index 07aeb7902e3..f18212f90bf 100644
--- a/mono/utils/mono-counters.h
+++ b/mono/utils/mono-counters.h
@@ -25,21 +25,21 @@ enum {
MONO_COUNTER_LAST_SECTION
};
-void mono_counters_enable (int section_mask);
+MONO_API void mono_counters_enable (int section_mask);
/*
* register addr as the address of a counter of type type.
* It may be a function pointer if MONO_COUNTER_CALLBACK is specified:
* the function should return the value and take no arguments.
*/
-void mono_counters_register (const char* descr, int type, void *addr);
+MONO_API void mono_counters_register (const char* descr, int type, void *addr);
/*
* Create a readable dump of the counters for section_mask sections (ORed section values)
*/
-void mono_counters_dump (int section_mask, FILE *outfile);
+MONO_API void mono_counters_dump (int section_mask, FILE *outfile);
-void mono_counters_cleanup (void);
+MONO_API void mono_counters_cleanup (void);
typedef enum {
MONO_RESOURCE_JIT_CODE, /* bytes */
@@ -50,9 +50,9 @@ typedef enum {
typedef void (*MonoResourceCallback) (int resource_type, uintptr_t value, int is_soft);
-int mono_runtime_resource_limit (int resource_type, uintptr_t soft_limit, uintptr_t hard_limit);
-void mono_runtime_resource_set_callback (MonoResourceCallback callback);
-void mono_runtime_resource_check_limit (int resource_type, uintptr_t value);
+MONO_API int mono_runtime_resource_limit (int resource_type, uintptr_t soft_limit, uintptr_t hard_limit);
+MONO_API void mono_runtime_resource_set_callback (MonoResourceCallback callback);
+MONO_API void mono_runtime_resource_check_limit (int resource_type, uintptr_t value);
#endif /* __MONO_COUNTERS_H__ */
diff --git a/mono/utils/mono-digest.h b/mono/utils/mono-digest.h
index 4ef5d3e7e30..5cef8ee741b 100644
--- a/mono/utils/mono-digest.h
+++ b/mono/utils/mono-digest.h
@@ -28,6 +28,7 @@
#include <config.h>
#include <glib.h>
+#include <mono/utils/mono-publib.h>
G_BEGIN_DECLS
@@ -49,16 +50,16 @@ typedef struct {
#endif
-void mono_md5_get_digest (const guchar *buffer, gint buffer_size, guchar digest[16]);
+MONO_API void mono_md5_get_digest (const guchar *buffer, gint buffer_size, guchar digest[16]);
/* use this one when speed is needed */
/* for use in provider code only */
-void mono_md5_get_digest_from_file (const gchar *filename, guchar digest[16]);
+MONO_API void mono_md5_get_digest_from_file (const gchar *filename, guchar digest[16]);
/* raw routines */
-void mono_md5_init (MonoMD5Context *ctx);
-void mono_md5_update (MonoMD5Context *ctx, const guchar *buf, guint32 len);
-void mono_md5_final (MonoMD5Context *ctx, guchar digest[16]);
+MONO_API void mono_md5_init (MonoMD5Context *ctx);
+MONO_API void mono_md5_update (MonoMD5Context *ctx, const guchar *buf, guint32 len);
+MONO_API void mono_md5_final (MonoMD5Context *ctx, guchar digest[16]);
#if !HAVE_COMMONCRYPTO_COMMONDIGEST_H
@@ -70,14 +71,14 @@ typedef struct {
#endif
-void mono_sha1_get_digest (const guchar *buffer, gint buffer_size, guchar digest [20]);
-void mono_sha1_get_digest_from_file (const gchar *filename, guchar digest [20]);
+MONO_API void mono_sha1_get_digest (const guchar *buffer, gint buffer_size, guchar digest [20]);
+MONO_API void mono_sha1_get_digest_from_file (const gchar *filename, guchar digest [20]);
-void mono_sha1_init (MonoSHA1Context* context);
-void mono_sha1_update (MonoSHA1Context* context, const guchar* data, guint32 len);
-void mono_sha1_final (MonoSHA1Context* context, unsigned char digest[20]);
+MONO_API void mono_sha1_init (MonoSHA1Context* context);
+MONO_API void mono_sha1_update (MonoSHA1Context* context, const guchar* data, guint32 len);
+MONO_API void mono_sha1_final (MonoSHA1Context* context, unsigned char digest[20]);
-void mono_digest_get_public_token (guchar* token, const guchar *pubkey, guint32 len);
+MONO_API void mono_digest_get_public_token (guchar* token, const guchar *pubkey, guint32 len);
G_END_DECLS
#endif /* __MONO_DIGEST_H__ */
diff --git a/mono/utils/mono-dl-fallback.h b/mono/utils/mono-dl-fallback.h
index 06945aed1b1..97b13c6c189 100644
--- a/mono/utils/mono-dl-fallback.h
+++ b/mono/utils/mono-dl-fallback.h
@@ -23,10 +23,10 @@ typedef void* (*MonoDlFallbackLoad) (const char *name, int flags, char **err, vo
typedef void* (*MonoDlFallbackSymbol) (void *handle, const char *name, char **err, void *user_data);
typedef void* (*MonoDlFallbackClose) (void *handle, void *user_data);
-MonoDlFallbackHandler *mono_dl_fallback_register (MonoDlFallbackLoad load_func, MonoDlFallbackSymbol symbol_func,
+MONO_API MonoDlFallbackHandler *mono_dl_fallback_register (MonoDlFallbackLoad load_func, MonoDlFallbackSymbol symbol_func,
MonoDlFallbackClose close_func, void *user_data);
-void mono_dl_fallback_unregister (MonoDlFallbackHandler *handler);
+MONO_API void mono_dl_fallback_unregister (MonoDlFallbackHandler *handler);
MONO_END_DECLS
diff --git a/mono/utils/mono-embed.h b/mono/utils/mono-embed.h
index 2a8a697a1e7..78453e81ad0 100755
--- a/mono/utils/mono-embed.h
+++ b/mono/utils/mono-embed.h
@@ -13,7 +13,7 @@ typedef struct {
void *addr;
} MonoDlMapping;
-void mono_dl_register_library (const char *name, MonoDlMapping *mappings);
+MONO_API void mono_dl_register_library (const char *name, MonoDlMapping *mappings);
MONO_END_DECLS
diff --git a/mono/utils/mono-error.h b/mono/utils/mono-error.h
index b7d60291039..5652432adb1 100644
--- a/mono/utils/mono-error.h
+++ b/mono/utils/mono-error.h
@@ -43,22 +43,22 @@ typedef struct {
MONO_BEGIN_DECLS
-void
+MONO_API void
mono_error_init (MonoError *error);
-void
+MONO_API void
mono_error_init_flags (MonoError *error, unsigned short flags);
-void
+MONO_API void
mono_error_cleanup (MonoError *error);
-mono_bool
+MONO_API mono_bool
mono_error_ok (MonoError *error);
-unsigned short
+MONO_API unsigned short
mono_error_get_error_code (MonoError *error);
-const char*
+MONO_API const char*
mono_error_get_message (MonoError *error);
MONO_END_DECLS
diff --git a/mono/utils/mono-hwcap-arm.c b/mono/utils/mono-hwcap-arm.c
new file mode 100644
index 00000000000..2be0b023c90
--- /dev/null
+++ b/mono/utils/mono-hwcap-arm.c
@@ -0,0 +1,159 @@
+/*
+ * mono-hwcap-arm.c: ARM hardware feature detection
+ *
+ * Authors:
+ * Alex Rønne Petersen (alexrp@xamarin.com)
+ * Elijah Taylor (elijahtaylor@google.com)
+ * Miguel de Icaza (miguel@xamarin.com)
+ * Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com)
+ * Paolo Molaro (lupus@xamarin.com)
+ * Rodrigo Kumpera (kumpera@gmail.com)
+ * Sebastien Pouliot (sebastien@xamarin.com)
+ * Zoltan Varga (vargaz@xamarin.com)
+ *
+ * Copyright 2003 Ximian, Inc.
+ * Copyright 2003-2011 Novell, Inc
+ * Copyright 2006 Broadcom
+ * Copyright 2007-2008 Andreas Faerber
+ * Copyright 2011-2013 Xamarin Inc
+ */
+
+#include "mono/utils/mono-hwcap-arm.h"
+
+#if defined(HAVE_SYS_AUXV_H) && !defined(PLATFORM_ANDROID)
+#include <sys/auxv.h>
+#elif defined(__APPLE__)
+#include <mach/machine.h>
+#include <sys/sysctl.h>
+#include <sys/types.h>
+#else
+#include <stdio.h>
+#endif
+
+gboolean mono_hwcap_arm_is_v5 = FALSE;
+gboolean mono_hwcap_arm_is_v6 = FALSE;
+gboolean mono_hwcap_arm_is_v7 = FALSE;
+gboolean mono_hwcap_arm_is_v7s = FALSE;
+gboolean mono_hwcap_arm_has_vfp = FALSE;
+gboolean mono_hwcap_arm_has_thumb = FALSE;
+gboolean mono_hwcap_arm_has_thumb2 = FALSE;
+
+#if defined(MONO_CROSS_COMPILE)
+void
+mono_hwcap_arch_init (void)
+{
+}
+#else
+void
+mono_hwcap_arch_init (void)
+{
+#if defined(HAVE_SYS_AUXV_H) && !defined(PLATFORM_ANDROID)
+ unsigned long hwcap;
+ unsigned long platform;
+
+ if ((hwcap = getauxval(AT_HWCAP))) {
+ /* HWCAP_ARM_THUMB */
+ if (hwcap & 0x00000004)
+ mono_hwcap_arm_has_thumb = TRUE;
+
+ /* HWCAP_ARM_VFP */
+ if (hwcap & 0x00000040)
+ mono_hwcap_arm_has_vfp = TRUE;
+
+ /* TODO: Find a way to detect Thumb 2. */
+ }
+
+ if ((platform = getauxval(AT_PLATFORM))) {
+ const char *str = (const char *) platform;
+
+ if (str [1] >= '5')
+ mono_hwcap_arm_is_v5 = TRUE;
+
+ if (str [1] >= '6')
+ mono_hwcap_arm_is_v6 = TRUE;
+
+ if (str [1] >= '7')
+ mono_hwcap_arm_is_v7 = TRUE;
+
+ /* TODO: Find a way to detect v7s. */
+ }
+#elif defined(__APPLE__)
+ cpu_subtype_t sub_type;
+ size_t length = sizeof (sub_type);
+
+ sysctlbyname ("hw.cpusubtype", &sub_type, &length, NULL, 0);
+
+ if (sub_type == CPU_SUBTYPE_ARM_V5TEJ || sub_type == CPU_SUBTYPE_ARM_XSCALE) {
+ mono_hwcap_arm_is_v5 = TRUE;
+ } else if (sub_type == CPU_SUBTYPE_ARM_V6) {
+ mono_hwcap_arm_is_v5 = TRUE;
+ mono_hwcap_arm_is_v6 = TRUE;
+ } else if (sub_type == CPU_SUBTYPE_ARM_V7 || sub_type == CPU_SUBTYPE_ARM_V7F || sub_type == CPU_SUBTYPE_ARM_V7K) {
+ mono_hwcap_arm_is_v5 = TRUE;
+ mono_hwcap_arm_is_v6 = TRUE;
+ mono_hwcap_arm_is_v7 = TRUE;
+ }
+
+ /* TODO: Find a way to detect features like Thumb and VFP. */
+#else
+ /* We can't use the auxiliary vector on Android due to
+ * permissions, so fall back to /proc/cpuinfo. We also
+ * hit this path if the target doesn't have sys/auxv.h.
+ */
+
+ char buf [512];
+ char *line;
+
+ FILE *file = fopen ("/proc/cpuinfo", "r");
+
+ if (file) {
+ while ((line = fgets (buf, 512, file))) {
+ if (!strncmp (line, "Processor", 9)) {
+ char *ver = strstr (line, "(v");
+
+ if (ver) {
+ if (ver [2] >= '5')
+ mono_hwcap_arm_is_v5 = TRUE;
+
+ if (ver [2] >= '6')
+ mono_hwcap_arm_is_v6 = TRUE;
+
+ if (ver [2] >= '7')
+ mono_hwcap_arm_is_v7 = TRUE;
+
+ /* TODO: Find a way to detect v7s. */
+ }
+
+ continue;
+ }
+
+ if (!strncmp (line, "Features", 8)) {
+ if (strstr (line, "thumb"))
+ mono_hwcap_arm_has_thumb = TRUE;
+
+ /* TODO: Find a way to detect Thumb 2. */
+
+ if (strstr (line, "vfp"))
+ mono_hwcap_arm_has_vfp = TRUE;
+
+ continue;
+ }
+ }
+
+ fclose (file);
+ }
+#endif
+}
+#endif
+
+void
+mono_hwcap_print(FILE *f)
+{
+ g_fprintf (f, "mono_hwcap_arm_is_v5 = %i\n", mono_hwcap_arm_is_v5);
+ g_fprintf (f, "mono_hwcap_arm_is_v6 = %i\n", mono_hwcap_arm_is_v6);
+ g_fprintf (f, "mono_hwcap_arm_is_v7 = %i\n", mono_hwcap_arm_is_v7);
+ g_fprintf (f, "mono_hwcap_arm_is_v7s = %i\n", mono_hwcap_arm_is_v7s);
+ g_fprintf (f, "mono_hwcap_arm_has_vfp = %i\n", mono_hwcap_arm_has_vfp);
+ g_fprintf (f, "mono_hwcap_arm_has_thumb = %i\n", mono_hwcap_arm_has_thumb);
+ g_fprintf (f, "mono_hwcap_arm_has_thumb2 = %i\n", mono_hwcap_arm_has_thumb2);
+}
diff --git a/mono/utils/mono-hwcap-arm.h b/mono/utils/mono-hwcap-arm.h
new file mode 100644
index 00000000000..6bc9c3b907a
--- /dev/null
+++ b/mono/utils/mono-hwcap-arm.h
@@ -0,0 +1,14 @@
+#ifndef __MONO_UTILS_HWCAP_ARM_H__
+#define __MONO_UTILS_HWCAP_ARM_H__
+
+#include "mono/utils/mono-hwcap.h"
+
+extern gboolean mono_hwcap_arm_is_v5;
+extern gboolean mono_hwcap_arm_is_v6;
+extern gboolean mono_hwcap_arm_is_v7;
+extern gboolean mono_hwcap_arm_is_v7s;
+extern gboolean mono_hwcap_arm_has_vfp;
+extern gboolean mono_hwcap_arm_has_thumb;
+extern gboolean mono_hwcap_arm_has_thumb2;
+
+#endif /* __MONO_UTILS_HWCAP_ARM_H__ */
diff --git a/mono/utils/mono-hwcap-ia64.c b/mono/utils/mono-hwcap-ia64.c
new file mode 100644
index 00000000000..30590d723e3
--- /dev/null
+++ b/mono/utils/mono-hwcap-ia64.c
@@ -0,0 +1,39 @@
+/*
+ * mono-hwcap-ia64.c: Itanium hardware feature detection
+ *
+ * Authors:
+ * Alex Rønne Petersen (alexrp@xamarin.com)
+ * Elijah Taylor (elijahtaylor@google.com)
+ * Miguel de Icaza (miguel@xamarin.com)
+ * Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com)
+ * Paolo Molaro (lupus@xamarin.com)
+ * Rodrigo Kumpera (kumpera@gmail.com)
+ * Sebastien Pouliot (sebastien@xamarin.com)
+ * Zoltan Varga (vargaz@xamarin.com)
+ *
+ * Copyright 2003 Ximian, Inc.
+ * Copyright 2003-2011 Novell, Inc
+ * Copyright 2006 Broadcom
+ * Copyright 2007-2008 Andreas Faerber
+ * Copyright 2011-2013 Xamarin Inc
+ */
+
+#include "mono/utils/mono-hwcap-ia64.h"
+
+#if defined(MONO_CROSS_COMPILE)
+void
+mono_hwcap_arch_init (void)
+{
+}
+#else
+void
+mono_hwcap_arch_init (void)
+{
+ /* Nothing needed here yet. */
+}
+#endif
+
+void
+mono_hwcap_print (FILE *f)
+{
+}
diff --git a/mono/utils/mono-hwcap-ia64.h b/mono/utils/mono-hwcap-ia64.h
new file mode 100644
index 00000000000..15b64a83c65
--- /dev/null
+++ b/mono/utils/mono-hwcap-ia64.h
@@ -0,0 +1,8 @@
+#ifndef __MONO_UTILS_HWCAP_IA64_H__
+#define __MONO_UTILS_HWCAP_IA64_H__
+
+#include "mono/utils/mono-hwcap.h"
+
+/* Nothing needed here yet. */
+
+#endif /* __MONO_UTILS_HWCAP_IA64_H__ */
diff --git a/mono/utils/mono-hwcap-mips.c b/mono/utils/mono-hwcap-mips.c
new file mode 100644
index 00000000000..c99b64850e2
--- /dev/null
+++ b/mono/utils/mono-hwcap-mips.c
@@ -0,0 +1,39 @@
+/*
+ * mono-hwcap-mips.c: MIPS hardware feature detection
+ *
+ * Authors:
+ * Alex Rønne Petersen (alexrp@xamarin.com)
+ * Elijah Taylor (elijahtaylor@google.com)
+ * Miguel de Icaza (miguel@xamarin.com)
+ * Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com)
+ * Paolo Molaro (lupus@xamarin.com)
+ * Rodrigo Kumpera (kumpera@gmail.com)
+ * Sebastien Pouliot (sebastien@xamarin.com)
+ * Zoltan Varga (vargaz@xamarin.com)
+ *
+ * Copyright 2003 Ximian, Inc.
+ * Copyright 2003-2011 Novell, Inc
+ * Copyright 2006 Broadcom
+ * Copyright 2007-2008 Andreas Faerber
+ * Copyright 2011-2013 Xamarin Inc
+ */
+
+#include "mono/utils/mono-hwcap-mips.h"
+
+#if defined(MONO_CROSS_COMPILE)
+void
+mono_hwcap_arch_init (void)
+{
+}
+#else
+void
+mono_hwcap_arch_init (void)
+{
+ /* Nothing needed here yet. */
+}
+#endif
+
+void
+mono_hwcap_print (FILE *f)
+{
+}
diff --git a/mono/utils/mono-hwcap-mips.h b/mono/utils/mono-hwcap-mips.h
new file mode 100644
index 00000000000..dd0622ab1ae
--- /dev/null
+++ b/mono/utils/mono-hwcap-mips.h
@@ -0,0 +1,8 @@
+#ifndef __MONO_UTILS_HWCAP_MIPS_H__
+#define __MONO_UTILS_HWCAP_MIPS_H__
+
+#include "mono/utils/mono-hwcap.h"
+
+/* Nothing needed here yet. */
+
+#endif /* __MONO_UTILS_HWCAP_MIPS_H__ */
diff --git a/mono/utils/mono-hwcap-ppc.c b/mono/utils/mono-hwcap-ppc.c
new file mode 100644
index 00000000000..1293d808cdf
--- /dev/null
+++ b/mono/utils/mono-hwcap-ppc.c
@@ -0,0 +1,84 @@
+/*
+ * mono-hwcap-ppc.c: PowerPC hardware feature detection
+ *
+ * Authors:
+ * Alex Rønne Petersen (alexrp@xamarin.com)
+ * Elijah Taylor (elijahtaylor@google.com)
+ * Miguel de Icaza (miguel@xamarin.com)
+ * Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com)
+ * Paolo Molaro (lupus@xamarin.com)
+ * Rodrigo Kumpera (kumpera@gmail.com)
+ * Sebastien Pouliot (sebastien@xamarin.com)
+ * Zoltan Varga (vargaz@xamarin.com)
+ *
+ * Copyright 2003 Ximian, Inc.
+ * Copyright 2003-2011 Novell, Inc
+ * Copyright 2006 Broadcom
+ * Copyright 2007-2008 Andreas Faerber
+ * Copyright 2011-2013 Xamarin Inc
+ */
+
+#include "mono/utils/mono-hwcap-ppc.h"
+
+#if defined(__linux__) && defined(HAVE_SYS_AUXV_H)
+#include <string.h>
+#include <sys/auxv.h>
+#endif
+
+gboolean mono_hwcap_ppc_has_icache_snoop = FALSE;
+gboolean mono_hwcap_ppc_is_isa_2x = FALSE;
+gboolean mono_hwcap_ppc_is_isa_64 = FALSE;
+gboolean mono_hwcap_ppc_has_move_fpr_gpr = FALSE;
+gboolean mono_hwcap_ppc_has_multiple_ls_units = FALSE;
+
+#if defined(MONO_CROSS_COMPILE)
+void
+mono_hwcap_arch_init (void)
+{
+}
+#else
+void
+mono_hwcap_arch_init (void)
+{
+#if defined(__linux__) && defined(HAVE_SYS_AUXV_H)
+ unsigned long hwcap;
+ unsigned long platform;
+
+ if ((hwcap = getauxval(AT_HWCAP))) {
+ /* PPC_FEATURE_ICACHE_SNOOP */
+ if (hwcap & 0x00002000)
+ mono_hwcap_ppc_has_icache_snoop = TRUE;
+
+ /* PPC_FEATURE_POWER4, PPC_FEATURE_POWER5, PPC_FEATURE_POWER5_PLUS,
+ PPC_FEATURE_CELL_BE, PPC_FEATURE_PA6T, PPC_FEATURE_ARCH_2_05 */
+ if (hwcap & (0x00080000 | 0x00040000 | 0x00020000 | 0x00010000 | 0x00000800 | 0x00001000))
+ mono_hwcap_ppc_is_isa_2x = TRUE;
+
+ /* PPC_FEATURE_64 */
+ if (hwcap & 0x40000000)
+ mono_hwcap_ppc_is_isa_64 = TRUE;
+
+ /* PPC_FEATURE_POWER6_EXT */
+ if (hwcap & 0x00000200)
+ mono_hwcap_ppc_has_move_fpr_gpr = TRUE;
+ }
+
+ if ((platform = getauxval(AT_PLATFORM))) {
+ const char *str = (const char *) platform;
+
+ if (!strcmp (str, "ppc970") || (!strncmp (str, "power", 5) && str [5] >= '4' && str [5] <= '7'))
+ mono_hwcap_ppc_has_multiple_ls_units = TRUE;
+ }
+#endif
+}
+#endif
+
+void
+mono_hwcap_print (FILE* f)
+{
+ g_fprintf (f, "mono_hwcap_ppc_has_icache_snoop = %i\n", mono_hwcap_ppc_has_icache_snoop);
+ g_fprintf (f, "mono_hwcap_ppc_is_isa_2x = %i\n", mono_hwcap_ppc_is_isa_2x);
+ g_fprintf (f, "mono_hwcap_ppc_is_isa_64 = %i\n", mono_hwcap_ppc_is_isa_64);
+ g_fprintf (f, "mono_hwcap_ppc_has_move_fpr_gpr = %i\n", mono_hwcap_ppc_has_move_fpr_gpr);
+ g_fprintf (f, "mono_hwcap_ppc_has_multiple_ls_units = %i\n", mono_hwcap_ppc_has_multiple_ls_units);
+}
diff --git a/mono/utils/mono-hwcap-ppc.h b/mono/utils/mono-hwcap-ppc.h
new file mode 100644
index 00000000000..0ae2578e62c
--- /dev/null
+++ b/mono/utils/mono-hwcap-ppc.h
@@ -0,0 +1,12 @@
+#ifndef __MONO_UTILS_HWCAP_PPC_H__
+#define __MONO_UTILS_HWCAP_PPC_H__
+
+#include "mono/utils/mono-hwcap.h"
+
+extern gboolean mono_hwcap_ppc_has_icache_snoop;
+extern gboolean mono_hwcap_ppc_is_isa_2x;
+extern gboolean mono_hwcap_ppc_is_isa_64;
+extern gboolean mono_hwcap_ppc_has_move_fpr_gpr;
+extern gboolean mono_hwcap_ppc_has_multiple_ls_units;
+
+#endif /* __MONO_UTILS_HWCAP_PPC_H__ */
diff --git a/mono/utils/mono-hwcap-s390x.c b/mono/utils/mono-hwcap-s390x.c
new file mode 100644
index 00000000000..889df8aebf6
--- /dev/null
+++ b/mono/utils/mono-hwcap-s390x.c
@@ -0,0 +1,73 @@
+/*
+ * mono-hwcap-s390x.c: S/390x hardware feature detection
+ *
+ * Authors:
+ * Alex Rønne Petersen (alexrp@xamarin.com)
+ * Elijah Taylor (elijahtaylor@google.com)
+ * Miguel de Icaza (miguel@xamarin.com)
+ * Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com)
+ * Paolo Molaro (lupus@xamarin.com)
+ * Rodrigo Kumpera (kumpera@gmail.com)
+ * Sebastien Pouliot (sebastien@xamarin.com)
+ * Zoltan Varga (vargaz@xamarin.com)
+ *
+ * Copyright 2003 Ximian, Inc.
+ * Copyright 2003-2011 Novell, Inc
+ * Copyright 2006 Broadcom
+ * Copyright 2007-2008 Andreas Faerber
+ * Copyright 2011-2013 Xamarin Inc
+ */
+
+#include "mono/utils/mono-hwcap-s390x.h"
+
+#include <signal.h>
+
+gboolean mono_hwcap_s390x_has_ld = FALSE;
+
+#if defined(MONO_CROSS_COMPILE)
+void
+mono_hwcap_arch_init (void)
+{
+}
+#else
+static void
+catch_sigill (int sig_no, siginfo_t *info, gpointer act)
+{
+ mono_hwcap_s390x_has_ld = FALSE;
+}
+
+void
+mono_hwcap_arch_init (void)
+{
+ mono_hwcap_s390x_has_ld = TRUE;
+
+ struct sigaction sa, *old_sa;
+
+ /* Determine if we have a long displacement facility
+ * by executing the STY instruction. If it fails, we
+ * catch the SIGILL and assume the answer is no.
+ */
+ sa.sa_sigaction = catch_sigill;
+ sigemptyset (&sa.sa_mask);
+ sa.sa_flags = SA_SIGINFO;
+
+ sigaction (SIGILL, &sa, old_sa);
+
+ __asm__ __volatile__ (
+ "LGHI\t0,1\n\t"
+ "LA\t1,%0\n\t"
+ ".byte\t0xe3,0x00,0x10,0x00,0x00,0x50\n\t"
+ : "=m" (mono_hwcap_s390x_has_ld)
+ :
+ : "0", "1"
+ );
+
+ sigaction (SIGILL, old_sa, NULL);
+}
+#endif
+
+void
+mono_hwcap_print (FILE *f)
+{
+ g_fprintf (f, "mono_hwcap_s390x_has_ld = %i\n", mono_hwcap_s390x_has_ld);
+}
diff --git a/mono/utils/mono-hwcap-s390x.h b/mono/utils/mono-hwcap-s390x.h
new file mode 100644
index 00000000000..24c76a28545
--- /dev/null
+++ b/mono/utils/mono-hwcap-s390x.h
@@ -0,0 +1,8 @@
+#ifndef __MONO_UTILS_HWCAP_S390X_H__
+#define __MONO_UTILS_HWCAP_S390X_H__
+
+#include "mono/utils/mono-hwcap.h"
+
+extern gboolean mono_hwcap_s390x_has_ld;
+
+#endif /* __MONO_UTILS_HWCAP_S390X_H__ */
diff --git a/mono/utils/mono-hwcap-sparc.c b/mono/utils/mono-hwcap-sparc.c
new file mode 100644
index 00000000000..f039ec28e4e
--- /dev/null
+++ b/mono/utils/mono-hwcap-sparc.c
@@ -0,0 +1,65 @@
+/*
+ * mono-hwcap-sparc.c: SPARC hardware feature detection
+ *
+ * Authors:
+ * Alex Rønne Petersen (alexrp@xamarin.com)
+ * Elijah Taylor (elijahtaylor@google.com)
+ * Miguel de Icaza (miguel@xamarin.com)
+ * Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com)
+ * Paolo Molaro (lupus@xamarin.com)
+ * Rodrigo Kumpera (kumpera@gmail.com)
+ * Sebastien Pouliot (sebastien@xamarin.com)
+ * Zoltan Varga (vargaz@xamarin.com)
+ *
+ * Copyright 2003 Ximian, Inc.
+ * Copyright 2003-2011 Novell, Inc
+ * Copyright 2006 Broadcom
+ * Copyright 2007-2008 Andreas Faerber
+ * Copyright 2011-2013 Xamarin Inc
+ */
+
+#include "mono/utils/mono-hwcap-sparc.h"
+
+#include <string.h>
+
+#if !defined(__linux__)
+#include <sys/systeminfo.h>
+#else
+#include <unistd.h>
+#endif
+
+gboolean mono_hwcap_sparc_is_v9 = FALSE;
+
+#if defined(MONO_CROSS_COMPILE)
+void
+mono_hwcap_arch_init (void)
+{
+}
+#else
+void
+mono_hwcap_arch_init (void)
+{
+ char buf [1024];
+
+#if !defined(__linux__)
+ if (!sysinfo (SI_ISALIST, buf, 1024))
+ g_assert_not_reached ();
+#else
+ /* If the page size is 8192, we're on a 64-bit SPARC, which
+ * in turn means a v9 or better.
+ */
+ if (getpagesize () == 8192)
+ strcpy (buf, "sparcv9");
+ else
+ strcpy (buf, "sparcv8");
+#endif
+
+ mono_hwcap_sparc_is_v9 = strstr (buf, "sparcv9");
+}
+#endif
+
+void
+mono_hwcap_print (FILE *f)
+{
+ g_fprintf (f, "mono_hwcap_sparc_is_v9 = %i\n", mono_hwcap_sparc_is_v9);
+}
diff --git a/mono/utils/mono-hwcap-sparc.h b/mono/utils/mono-hwcap-sparc.h
new file mode 100644
index 00000000000..98bcf8e064e
--- /dev/null
+++ b/mono/utils/mono-hwcap-sparc.h
@@ -0,0 +1,8 @@
+#ifndef __MONO_UTILS_HWCAP_SPARC_H__
+#define __MONO_UTILS_HWCAP_SPARC_H__
+
+#include "mono/utils/mono-hwcap.h"
+
+extern gboolean mono_hwcap_sparc_is_v9;
+
+#endif /* __MONO_UTILS_HWCAP_SPARC_H__ */
diff --git a/mono/utils/mono-hwcap-x86.c b/mono/utils/mono-hwcap-x86.c
new file mode 100644
index 00000000000..3a8df6b05e9
--- /dev/null
+++ b/mono/utils/mono-hwcap-x86.c
@@ -0,0 +1,185 @@
+/*
+ * mono-hwcap-x86.c: x86 hardware feature detection
+ *
+ * Authors:
+ * Alex Rønne Petersen (alexrp@xamarin.com)
+ * Elijah Taylor (elijahtaylor@google.com)
+ * Miguel de Icaza (miguel@xamarin.com)
+ * Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com)
+ * Paolo Molaro (lupus@xamarin.com)
+ * Rodrigo Kumpera (kumpera@gmail.com)
+ * Sebastien Pouliot (sebastien@xamarin.com)
+ * Zoltan Varga (vargaz@xamarin.com)
+ *
+ * Copyright 2003 Ximian, Inc.
+ * Copyright 2003-2011 Novell, Inc
+ * Copyright 2006 Broadcom
+ * Copyright 2007-2008 Andreas Faerber
+ * Copyright 2011-2013 Xamarin Inc
+ */
+
+#include "mono/utils/mono-hwcap-x86.h"
+
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+
+#if defined(_MSC_VER)
+#include <intrin.h>
+#endif
+
+gboolean mono_hwcap_x86_is_xen = FALSE;
+gboolean mono_hwcap_x86_has_cmov = FALSE;
+gboolean mono_hwcap_x86_has_fcmov = FALSE;
+gboolean mono_hwcap_x86_has_sse1 = FALSE;
+gboolean mono_hwcap_x86_has_sse2 = FALSE;
+gboolean mono_hwcap_x86_has_sse3 = FALSE;
+gboolean mono_hwcap_x86_has_ssse3 = FALSE;
+gboolean mono_hwcap_x86_has_sse41 = FALSE;
+gboolean mono_hwcap_x86_has_sse42 = FALSE;
+gboolean mono_hwcap_x86_has_sse4a = FALSE;
+
+#if defined(MONO_CROSS_COMPILE)
+void
+mono_hwcap_arch_init (void)
+{
+}
+#else
+static gboolean
+cpuid (int id, int *p_eax, int *p_ebx, int *p_ecx, int *p_edx)
+{
+#if defined(_MSC_VER)
+ int info [4];
+#endif
+
+ /* First, make sure we can use cpuid if we're on 32-bit. */
+#if defined(TARGET_X86)
+ gboolean have_cpuid = FALSE;
+
+#if defined(_MSC_VER)
+ __asm {
+ pushfd
+ pop eax
+ mov edx, eax
+ xor eax, 0x200000
+ push eax
+ popfd
+ pushfd
+ pop eax
+ xor eax, edx
+ and eax, 0x200000
+ mov have_cpuid, eax
+ }
+#else
+ __asm__ __volatile__ (
+ "pushfl\n\t"
+ "popl\t%%eax\n\t"
+ "movl\t%%eax, %%edx\n\t"
+ "xorl\t$0x200000, %%eax\n\t"
+ "pushl\t%%eax\n\t"
+ "popfl\n\t"
+ "pushfl\n\t"
+ "popl\t%%eax\n\t"
+ "xorl\t%%edx, %%eax\n\t"
+ "andl\t$0x200000, %%eax\n\t"
+ "movl\t%%eax, %0\n\t"
+ : "=r" (have_cpuid)
+ :
+ : "%eax", "%edx"
+ );
+#endif
+
+ if (!have_cpuid)
+ return FALSE;
+#endif
+
+ /* Now issue the actual cpuid instruction. We can use
+ MSVC's __cpuid on both 32-bit and 64-bit. */
+#if defined(_MSC_VER)
+ __cpuid (info, id);
+ *p_eax = info [0];
+ *p_ebx = info [1];
+ *p_ecx = info [2];
+ *p_edx = info [3];
+#elif defined(TARGET_X86)
+ /* This complicated stuff is necessary because EBX
+ may be used by the compiler in PIC mode. */
+ __asm__ __volatile__ (
+ "xchgl\t%%ebx, %k1\n\t"
+ "cpuid\n\t"
+ "xchgl\t%%ebx, %k1\n\t"
+ : "=a" (*p_eax), "=&r" (*p_ebx), "=c" (*p_ecx), "=d" (*p_edx)
+ : "0" (id)
+ );
+#else
+ __asm__ __volatile__ (
+ "cpuid\n\t"
+ : "=a" (*p_eax), "=b" (*p_ebx), "=c" (*p_ecx), "=d" (*p_edx)
+ : "a" (id)
+ );
+#endif
+
+ return TRUE;
+}
+
+void
+mono_hwcap_arch_init (void)
+{
+ int eax, ebx, ecx, edx;
+
+ if (cpuid (1, &eax, &ebx, &ecx, &edx)) {
+ if (edx & (1 << 15)) {
+ mono_hwcap_x86_has_cmov = TRUE;
+
+ if (edx & 1)
+ mono_hwcap_x86_has_fcmov = TRUE;
+ }
+
+ if (edx & (1 << 25))
+ mono_hwcap_x86_has_sse1 = TRUE;
+
+ if (edx & (1 << 26))
+ mono_hwcap_x86_has_sse2 = TRUE;
+
+ if (ecx & (1 << 0))
+ mono_hwcap_x86_has_sse3 = TRUE;
+
+ if (ecx & (1 << 9))
+ mono_hwcap_x86_has_ssse3 = TRUE;
+
+ if (ecx & (1 << 19))
+ mono_hwcap_x86_has_sse41 = TRUE;
+
+ if (ecx & (1 << 20))
+ mono_hwcap_x86_has_sse42 = TRUE;
+ }
+
+ if (cpuid (0x80000000, &eax, &ebx, &ecx, &edx)) {
+ if ((unsigned int) eax >= 0x80000001 && ebx == 0x68747541 && ecx == 0x444D4163 && edx == 0x69746E65) {
+ if (cpuid (0x80000001, &eax, &ebx, &ecx, &edx)) {
+ if (ecx & (1 << 6))
+ mono_hwcap_x86_has_sse4a = TRUE;
+ }
+ }
+ }
+
+#if defined(HAVE_UNISTD_H)
+ mono_hwcap_x86_is_xen = !access ("/proc/xen", F_OK);
+#endif
+}
+#endif
+
+void
+mono_hwcap_print (FILE *f)
+{
+ g_fprintf (f, "mono_hwcap_x86_is_xen = %i\n", mono_hwcap_x86_is_xen);
+ g_fprintf (f, "mono_hwcap_x86_has_cmov = %i\n", mono_hwcap_x86_has_cmov);
+ g_fprintf (f, "mono_hwcap_x86_has_fcmov = %i\n", mono_hwcap_x86_has_fcmov);
+ g_fprintf (f, "mono_hwcap_x86_has_sse1 = %i\n", mono_hwcap_x86_has_sse1);
+ g_fprintf (f, "mono_hwcap_x86_has_sse2 = %i\n", mono_hwcap_x86_has_sse2);
+ g_fprintf (f, "mono_hwcap_x86_has_sse3 = %i\n", mono_hwcap_x86_has_sse3);
+ g_fprintf (f, "mono_hwcap_x86_has_ssse3 = %i\n", mono_hwcap_x86_has_ssse3);
+ g_fprintf (f, "mono_hwcap_x86_has_sse41 = %i\n", mono_hwcap_x86_has_sse41);
+ g_fprintf (f, "mono_hwcap_x86_has_sse42 = %i\n", mono_hwcap_x86_has_sse42);
+ g_fprintf (f, "mono_hwcap_x86_has_sse4a = %i\n", mono_hwcap_x86_has_sse4a);
+}
diff --git a/mono/utils/mono-hwcap-x86.h b/mono/utils/mono-hwcap-x86.h
new file mode 100644
index 00000000000..5e1f4f7b47d
--- /dev/null
+++ b/mono/utils/mono-hwcap-x86.h
@@ -0,0 +1,17 @@
+#ifndef __MONO_UTILS_HWCAP_X86_H__
+#define __MONO_UTILS_HWCAP_X86_H__
+
+#include "mono/utils/mono-hwcap.h"
+
+extern gboolean mono_hwcap_x86_is_xen;
+extern gboolean mono_hwcap_x86_has_cmov;
+extern gboolean mono_hwcap_x86_has_fcmov;
+extern gboolean mono_hwcap_x86_has_sse1;
+extern gboolean mono_hwcap_x86_has_sse2;
+extern gboolean mono_hwcap_x86_has_sse3;
+extern gboolean mono_hwcap_x86_has_ssse3;
+extern gboolean mono_hwcap_x86_has_sse41;
+extern gboolean mono_hwcap_x86_has_sse42;
+extern gboolean mono_hwcap_x86_has_sse4a;
+
+#endif /* __MONO_UTILS_HWCAP_X86_H__ */
diff --git a/mono/utils/mono-hwcap.c b/mono/utils/mono-hwcap.c
new file mode 100644
index 00000000000..6ba7a5ec0e7
--- /dev/null
+++ b/mono/utils/mono-hwcap.c
@@ -0,0 +1,39 @@
+/*
+ * mono-hwcap.c: Hardware feature detection
+ *
+ * Authors:
+ * Alex Rønne Petersen (alexrp@xamarin.com)
+ * Elijah Taylor (elijahtaylor@google.com)
+ * Miguel de Icaza (miguel@xamarin.com)
+ * Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com)
+ * Paolo Molaro (lupus@xamarin.com)
+ * Rodrigo Kumpera (kumpera@gmail.com)
+ * Sebastien Pouliot (sebastien@xamarin.com)
+ * Zoltan Varga (vargaz@xamarin.com)
+ *
+ * Copyright 2003 Ximian, Inc.
+ * Copyright 2003-2011 Novell, Inc
+ * Copyright 2006 Broadcom
+ * Copyright 2007-2008 Andreas Faerber
+ * Copyright 2011-2013 Xamarin Inc
+ */
+
+#include <stdlib.h>
+
+#include "mono/utils/mono-hwcap.h"
+
+static gboolean hwcap_inited = FALSE;
+
+void
+mono_hwcap_init (void)
+{
+ const char *verbose = g_getenv ("MONO_VERBOSE_HWCAP");
+
+ if (hwcap_inited)
+ return;
+
+ mono_hwcap_arch_init ();
+
+ if (verbose)
+ mono_hwcap_print (stdout);
+}
diff --git a/mono/utils/mono-hwcap.h b/mono/utils/mono-hwcap.h
new file mode 100644
index 00000000000..159701b4498
--- /dev/null
+++ b/mono/utils/mono-hwcap.h
@@ -0,0 +1,50 @@
+#ifndef __MONO_UTILS_HWCAP_H__
+#define __MONO_UTILS_HWCAP_H__
+
+#include <stdio.h>
+#include <glib.h>
+
+#include "config.h"
+
+#include "mono/utils/mono-compiler.h"
+
+/* Call this function to perform hardware feature detection. Until
+ * this function has been called, all feature variables will be
+ * FALSE as a default.
+ *
+ * While this function can be called multiple times, doing so from
+ * several threads at the same time is not supported as it will
+ * result in an inconsistent state of the variables. Further,
+ * feature variables should not be read *while* this function is
+ * executing.
+ *
+ * To get at feature variables, include the appropriate header,
+ * e.g. mono-hwcap-x86.h for x86(-64).
+ */
+void mono_hwcap_init (void) MONO_INTERNAL;
+
+/* Implemented in mono-hwcap-$TARGET.c. Do not call. */
+void mono_hwcap_arch_init (void) MONO_INTERNAL;
+
+/* Print detected features to the given file. */
+void mono_hwcap_print (FILE *f) MONO_INTERNAL;
+
+/* Please note: If you're going to use the Linux auxiliary vector
+ * to detect CPU features, don't use any of the constant names in
+ * the hwcap.h header. This ties us to a particular version of the
+ * header, and since the values are guaranteed to be stable, hard-
+ * coding them is not that terrible.
+ *
+ * Also, please do not add assumptions to mono-hwcap. The code here
+ * is meant to *discover* facts about the hardware, not assume that
+ * some feature exists because of $arbitrary_preprocessor_define.
+ * If you have to make assumptions, do so elsewhere, e.g. in the
+ * Mini back end you're modifying.
+ *
+ * Finally, be conservative. If you can't determine precisely if a
+ * feature is present, assume that it isn't. In the rare cases where
+ * the hardware or operating system are lying, work around that in
+ * a different place, as with the rule above.
+ */
+
+#endif /* __MONO_UTILS_HWCAP_H__ */
diff --git a/mono/utils/mono-logger.c b/mono/utils/mono-logger.c
index 2e6dedc7733..bfe84f04f7d 100644
--- a/mono/utils/mono-logger.c
+++ b/mono/utils/mono-logger.c
@@ -28,8 +28,8 @@ mono_trace_init (void)
if(level_stack == NULL) {
level_stack = g_queue_new();
- mono_trace_set_mask_string(getenv("MONO_LOG_MASK"));
- mono_trace_set_level_string(getenv("MONO_LOG_LEVEL"));
+ mono_trace_set_mask_string(g_getenv("MONO_LOG_MASK"));
+ mono_trace_set_level_string(g_getenv("MONO_LOG_LEVEL"));
}
}
diff --git a/mono/utils/mono-logger.h b/mono/utils/mono-logger.h
index fc0745bec72..3f07378c769 100644
--- a/mono/utils/mono-logger.h
+++ b/mono/utils/mono-logger.h
@@ -4,10 +4,10 @@
#include <mono/utils/mono-publib.h>
MONO_BEGIN_DECLS
-void
+MONO_API void
mono_trace_set_level_string (const char *value);
-void
+MONO_API void
mono_trace_set_mask_string (const char *value);
MONO_END_DECLS
diff --git a/mono/utils/mono-math.h b/mono/utils/mono-math.h
index 90d14b6c611..46499c2a25a 100644
--- a/mono/utils/mono-math.h
+++ b/mono/utils/mono-math.h
@@ -3,16 +3,17 @@
#define __MONO_SIGNBIT_H__
#include <math.h>
+#include <mono/utils/mono-publib.h>
#ifdef HAVE_SIGNBIT
#define mono_signbit signbit
#else
#define mono_signbit(x) (sizeof (x) == sizeof (float) ? mono_signbit_float (x) : mono_signbit_double (x))
-int
+MONO_API int
mono_signbit_double (double x);
-int
+MONO_API int
mono_signbit_float (float x);
#endif
diff --git a/mono/utils/mono-membar.h b/mono/utils/mono-membar.h
index d49f12d184a..8b1c9663567 100644
--- a/mono/utils/mono-membar.h
+++ b/mono/utils/mono-membar.h
@@ -14,131 +14,41 @@
#include <glib.h>
-#if defined(__x86_64__) || defined(TARGET_AMD64)
-#ifndef _MSC_VER
-static inline void mono_memory_barrier (void)
-{
- __asm__ __volatile__ ("mfence" : : : "memory");
-}
-
-static inline void mono_memory_read_barrier (void)
-{
- __asm__ __volatile__ ("lfence" : : : "memory");
-}
-
-static inline void mono_memory_write_barrier (void)
-{
- __asm__ __volatile__ ("sfence" : : : "memory");
-}
-#else
-#include <intrin.h>
-
-static inline void mono_memory_barrier (void)
-{
- _ReadWriteBarrier ();
-}
-
-static inline void mono_memory_read_barrier (void)
-{
- _ReadBarrier ();
-}
-
-static inline void mono_memory_write_barrier (void)
-{
- _WriteBarrier ();
-}
+#ifdef _MSC_VER
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
#endif
-#elif defined(__i386__) || defined(TARGET_X86)
-#ifndef _MSC_VER
-static inline void mono_memory_barrier (void)
-{
- __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory");
-}
-
-static inline void mono_memory_read_barrier (void)
-{
- mono_memory_barrier ();
-}
-
-static inline void mono_memory_write_barrier (void)
-{
- mono_memory_barrier ();
-}
-#else
+#include <windows.h>
#include <intrin.h>
static inline void mono_memory_barrier (void)
{
+ /* NOTE: _ReadWriteBarrier and friends only prevent the
+ compiler from reordering loads and stores. To prevent
+ the CPU from doing the same, we have to use the
+ MemoryBarrier macro which expands to e.g. a serializing
+ XCHG instruction on x86. Also note that the MemoryBarrier
+ macro does *not* imply _ReadWriteBarrier, so that call
+ cannot be eliminated. */
_ReadWriteBarrier ();
+ MemoryBarrier ();
}
static inline void mono_memory_read_barrier (void)
{
_ReadBarrier ();
+ MemoryBarrier ();
}
static inline void mono_memory_write_barrier (void)
{
_WriteBarrier ();
+ MemoryBarrier ();
}
-#endif
-#elif defined(sparc) || defined(__sparc__)
+#elif defined(USE_GCC_ATOMIC_OPS)
static inline void mono_memory_barrier (void)
{
- __asm__ __volatile__ ("membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad" : : : "memory");
-}
-
-static inline void mono_memory_read_barrier (void)
-{
- __asm__ __volatile__ ("membar #LoadLoad" : : : "memory");
-}
-
-static inline void mono_memory_write_barrier (void)
-{
- __asm__ __volatile__ ("membar #StoreStore" : : : "memory");
-}
-#elif defined(__s390__)
-static inline void mono_memory_barrier (void)
-{
- __asm__ __volatile__ ("bcr 15,0" : : : "memory");
-}
-
-static inline void mono_memory_read_barrier (void)
-{
- mono_memory_barrier ();
-}
-
-static inline void mono_memory_write_barrier (void)
-{
- mono_memory_barrier ();
-}
-#elif defined(__ppc__) || defined(__powerpc__) || defined(__ppc64__)
-static inline void mono_memory_barrier (void)
-{
- __asm__ __volatile__ ("sync" : : : "memory");
-}
-
-static inline void mono_memory_read_barrier (void)
-{
- mono_memory_barrier ();
-}
-
-static inline void mono_memory_write_barrier (void)
-{
- __asm__ __volatile__ ("eieio" : : : "memory");
-}
-
-#elif defined(__arm__)
-static inline void mono_memory_barrier (void)
-{
-#ifdef HAVE_ARMV6
-#ifdef __native_client__
- /* NaCl requires ARMv7 CPUs. */
- __asm__ __volatile__("dsb" : : : "memory");
-#else
- __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory");
-#endif
-#endif
+ __sync_synchronize ();
}
static inline void mono_memory_read_barrier (void)
@@ -165,21 +75,6 @@ static inline void mono_memory_write_barrier (void)
{
mono_memory_barrier ();
}
-#elif defined(__mips__)
-static inline void mono_memory_barrier (void)
-{
- __asm__ __volatile__ ("" : : : "memory");
-}
-
-static inline void mono_memory_read_barrier (void)
-{
- mono_memory_barrier ();
-}
-
-static inline void mono_memory_write_barrier (void)
-{
- mono_memory_barrier ();
-}
#elif defined(MONO_CROSS_COMPILE)
static inline void mono_memory_barrier (void)
{
@@ -192,6 +87,8 @@ static inline void mono_memory_read_barrier (void)
static inline void mono_memory_write_barrier (void)
{
}
+#else
+#error "Don't know how to do memory barriers!"
#endif
#endif /* _MONO_UTILS_MONO_MEMBAR_H_ */
diff --git a/mono/utils/mono-memory-model.h b/mono/utils/mono-memory-model.h
index 3fd7bc4c75c..a97a7cc16b2 100644
--- a/mono/utils/mono-memory-model.h
+++ b/mono/utils/mono-memory-model.h
@@ -152,16 +152,17 @@ Acquire/release semantics macros.
*(target) = (value); \
} while (0)
-#define mono_atomic_load_release(target) ({ \
- typeof (*target) __tmp; \
+#define mono_atomic_load_release(_type,target) ({ \
+ _type __tmp; \
LOAD_RELEASE_FENCE; \
__tmp = *target; \
__tmp; })
-#define mono_atomic_load_acquire(target) ({ \
- typeof (*target) __tmp = *target; \
+#define mono_atomic_load_acquire(var,_type,target) do { \
+ _type __tmp = *target; \
LOAD_ACQUIRE_FENCE; \
- __tmp; })
+ (var) = __tmp; \
+} while (0)
#define mono_atomic_store_acquire(target,value) { \
*target = value; \
diff --git a/mono/utils/mono-mmap.h b/mono/utils/mono-mmap.h
index 36997e07489..017bbcec5bb 100644
--- a/mono/utils/mono-mmap.h
+++ b/mono/utils/mono-mmap.h
@@ -2,6 +2,7 @@
#define __MONO_UTILS_MMAP_H__
#include <glib.h>
+#include <mono/utils/mono-publib.h>
enum {
/* protection */
@@ -24,28 +25,28 @@ enum {
*/
typedef struct _MonoFileMap MonoFileMap;
-MonoFileMap *mono_file_map_open (const char* name);
-guint64 mono_file_map_size (MonoFileMap *fmap);
-int mono_file_map_fd (MonoFileMap *fmap);
-int mono_file_map_close (MonoFileMap *fmap);
-
-int mono_pagesize (void);
-void* mono_valloc (void *addr, size_t length, int flags);
-void* mono_valloc_aligned (size_t length, size_t alignment, int flags);
-int mono_vfree (void *addr, size_t length);
-void* mono_file_map (size_t length, int flags, int fd, guint64 offset, void **ret_handle);
-int mono_file_unmap (void *addr, void *handle);
+MONO_API MonoFileMap *mono_file_map_open (const char* name);
+MONO_API guint64 mono_file_map_size (MonoFileMap *fmap);
+MONO_API int mono_file_map_fd (MonoFileMap *fmap);
+MONO_API int mono_file_map_close (MonoFileMap *fmap);
+
+MONO_API int mono_pagesize (void);
+MONO_API void* mono_valloc (void *addr, size_t length, int flags);
+MONO_API void* mono_valloc_aligned (size_t length, size_t alignment, int flags);
+MONO_API int mono_vfree (void *addr, size_t length);
+MONO_API void* mono_file_map (size_t length, int flags, int fd, guint64 offset, void **ret_handle);
+MONO_API int mono_file_unmap (void *addr, void *handle);
#ifndef HOST_WIN32
-void* mono_file_map_fileio (size_t length, int flags, int fd, guint64 offset, void **ret_handle);
-int mono_file_unmap_fileio (void *addr, void *handle);
+MONO_API void* mono_file_map_fileio (size_t length, int flags, int fd, guint64 offset, void **ret_handle);
+MONO_API int mono_file_unmap_fileio (void *addr, void *handle);
#endif
-int mono_mprotect (void *addr, size_t length, int flags);
+MONO_API int mono_mprotect (void *addr, size_t length, int flags);
-void* mono_shared_area (void);
-void mono_shared_area_remove (void);
-void* mono_shared_area_for_pid (void *pid);
-void mono_shared_area_unload (void *area);
-int mono_shared_area_instances (void **array, int count);
+MONO_API void* mono_shared_area (void);
+MONO_API void mono_shared_area_remove (void);
+MONO_API void* mono_shared_area_for_pid (void *pid);
+MONO_API void mono_shared_area_unload (void *area);
+MONO_API int mono_shared_area_instances (void **array, int count);
/*
* On systems where we have to load code into memory instead of mmaping
@@ -55,7 +56,7 @@ int mono_shared_area_instances (void **array, int count);
typedef void *(*mono_file_map_alloc_fn) (size_t length);
typedef void (*mono_file_map_release_fn) (void *addr);
-void mono_file_map_set_allocator (mono_file_map_alloc_fn alloc, mono_file_map_release_fn release);
+MONO_API void mono_file_map_set_allocator (mono_file_map_alloc_fn alloc, mono_file_map_release_fn release);
#endif /* __MONO_UTILS_MMAP_H__ */
diff --git a/mono/utils/mono-mutex.c b/mono/utils/mono-mutex.c
index 39fbca64f93..6abad5756b0 100644
--- a/mono/utils/mono-mutex.c
+++ b/mono/utils/mono-mutex.c
@@ -16,9 +16,12 @@
#include <string.h>
#include <errno.h>
#include <assert.h>
-#include <sys/time.h>
#include <mono/utils/mono-memory-model.h>
+#ifndef HOST_WIN32
+#include <sys/time.h>
+#endif
+
#include "mono-mutex.h"
#ifndef HOST_WIN32
diff --git a/mono/utils/mono-networkinterfaces.c b/mono/utils/mono-networkinterfaces.c
index a05ad99a466..da0f5de0046 100644
--- a/mono/utils/mono-networkinterfaces.c
+++ b/mono/utils/mono-networkinterfaces.c
@@ -55,6 +55,8 @@ mono_networkinterface_list (int *size)
if (size)
*size = i;
+ if (!nilist)
+ nilist = g_malloc (sizeof (void*));
nilist [i] = NULL;
return nilist;
}
@@ -79,8 +81,7 @@ mono_network_get_data (char* name, MonoNetworkData data, MonoNetworkError *error
rx_fifo, rx_frame, tx_bytes, tx_packets, tx_errs, tx_drops,
tx_fifo, tx_colls, tx_carrier, rx_multi;
- if (error)
- *error = MONO_NETWORK_ERROR_OTHER;
+ *error = MONO_NETWORK_ERROR_OTHER;
f = fopen ("/proc/net/dev", "r");
if (!f)
@@ -96,6 +97,7 @@ mono_network_get_data (char* name, MonoNetworkData data, MonoNetworkError *error
char *ptr;
buf [sizeof (buf) - 1] = 0;
+ /* FIXME: This might potentially cause a buffer overflow for cname. */
if ((ptr = strchr (buf, ':')) == NULL ||
(*ptr++ = 0, sscanf (buf, "%s", cname) != 1))
goto out;
diff --git a/mono/utils/mono-path.h b/mono/utils/mono-path.h
index dcb69ef8352..1ce57b07c6f 100644
--- a/mono/utils/mono-path.h
+++ b/mono/utils/mono-path.h
@@ -2,9 +2,10 @@
#define __MONO_PATH_H
#include <glib.h>
+#include <mono/utils/mono-publib.h>
-gchar *mono_path_resolve_symlinks (const char *path);
-gchar *mono_path_canonicalize (const char *path);
+MONO_API gchar *mono_path_resolve_symlinks (const char *path);
+MONO_API gchar *mono_path_canonicalize (const char *path);
#endif /* __MONO_PATH_H */
diff --git a/mono/utils/mono-poll.h b/mono/utils/mono-poll.h
index 1d4c82afa5f..835c36795a6 100644
--- a/mono/utils/mono-poll.h
+++ b/mono/utils/mono-poll.h
@@ -1,6 +1,8 @@
#ifndef MONO_POLL_H
#define MONO_POLL_H
+#include <mono/utils/mono-publib.h>
+
#include <config.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
@@ -42,7 +44,7 @@ typedef struct {
#endif
-int mono_poll (mono_pollfd *ufds, unsigned int nfds, int timeout);
+MONO_API int mono_poll (mono_pollfd *ufds, unsigned int nfds, int timeout);
#endif /* MONO_POLL_H */
diff --git a/mono/utils/mono-proclib.c b/mono/utils/mono-proclib.c
index 8e0fe36136d..01b8c1bb50c 100644
--- a/mono/utils/mono-proclib.c
+++ b/mono/utils/mono-proclib.c
@@ -561,7 +561,7 @@ get_cpu_times (int cpu_id, gint64 *user, gint64 *systemt, gint64 *irq, gint64 *s
char buf [256];
char *s;
int hz = get_user_hz ();
- long long unsigned int user_ticks, nice_ticks, system_ticks, idle_ticks, iowait_ticks, irq_ticks, sirq_ticks;
+ guint64 user_ticks, nice_ticks, system_ticks, idle_ticks, iowait_ticks, irq_ticks, sirq_ticks;
FILE *f = fopen ("/proc/stat", "r");
if (!f)
return;
@@ -578,7 +578,14 @@ get_cpu_times (int cpu_id, gint64 *user, gint64 *systemt, gint64 *irq, gint64 *s
} else {
continue;
}
- sscanf (data, "%Lu %Lu %Lu %Lu %Lu %Lu %Lu", &user_ticks, &nice_ticks, &system_ticks, &idle_ticks, &iowait_ticks, &irq_ticks, &sirq_ticks);
+
+ user_ticks = strtoull (data, &data, 10);
+ nice_ticks = strtoull (data, &data, 10);
+ system_ticks = strtoull (data, &data, 10);
+ idle_ticks = strtoull (data, &data, 10);
+ iowait_ticks = strtoull (data, &data, 10);
+ irq_ticks = strtoull (data, &data, 10);
+ sirq_ticks = strtoull (data, &data, 10);
break;
}
fclose (f);
diff --git a/mono/utils/mono-property-hash.h b/mono/utils/mono-property-hash.h
index 95630cf51f3..0b24c7fbcd9 100644
--- a/mono/utils/mono-property-hash.h
+++ b/mono/utils/mono-property-hash.h
@@ -18,22 +18,23 @@
#define _MONO_PROPERTY_HASH_H_
#include <glib.h>
+#include <mono/utils/mono-publib.h>
G_BEGIN_DECLS
typedef struct _MonoPropertyHash MonoPropertyHash;
-MonoPropertyHash* mono_property_hash_new (void);
+MONO_API MonoPropertyHash* mono_property_hash_new (void);
-void mono_property_hash_destroy (MonoPropertyHash *hash);
+MONO_API void mono_property_hash_destroy (MonoPropertyHash *hash);
-void mono_property_hash_insert (MonoPropertyHash *hash, gpointer object, guint32 property,
+MONO_API void mono_property_hash_insert (MonoPropertyHash *hash, gpointer object, guint32 property,
gpointer value);
/* Remove all properties of OBJECT */
-void mono_property_hash_remove_object (MonoPropertyHash *hash, gpointer object);
+MONO_API void mono_property_hash_remove_object (MonoPropertyHash *hash, gpointer object);
-gpointer mono_property_hash_lookup (MonoPropertyHash *hash, gpointer object, guint32 property);
+MONO_API gpointer mono_property_hash_lookup (MonoPropertyHash *hash, gpointer object, guint32 property);
G_END_DECLS
diff --git a/mono/utils/mono-publib.h b/mono/utils/mono-publib.h
index 5b6e0ff40ed..505592a862f 100644
--- a/mono/utils/mono-publib.h
+++ b/mono/utils/mono-publib.h
@@ -18,7 +18,9 @@
MONO_BEGIN_DECLS
/* VS 2010 and later have stdint.h */
-#if defined(_MSC_VER) && _MSC_VER < 1600
+#if defined(_MSC_VER)
+
+#if _MSC_VER < 1600
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
@@ -33,8 +35,28 @@ typedef unsigned __int64 uint64_t;
#include <stdint.h>
+#endif
+
+#define MONO_API_EXPORT __declspec(dllexport)
+#define MONO_API_IMPORT __declspec(dllimport)
+
+#else
+
+#include <stdint.h>
+
+#define MONO_API_EXPORT
+#define MONO_API_IMPORT
+
#endif /* end of compiler-specific stuff */
+#if !defined(MONO_STATIC_BUILD) && defined(MONO_DLL_EXPORT)
+ #define MONO_API MONO_API_EXPORT
+#elif !defined(MONO_STATIC_BUILD)
+ #define MONO_API MONO_API_IMPORT
+#else
+ #define MONO_API
+#endif
+
typedef int32_t mono_bool;
typedef uint8_t mono_byte;
typedef uint16_t mono_unichar2;
@@ -42,7 +64,7 @@ typedef uint16_t mono_unichar2;
typedef void (*MonoFunc) (void* data, void* user_data);
typedef void (*MonoHFunc) (void* key, void* value, void* user_data);
-void mono_free (void *);
+MONO_API void mono_free (void *);
#define MONO_CONST_RETURN const
diff --git a/mono/utils/mono-semaphore.c b/mono/utils/mono-semaphore.c
index 0af2dd3a299..68ff7dbe337 100644
--- a/mono/utils/mono-semaphore.c
+++ b/mono/utils/mono-semaphore.c
@@ -33,7 +33,10 @@
# define WAIT_BLOCK(a,b) sem_timedwait (a, b)
# endif
+#ifndef NSEC_PER_SEC
#define NSEC_PER_SEC 1000000000
+#endif
+
int
mono_sem_timedwait (MonoSemType *sem, guint32 timeout_ms, gboolean alertable)
{
diff --git a/mono/utils/mono-semaphore.h b/mono/utils/mono-semaphore.h
index 07e65bc1abc..17dce622dfa 100644
--- a/mono/utils/mono-semaphore.h
+++ b/mono/utils/mono-semaphore.h
@@ -17,6 +17,7 @@
#include <semaphore.h>
#endif
#include <mono/io-layer/io-layer.h>
+#include <mono/utils/mono-publib.h>
#if (defined (HAVE_SEMAPHORE_H) || defined (USE_MACH_SEMA)) && !defined(HOST_WIN32)
# define MONO_HAS_SEMAPHORES
@@ -54,9 +55,9 @@ typedef HANDLE MonoSemType;
G_BEGIN_DECLS
-int mono_sem_wait (MonoSemType *sem, gboolean alertable);
-int mono_sem_timedwait (MonoSemType *sem, guint32 timeout_ms, gboolean alertable);
-int mono_sem_post (MonoSemType *sem);
+MONO_API int mono_sem_wait (MonoSemType *sem, gboolean alertable);
+MONO_API int mono_sem_timedwait (MonoSemType *sem, guint32 timeout_ms, gboolean alertable);
+MONO_API int mono_sem_post (MonoSemType *sem);
G_END_DECLS
#endif /* _MONO_SEMAPHORE_H_ */
diff --git a/mono/utils/mono-signal-handler.h b/mono/utils/mono-signal-handler.h
new file mode 100644
index 00000000000..3a01146d5e1
--- /dev/null
+++ b/mono/utils/mono-signal-handler.h
@@ -0,0 +1,29 @@
+/*
+ * mono-signal-handler.h: Handle signal handler differences across platforms
+ *
+ * Copyright (C) 2013 Xamarin Inc
+ */
+
+#ifndef __MONO_SIGNAL_HANDLER_H__
+#define __MONO_SIGNAL_HANDLER_H__
+
+#include "config.h"
+
+#ifdef ENABLE_EXTENSION_MODULE
+#include "../../../mono-extensions/mono/utils/mono-signal-handler.h"
+#endif
+/*
+Not all platforms support signal handlers in the same way. Some have the same concept but
+for some weird reason pass different kind of arguments.
+
+All signal handler helpers should go here so they can be properly shared across the JIT,
+utils and sgen.
+
+TODO: Cleanup & move mini's macros to here so they can leveraged by other parts.
+
+*/
+#ifndef MONO_SIGNAL_HANDLER_FUNC
+#define MONO_SIGNAL_HANDLER_FUNC(access, name, arglist) access void name arglist
+#endif
+
+#endif
diff --git a/mono/utils/mono-stack-unwinding.h b/mono/utils/mono-stack-unwinding.h
index 21331fa1bd8..d821f3c5e32 100644
--- a/mono/utils/mono-stack-unwinding.h
+++ b/mono/utils/mono-stack-unwinding.h
@@ -46,16 +46,22 @@ typedef struct {
MonoJitInfo *ji;
/*
* Same as ji->method.
+ * Not valid if ASYNC_CONTEXT is true.
*/
MonoMethod *method;
/*
* If ji->method is a gshared method, this is the actual method instance.
* This is only filled if lookup for actual method was requested (MONO_UNWIND_LOOKUP_ACTUAL_METHOD)
+ * Not valid if ASYNC_CONTEXT is true.
*/
MonoMethod *actual_method;
/* The domain containing the code executed by this frame */
MonoDomain *domain;
gboolean managed;
+ /*
+ * Whenever this frame was loaded in async context.
+ */
+ gboolean async_context;
int native_offset;
/*
* IL offset of this frame.
@@ -64,7 +70,7 @@ typedef struct {
*/
int il_offset;
- /*The next fields are only usefull for the jit*/
+ /* The next fields are only useful for the jit */
gpointer lmf;
guint32 unwind_info_len;
guint8 *unwind_info;
diff --git a/mono/utils/mono-threads.c b/mono/utils/mono-threads.c
index b1202bdcde0..e3160eff1f4 100644
--- a/mono/utils/mono-threads.c
+++ b/mono/utils/mono-threads.c
@@ -48,6 +48,9 @@ static MonoLinkedListSet thread_list;
static gboolean disable_new_interrupt = FALSE;
static gboolean mono_threads_inited = FALSE;
+static void mono_threads_unregister_current_thread (MonoThreadInfo *info);
+
+
static inline void
mono_hazard_pointer_clear_all (MonoThreadHazardPointers *hp, int retain)
{
@@ -149,10 +152,12 @@ register_thread (MonoThreadInfo *info, gpointer baseptr)
}
mono_threads_platform_register (info);
-
+ info->thread_state = STATE_RUNNING;
+ mono_thread_info_suspend_lock ();
/*If this fail it means a given thread has been registered twice, which doesn't make sense. */
result = mono_thread_info_insert (info);
g_assert (result);
+ mono_thread_info_suspend_unlock ();
return info;
}
@@ -171,14 +176,14 @@ unregister_thread (void *arg)
*/
mono_native_tls_set_value (small_id_key, GUINT_TO_POINTER (info->small_id + 1));
- /*
- The unregister callback is reposible for calling mono_threads_unregister_current_thread
- since it usually needs to be done in sync with the GC does a stop-the-world.
- */
+ info->thread_state = STATE_SHUTTING_DOWN;
+ mono_thread_info_suspend_lock ();
if (threads_callbacks.thread_unregister)
threads_callbacks.thread_unregister (info);
- else
- mono_threads_unregister_current_thread (info);
+ mono_threads_unregister_current_thread (info);
+
+ info->thread_state = STATE_DEAD;
+ mono_thread_info_suspend_unlock ();
/*now it's safe to free the thread info.*/
mono_thread_hazardous_free_or_queue (info, free_thread_info, TRUE, FALSE);
@@ -190,20 +195,40 @@ unregister_thread (void *arg)
* This must be called from the thread unregister callback and nowhere else.
* The current thread must be passed as TLS might have already been cleaned up.
*/
-void
+static void
mono_threads_unregister_current_thread (MonoThreadInfo *info)
{
gboolean result;
g_assert (mono_thread_info_get_tid (info) == mono_native_thread_id_get ());
result = mono_thread_info_remove (info);
g_assert (result);
-
}
MonoThreadInfo*
mono_thread_info_current (void)
{
- return mono_native_tls_get_value (thread_info_key);
+ MonoThreadInfo *info = (MonoThreadInfo*)mono_native_tls_get_value (thread_info_key);
+ if (info)
+ return info;
+
+ info = mono_thread_info_lookup (mono_native_thread_id_get ()); /*info on HP1*/
+
+ /*
+ We might be called during thread cleanup, but we cannot be called after cleanup as happened.
+ The way to distinguish between before, during and after cleanup is the following:
+
+ -If the TLS key is set, cleanup has not begun;
+ -If the TLS key is clean, but the thread remains registered, cleanup is in progress;
+ -If the thread is nowhere to be found, cleanup has finished.
+
+ We cannot function after cleanup since there's no way to ensure what will happen.
+ */
+ g_assert (info);
+
+ /*We're looking up the current thread which will not be freed until we finish running, so no need to keep it on a HP */
+ mono_hazard_pointer_clear (mono_hazard_pointer_get (), 1);
+
+ return info;
}
int
@@ -461,7 +486,7 @@ is_thread_in_critical_region (MonoThreadInfo *info)
if (!ji)
return FALSE;
- method = ji->method;
+ method = mono_jit_info_get_method (ji);
return threads_callbacks.mono_method_is_critical (method);
}
@@ -618,3 +643,30 @@ mono_thread_info_new_interrupt_enabled (void)
#endif
return FALSE;
}
+
+/*
+ * mono_thread_info_set_is_async_context:
+ *
+ * Set whenever the current thread is in an async context. Some runtime functions might behave
+ * differently while in an async context in order to be async safe.
+ */
+void
+mono_thread_info_set_is_async_context (gboolean async_context)
+{
+ MonoThreadInfo *info = mono_thread_info_current ();
+
+ if (info)
+ info->is_async_context = async_context;
+}
+
+gboolean
+mono_thread_info_is_async_context (void)
+{
+ MonoThreadInfo *info = mono_thread_info_current ();
+
+ if (info)
+ return info->is_async_context;
+ else
+ return FALSE;
+}
+
diff --git a/mono/utils/mono-threads.h b/mono/utils/mono-threads.h
index 0004e55c967..08583a064a0 100644
--- a/mono/utils/mono-threads.h
+++ b/mono/utils/mono-threads.h
@@ -76,10 +76,10 @@ and reduce the number of casts drastically.
#endif
enum {
- STATE_STARTING = 0x01,
- STATE_RUNNING = 0x02,
- STATE_SHUTTING_DOWN = 0x03,
- STATE_DEAD = 0x04,
+ STATE_STARTING = 0x00,
+ STATE_RUNNING = 0x01,
+ STATE_SHUTTING_DOWN = 0x02,
+ STATE_DEAD = 0x03,
RUN_STATE_MASK = 0x0F,
STATE_SUSPENDED = 0x10,
@@ -87,8 +87,8 @@ enum {
SUSPEND_STATE_MASK = 0xF0,
};
-#define mono_thread_info_run_state(info) ((info)->thread_state & RUN_STATE_MASK)
-#define mono_thread_info_suspend_state(info) ((info)->thread_state & SUSPEND_STATE_MASK)
+#define mono_thread_info_run_state(info) (((MonoThreadInfo*)info)->thread_state & RUN_STATE_MASK)
+#define mono_thread_info_suspend_state(info) (((MonoThreadInfo*)info)->thread_state & SUSPEND_STATE_MASK)
typedef struct {
MonoLinkedListSetNode node;
@@ -126,6 +126,12 @@ typedef struct {
and is ended when you call either mono_thread_info_resume or mono_thread_info_finish_suspend.
*/
gboolean inside_critical_region;
+
+ /*
+ * If TRUE, the thread is in async context. Code can use this information to avoid async-unsafe
+ * operations like locking without having to pass an 'async' parameter around.
+ */
+ gboolean is_async_context;
} MonoThreadInfo;
typedef struct {
@@ -151,13 +157,13 @@ typedef struct {
/*
Requires the world to be stoped
*/
-#define FOREACH_THREAD(thread) MONO_LLS_FOREACH (mono_thread_info_list_head (), thread, SgenThreadInfo*)
+#define FOREACH_THREAD(thread) MONO_LLS_FOREACH (mono_thread_info_list_head (), thread, THREAD_INFO_TYPE*)
#define END_FOREACH_THREAD MONO_LLS_END_FOREACH
/*
Snapshot iteration.
*/
-#define FOREACH_THREAD_SAFE(thread) MONO_LLS_FOREACH_SAFE (mono_thread_info_list_head (), thread, SgenThreadInfo*)
+#define FOREACH_THREAD_SAFE(thread) MONO_LLS_FOREACH_SAFE (mono_thread_info_list_head (), thread, THREAD_INFO_TYPE*)
#define END_FOREACH_THREAD_SAFE MONO_LLS_END_FOREACH_SAFE
#define mono_thread_info_get_tid(info) ((MonoNativeThreadId)((MonoThreadInfo*)info)->node.key)
@@ -197,10 +203,10 @@ mono_thread_info_get_small_id (void) MONO_INTERNAL;
MonoLinkedListSet*
mono_thread_info_list_head (void) MONO_INTERNAL;
-MonoThreadInfo*
+THREAD_INFO_TYPE*
mono_thread_info_lookup (MonoNativeThreadId id) MONO_INTERNAL;
-MonoThreadInfo*
+THREAD_INFO_TYPE*
mono_thread_info_safe_suspend_sync (MonoNativeThreadId tid, gboolean interrupt_kernel) MONO_INTERNAL;
gboolean
@@ -216,7 +222,7 @@ gboolean
mono_thread_info_new_interrupt_enabled (void) MONO_INTERNAL;
void
-mono_thread_info_setup_async_call (MonoThreadInfo *info, void (*target_func)(void*), void *user_data) MONO_INTERNAL;
+mono_thread_info_setup_async_call (THREAD_INFO_TYPE *info, void (*target_func)(void*), void *user_data) MONO_INTERNAL;
void
mono_thread_info_suspend_lock (void) MONO_INTERNAL;
@@ -225,14 +231,17 @@ void
mono_thread_info_suspend_unlock (void) MONO_INTERNAL;
void
-mono_threads_unregister_current_thread (THREAD_INFO_TYPE *info) MONO_INTERNAL;
-
-void
mono_thread_info_disable_new_interrupt (gboolean disable) MONO_INTERNAL;
void
mono_thread_info_abort_socket_syscall_for_close (MonoNativeThreadId tid) MONO_INTERNAL;
+void
+mono_thread_info_set_is_async_context (gboolean async_context) MONO_INTERNAL;
+
+gboolean
+mono_thread_info_is_async_context (void) MONO_INTERNAL;
+
#if !defined(HOST_WIN32)
int
@@ -254,12 +263,12 @@ HANDLE
/* Plartform specific functions DON'T use them */
void mono_threads_init_platform (void) MONO_INTERNAL; //ok
-gboolean mono_threads_core_suspend (MonoThreadInfo *info) MONO_INTERNAL;
-gboolean mono_threads_core_resume (MonoThreadInfo *info) MONO_INTERNAL;
-void mono_threads_platform_register (MonoThreadInfo *info) MONO_INTERNAL; //ok
-void mono_threads_platform_free (MonoThreadInfo *info) MONO_INTERNAL;
-void mono_threads_core_interrupt (MonoThreadInfo *info) MONO_INTERNAL;
-void mono_threads_core_abort_syscall (MonoThreadInfo *info) MONO_INTERNAL;
+gboolean mono_threads_core_suspend (THREAD_INFO_TYPE *info) MONO_INTERNAL;
+gboolean mono_threads_core_resume (THREAD_INFO_TYPE *info) MONO_INTERNAL;
+void mono_threads_platform_register (THREAD_INFO_TYPE *info) MONO_INTERNAL; //ok
+void mono_threads_platform_free (THREAD_INFO_TYPE *info) MONO_INTERNAL;
+void mono_threads_core_interrupt (THREAD_INFO_TYPE *info) MONO_INTERNAL;
+void mono_threads_core_abort_syscall (THREAD_INFO_TYPE *info) MONO_INTERNAL;
gboolean mono_threads_core_needs_abort_syscall (void) MONO_INTERNAL;
MonoNativeThreadId mono_native_thread_id_get (void) MONO_INTERNAL;
diff --git a/mono/utils/mono-tls.c b/mono/utils/mono-tls.c
new file mode 100644
index 00000000000..890f0782d57
--- /dev/null
+++ b/mono/utils/mono-tls.c
@@ -0,0 +1,35 @@
+/*
+ * mono-tls.c: Low-level TLS support
+ *
+ * Copyright 2013 Xamarin, Inc (http://www.xamarin.com)
+ */
+
+#include "mono-tls.h"
+
+static int tls_offsets [TLS_KEY_NUM];
+static gboolean tls_offset_set [TLS_KEY_NUM];
+
+/*
+ * mono_tls_key_get_offset:
+ *
+ * Return the TLS offset used by the TLS var identified by KEY, previously initialized by a call to
+ * mono_tls_key_set_offset (). Return -1 if the offset is not known.
+ */
+int
+mono_tls_key_get_offset (MonoTlsKey key)
+{
+ g_assert (tls_offset_set [key]);
+ return tls_offsets [key];
+}
+
+/*
+ * mono_tls_key_set_offset:
+ *
+ * Set the TLS offset used by the TLS var identified by KEY.
+ */
+void
+mono_tls_key_set_offset (MonoTlsKey key, int offset)
+{
+ tls_offsets [key] = offset;
+ tls_offset_set [key] = TRUE;
+}
diff --git a/mono/utils/mono-tls.h b/mono/utils/mono-tls.h
index c38708469f3..485aea76f3a 100644
--- a/mono/utils/mono-tls.h
+++ b/mono/utils/mono-tls.h
@@ -11,6 +11,23 @@
#ifndef __MONO_TLS_H__
#define __MONO_TLS_H__
+#include <glib.h>
+
+/* TLS entries used by the runtime */
+typedef enum {
+ /* mono_thread_internal_current () */
+ TLS_KEY_THREAD = 0,
+ TLS_KEY_JIT_TLS = 1,
+ /* mono_domain_get () */
+ TLS_KEY_DOMAIN = 2,
+ TLS_KEY_LMF = 3,
+ TLS_KEY_SGEN_THREAD_INFO = 4,
+ TLS_KEY_SGEN_TLAB_NEXT_ADDR = 5,
+ TLS_KEY_SGEN_TLAB_TEMP_END = 6,
+ TLS_KEY_BOEHM_GC_THREAD = 7,
+ TLS_KEY_LMF_ADDR = 8,
+ TLS_KEY_NUM = 9
+} MonoTlsKey;
#ifdef HOST_WIN32
@@ -49,5 +66,7 @@ mono_native_tls_set_value (MonoNativeTlsKey key, gpointer value)
#endif /* HOST_WIN32 */
+int mono_tls_key_get_offset (MonoTlsKey key);
+void mono_tls_key_set_offset (MonoTlsKey key, int offset);
#endif /* __MONO_TLS_H__ */
diff --git a/mono/utils/mono-uri.h b/mono/utils/mono-uri.h
index 96dc9eeed08..1a92a8f7ef8 100644
--- a/mono/utils/mono-uri.h
+++ b/mono/utils/mono-uri.h
@@ -1,8 +1,9 @@
#ifndef __MONO_URI_H
#define __MONO_URI_H
#include <glib.h>
+#include <mono/utils/mono-publib.h>
-gchar * mono_escape_uri_string (const gchar *string);
+MONO_API gchar * mono_escape_uri_string (const gchar *string);
#endif /* __MONO_URI_H */
diff --git a/mono/utils/monobitset.c b/mono/utils/monobitset.c
index 5ff68938f6d..e113260d4a8 100644
--- a/mono/utils/monobitset.c
+++ b/mono/utils/monobitset.c
@@ -210,25 +210,17 @@ mono_bitset_count (const MonoBitSet *set) {
count = 0;
for (i = 0; i < set->size / BITS_PER_CHUNK; ++i) {
d = set->data [i];
- /* there is probably some asm code that can do this much faster */
- if (d) {
-#if SIZEOF_VOID_P == 8
- /* http://www.jjj.de/bitwizardry/bitwizardrypage.html */
- d -= (d>>1) & 0x5555555555555555;
- d = ((d>>2) & 0x3333333333333333) + (d & 0x3333333333333333);
- d = ((d>>4) + d) & 0x0f0f0f0f0f0f0f0f;
- d *= 0x0101010101010101;
- count += d >> 56;
+#ifdef __GNUC__
+ if (sizeof (gsize) == sizeof (unsigned long))
+ count += __builtin_popcountl (d);
+ else
+ count += __builtin_popcount (d);
#else
- /* http://aggregate.org/MAGIC/ */
- d -= ((d >> 1) & 0x55555555);
- d = (((d >> 2) & 0x33333333) + (d & 0x33333333));
- d = (((d >> 4) + d) & 0x0f0f0f0f);
- d += (d >> 8);
- d += (d >> 16);
- count += (d & 0x0000003f);
-#endif
+ while (d) {
+ count ++;
+ d &= (d - 1);
}
+#endif
}
return count;
}
diff --git a/mono/utils/monobitset.h b/mono/utils/monobitset.h
index 7ec53f60bcf..5bea9278394 100644
--- a/mono/utils/monobitset.h
+++ b/mono/utils/monobitset.h
@@ -2,6 +2,7 @@
#define __MONO_BITSET_H__
#include <glib.h>
+#include <mono/utils/mono-publib.h>
/*
* When embedding, you have to define MONO_ZERO_LEN_ARRAY before including any
@@ -62,56 +63,56 @@ enum {
* Interface documentation by Dennis Haney.
*/
-guint32 mono_bitset_alloc_size (guint32 max_size, guint32 flags);
+MONO_API guint32 mono_bitset_alloc_size (guint32 max_size, guint32 flags);
-MonoBitSet* mono_bitset_new (guint32 max_size, guint32 flags);
+MONO_API MonoBitSet* mono_bitset_new (guint32 max_size, guint32 flags);
-MonoBitSet* mono_bitset_mem_new (gpointer mem, guint32 max_size, guint32 flags);
+MONO_API MonoBitSet* mono_bitset_mem_new (gpointer mem, guint32 max_size, guint32 flags);
-void mono_bitset_free (MonoBitSet *set);
+MONO_API void mono_bitset_free (MonoBitSet *set);
-void mono_bitset_set (MonoBitSet *set, guint32 pos);
+MONO_API void mono_bitset_set (MonoBitSet *set, guint32 pos);
-void mono_bitset_set_all (MonoBitSet *set);
+MONO_API void mono_bitset_set_all (MonoBitSet *set);
-int mono_bitset_test (const MonoBitSet *set, guint32 pos);
+MONO_API int mono_bitset_test (const MonoBitSet *set, guint32 pos);
-gsize mono_bitset_test_bulk (const MonoBitSet *set, guint32 pos);
+MONO_API gsize mono_bitset_test_bulk (const MonoBitSet *set, guint32 pos);
-void mono_bitset_clear (MonoBitSet *set, guint32 pos);
+MONO_API void mono_bitset_clear (MonoBitSet *set, guint32 pos);
-void mono_bitset_clear_all (MonoBitSet *set);
+MONO_API void mono_bitset_clear_all (MonoBitSet *set);
-void mono_bitset_invert (MonoBitSet *set);
+MONO_API void mono_bitset_invert (MonoBitSet *set);
-guint32 mono_bitset_size (const MonoBitSet *set);
+MONO_API guint32 mono_bitset_size (const MonoBitSet *set);
-guint32 mono_bitset_count (const MonoBitSet *set);
+MONO_API guint32 mono_bitset_count (const MonoBitSet *set);
-void mono_bitset_low_high (const MonoBitSet *set, guint32 *low, guint32 *high);
+MONO_API void mono_bitset_low_high (const MonoBitSet *set, guint32 *low, guint32 *high);
-int mono_bitset_find_start (const MonoBitSet *set);
+MONO_API int mono_bitset_find_start (const MonoBitSet *set);
-int mono_bitset_find_first (const MonoBitSet *set, gint pos);
+MONO_API int mono_bitset_find_first (const MonoBitSet *set, gint pos);
-int mono_bitset_find_last (const MonoBitSet *set, gint pos);
+MONO_API int mono_bitset_find_last (const MonoBitSet *set, gint pos);
-int mono_bitset_find_first_unset (const MonoBitSet *set, gint pos);
+MONO_API int mono_bitset_find_first_unset (const MonoBitSet *set, gint pos);
-MonoBitSet* mono_bitset_clone (const MonoBitSet *set, guint32 new_size);
+MONO_API MonoBitSet* mono_bitset_clone (const MonoBitSet *set, guint32 new_size);
-void mono_bitset_copyto (const MonoBitSet *src, MonoBitSet *dest);
+MONO_API void mono_bitset_copyto (const MonoBitSet *src, MonoBitSet *dest);
-void mono_bitset_union (MonoBitSet *dest, const MonoBitSet *src);
+MONO_API void mono_bitset_union (MonoBitSet *dest, const MonoBitSet *src);
-void mono_bitset_intersection (MonoBitSet *dest, const MonoBitSet *src);
+MONO_API void mono_bitset_intersection (MonoBitSet *dest, const MonoBitSet *src);
-void mono_bitset_sub (MonoBitSet *dest, const MonoBitSet *src);
+MONO_API void mono_bitset_sub (MonoBitSet *dest, const MonoBitSet *src);
-gboolean mono_bitset_equal (const MonoBitSet *src, const MonoBitSet *src1);
+MONO_API gboolean mono_bitset_equal (const MonoBitSet *src, const MonoBitSet *src1);
-void mono_bitset_foreach (MonoBitSet *set, MonoBitSetFunc func, gpointer data);
+MONO_API void mono_bitset_foreach (MonoBitSet *set, MonoBitSetFunc func, gpointer data);
-void mono_bitset_intersection_2 (MonoBitSet *dest, const MonoBitSet *src1, const MonoBitSet *src2);
+MONO_API void mono_bitset_intersection_2 (MonoBitSet *dest, const MonoBitSet *src1, const MonoBitSet *src2);
#endif /* __MONO_BITSET_H__ */
diff --git a/mono/utils/strenc.h b/mono/utils/strenc.h
index f1b66737e3a..8da0155669c 100644
--- a/mono/utils/strenc.h
+++ b/mono/utils/strenc.h
@@ -11,11 +11,12 @@
#define _MONO_STRENC_H_ 1
#include <glib.h>
+#include <mono/utils/mono-publib.h>
-extern gunichar2 *mono_unicode_from_external (const gchar *in, gsize *bytes);
-extern gchar *mono_utf8_from_external (const gchar *in);
-extern gchar *mono_unicode_to_external (const gunichar2 *uni);
-extern gboolean mono_utf8_validate_and_len (const gchar *source, glong* oLength, const gchar** oEnd);
-extern gboolean mono_utf8_validate_and_len_with_bounds (const gchar *source, glong max_bytes, glong* oLength, const gchar** oEnd);
+extern MONO_API gunichar2 *mono_unicode_from_external (const gchar *in, gsize *bytes);
+extern MONO_API gchar *mono_utf8_from_external (const gchar *in);
+extern MONO_API gchar *mono_unicode_to_external (const gunichar2 *uni);
+extern MONO_API gboolean mono_utf8_validate_and_len (const gchar *source, glong* oLength, const gchar** oEnd);
+extern MONO_API gboolean mono_utf8_validate_and_len_with_bounds (const gchar *source, glong max_bytes, glong* oLength, const gchar** oEnd);
#endif /* _MONO_STRENC_H_ */
diff --git a/mono/utils/strtod.c b/mono/utils/strtod.c
index 708e485017c..d7b99340999 100644
--- a/mono/utils/strtod.c
+++ b/mono/utils/strtod.c
@@ -2444,6 +2444,7 @@ mono_strtod
return sign ? -dval(rv) : dval(rv);
}
+#if 0
static int
quorem
#ifdef KR_headers
@@ -2561,11 +2562,13 @@ quorem
}
return q;
}
+#endif
#ifndef MULTIPLE_THREADS
static char *dtoa_result;
#endif
+#if 0
static char *
#ifdef KR_headers
rv_alloc(i) int i;
@@ -2629,7 +2632,6 @@ freedtoa(char *s)
#endif
}
-#if 0
/* dtoa for IEEE arithmetic (dmg): convert double to ASCII string.
*
* Inspired by "How to Print Floating-Point Numbers Accurately" by
diff --git a/msvc/eglib.vcxproj b/msvc/eglib.vcxproj
index 38cc49ba75e..048d96d0c63 100644
--- a/msvc/eglib.vcxproj
+++ b/msvc/eglib.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,18 +27,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/genmdesc.vcxproj b/msvc/genmdesc.vcxproj
index 5ec6d8aa5b9..37f1d70dfc3 100644
--- a/msvc/genmdesc.vcxproj
+++ b/msvc/genmdesc.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,21 +27,25 @@
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/libgc.vcxproj b/msvc/libgc.vcxproj
index 76a7e8202e7..f5cf3627df7 100644
--- a/msvc/libgc.vcxproj
+++ b/msvc/libgc.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,18 +27,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/libmono.vcxproj b/msvc/libmono.vcxproj
index 97e87073491..ceb0619d28c 100644
--- a/msvc/libmono.vcxproj
+++ b/msvc/libmono.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug_SGen|Win32">
<Configuration>Debug_SGen</Configuration>
@@ -156,41 +156,49 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -320,7 +328,7 @@
<LinkLibraryDependencies>false</LinkLibraryDependencies>
</ProjectReference>
<Link>
- <AdditionalDependencies>libgc.lib;libmonoruntimesgen.lib;libmonoutils.lib;eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>libmonoruntimesgen.lib;libmonoutils.lib;eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>monosgen.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
diff --git a/msvc/libmonoruntime.vcxproj b/msvc/libmonoruntime.vcxproj
index 3965534b31d..3ad4ff65915 100644
--- a/msvc/libmonoruntime.vcxproj
+++ b/msvc/libmonoruntime.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug_SGen|Win32">
@@ -112,6 +112,8 @@
<ClCompile Include="..\mono\metadata\sgen-split-nursery.c" />
<ClCompile Include="..\mono\metadata\sgen-toggleref.c" />
<ClCompile Include="..\mono\metadata\sgen-workers.c" />
+ <ClCompile Include="..\mono\metadata\sgen-fin-weak-hash.c" />
+ <ClCompile Include="..\mono\metadata\sgen-stw.c" />
<ClCompile Include="..\mono\metadata\socket-io.c" />
<ClCompile Include="..\mono\metadata\string-icalls.c" />
<ClCompile Include="..\mono\metadata\sysmath.c" />
@@ -218,41 +220,49 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -449,4 +459,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project> \ No newline at end of file
diff --git a/msvc/libmonoutils.vcxproj b/msvc/libmonoutils.vcxproj
index 7fd05c936bd..8c3ef282414 100644
--- a/msvc/libmonoutils.vcxproj
+++ b/msvc/libmonoutils.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -42,6 +42,7 @@
<ClCompile Include="..\mono\utils\mono-math.c" />
<ClCompile Include="..\mono\utils\mono-md5.c" />
<ClCompile Include="..\mono\utils\mono-mmap.c" />
+ <ClCompile Include="..\mono\utils\mono-mutex.c" />
<ClCompile Include="..\mono\utils\mono-networkinterfaces.c" />
<ClCompile Include="..\mono\utils\mono-path.c" />
<ClCompile Include="..\mono\utils\mono-poll.c" />
@@ -61,6 +62,10 @@
<ClCompile Include="..\mono\utils\monobitset.c" />
<ClCompile Include="..\mono\utils\strenc.c" />
<ClCompile Include="..\mono\utils\strtod.c" />
+ <ClCompile Include="..\mono\utils\atomic.c" />
+ <ClCompile Include="..\mono\utils\mono-hwcap.c" />
+ <ClCompile Include="..\mono\utils\mono-hwcap-x86.c" />
+ <ClCompile Include="..\mono\utils\bsearch.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\mono\utils\dlmalloc.h" />
@@ -96,6 +101,7 @@
<ClInclude Include="..\mono\utils\mono-membar.h" />
<ClInclude Include="..\mono\utils\mono-memory-model.h" />
<ClInclude Include="..\mono\utils\mono-mmap.h" />
+ <ClInclude Include="..\mono\utils\mono-mutex.h" />
<ClInclude Include="..\mono\utils\mono-networkinterfaces.h" />
<ClInclude Include="..\mono\utils\mono-path.h" />
<ClInclude Include="..\mono\utils\mono-poll.h" />
@@ -116,6 +122,10 @@
<ClInclude Include="..\mono\utils\strenc.h" />
<ClInclude Include="..\mono\utils\strtod.h" />
<ClInclude Include="..\mono\utils\valgrind.h" />
+ <ClInclude Include="..\mono\utils\atomic.h" />
+ <ClInclude Include="..\mono\utils\mono-hwcap.h" />
+ <ClInclude Include="..\mono\utils\mono-hwcap-x86.h" />
+ <ClInclude Include="..\mono\utils\bsearch.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{8FC2B0C8-51AD-49DF-851F-5D01A77A75E4}</ProjectGuid>
@@ -127,21 +137,25 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/libtest.vcxproj b/msvc/libtest.vcxproj
index 0a4e772f403..b0b447bc8c2 100644
--- a/msvc/libtest.vcxproj
+++ b/msvc/libtest.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,18 +27,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/mono.def b/msvc/mono.def
index 345a71e08b8..7a264b225fb 100644
--- a/msvc/mono.def
+++ b/msvc/mono.def
@@ -331,6 +331,7 @@ mono_gc_walk_heap
mono_gc_wbarrier_arrayref_copy
mono_gc_wbarrier_generic_nostore
mono_gc_wbarrier_generic_store
+mono_gc_wbarrier_generic_store_atomic
mono_gc_wbarrier_object_copy
mono_gc_wbarrier_set_arrayref
mono_gc_wbarrier_set_field
diff --git a/msvc/mono.vcxproj b/msvc/mono.vcxproj
index 4db2be0c807..3ecf25bff1e 100644
--- a/msvc/mono.vcxproj
+++ b/msvc/mono.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug_SGen|Win32">
<Configuration>Debug_SGen</Configuration>
@@ -44,34 +44,42 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SGen|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -171,7 +179,7 @@
</ClCompile>
<ProjectReference />
<Link>
- <AdditionalDependencies>monosgen-2.0.lib;libgc.lib;eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>monosgen-2.0.lib;eglib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Platform)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
diff --git a/msvc/monodiet.vcxproj b/msvc/monodiet.vcxproj
index b7ec16d205a..b4b2c4e5d80 100644
--- a/msvc/monodiet.vcxproj
+++ b/msvc/monodiet.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,18 +27,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/monodis.vcxproj b/msvc/monodis.vcxproj
index 02c88b38e7d..b9cae332c8e 100644
--- a/msvc/monodis.vcxproj
+++ b/msvc/monodis.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,18 +27,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/monograph.vcxproj b/msvc/monograph.vcxproj
index 91caf879cd8..f77df6ffae8 100644
--- a/msvc/monograph.vcxproj
+++ b/msvc/monograph.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,18 +27,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/monoposixhelper.vcxproj b/msvc/monoposixhelper.vcxproj
index b6420a80652..aafc552c829 100644
--- a/msvc/monoposixhelper.vcxproj
+++ b/msvc/monoposixhelper.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,18 +27,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/monosgen.def b/msvc/monosgen.def
index 6cb88477680..d176f9520a7 100644
--- a/msvc/monosgen.def
+++ b/msvc/monosgen.def
@@ -331,6 +331,7 @@ mono_gc_walk_heap
mono_gc_wbarrier_arrayref_copy
mono_gc_wbarrier_generic_nostore
mono_gc_wbarrier_generic_store
+mono_gc_wbarrier_generic_store_atomic
mono_gc_wbarrier_object_copy
mono_gc_wbarrier_set_arrayref
mono_gc_wbarrier_set_field
diff --git a/msvc/pedump.vcxproj b/msvc/pedump.vcxproj
index 2c6e2910d21..5e57c01b5dd 100644
--- a/msvc/pedump.vcxproj
+++ b/msvc/pedump.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,18 +27,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/profiler-codeanalyst.vcxproj b/msvc/profiler-codeanalyst.vcxproj
index 1ce7d6bfd65..d9d013ce515 100644
--- a/msvc/profiler-codeanalyst.vcxproj
+++ b/msvc/profiler-codeanalyst.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,18 +27,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/profiler-cov.vcxproj b/msvc/profiler-cov.vcxproj
index f4f68e476ab..da7aaa3e67d 100644
--- a/msvc/profiler-cov.vcxproj
+++ b/msvc/profiler-cov.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,18 +27,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/profiler-logging.vcxproj b/msvc/profiler-logging.vcxproj
index 16e248f8de5..22a2c1bdaed 100644
--- a/msvc/profiler-logging.vcxproj
+++ b/msvc/profiler-logging.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,18 +27,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/profiler-vtune.vcxproj b/msvc/profiler-vtune.vcxproj
index c67d3277779..582cca988bc 100644
--- a/msvc/profiler-vtune.vcxproj
+++ b/msvc/profiler-vtune.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,18 +27,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/test-invoke.vcxproj b/msvc/test-invoke.vcxproj
index 475b32b1ae9..ecfc8d6953c 100644
--- a/msvc/test-invoke.vcxproj
+++ b/msvc/test-invoke.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,18 +27,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/test-metadata.vcxproj b/msvc/test-metadata.vcxproj
index f28c1e351a1..3159e42dbb8 100644
--- a/msvc/test-metadata.vcxproj
+++ b/msvc/test-metadata.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,18 +27,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/test_eglib.vcxproj b/msvc/test_eglib.vcxproj
index a25b55e9981..69a9aefb9c0 100644
--- a/msvc/test_eglib.vcxproj
+++ b/msvc/test_eglib.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,18 +27,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/teste.vcxproj b/msvc/teste.vcxproj
index 4125f7569d9..8ec30a352f2 100644
--- a/msvc/teste.vcxproj
+++ b/msvc/teste.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -27,18 +27,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/msvc/win32.xml b/msvc/win32.xml
index 4ab2c674cb4..6263590c110 100644
--- a/msvc/win32.xml
+++ b/msvc/win32.xml
@@ -17,7 +17,9 @@
<Copy source="{sourcedir}\mono\data\net_2_0\DefaultWsdlHelpGenerator.aspx" destination="{destdir}\etc\mono\2.0\DefaultWsdlHelpGenerator.aspx" />
<Copy source="{sourcedir}\mono\data\net_2_0\settings.map" destination="{destdir}\etc\mono\2.0\settings.map" />
<Copy source="{sourcedir}\mono\data\net_2_0\web.config" destination="{destdir}\etc\mono\2.0\web.config" />
- <Copy source="{sourcedir}\mono\data\net_2_0\Browsers\Compat.browser" destination="{destdir}\etc\mono\2.0\Browsers\Compat.browser" />
+ <Copy source="{sourcedir}\mono\data\Browsers\Compat.browser" destination="{destdir}\etc\mono\2.0\Browsers\Compat.browser" />
+ <Copy source="{sourcedir}\mono\data\Browsers\Compat.browser" destination="{destdir}\etc\mono\4.0\Browsers\Compat.browser" />
+ <Copy source="{sourcedir}\mono\data\Browsers\Compat.browser" destination="{destdir}\etc\mono\4.5\Browsers\Compat.browser" />
<Copy source="{sourcedir}\mono\data\browscap.ini" destination="{destdir}\etc\mono\browscap.ini" />
<!-- Bring in xulrunner -->
@@ -1894,4 +1896,4 @@
<!-- Build the wix includes files -->
<WixInclude installeronly="true" root="{destdir}" wixfiles="{destdir}\Files.wxi" wixcomponents="{destdir}\Components.wxi"/>
-</Assemblies> \ No newline at end of file
+</Assemblies>
diff --git a/runtime/Makefile.am b/runtime/Makefile.am
index 93b44b4bdc3..809ee028d46 100644
--- a/runtime/Makefile.am
+++ b/runtime/Makefile.am
@@ -6,13 +6,15 @@ etctmp = etc
symlinks = etc/mono/1.0/machine.config etc/mono/2.0/machine.config etc/mono/2.0/web.config etc/mono/browscap.ini etc/mono/2.0/Browsers/Compat.browser
if INSTALL_4_0
-symlinks += etc/mono/4.0/machine.config etc/mono/4.0/web.config etc/mono/4.5/web.config etc/mono/4.5/machine.config
+symlinks += etc/mono/4.0/machine.config etc/mono/4.0/web.config etc/mono/4.5/web.config etc/mono/4.5/machine.config etc/mono/4.0/Browsers/Compat.browser etc/mono/4.5/Browsers/Compat.browser
endif
etc/mono/2.0/machine.config: $(top_srcdir)/data/net_2_0/machine.config
etc/mono/2.0/web.config: $(top_srcdir)/data/net_2_0/web.config
etc/mono/browscap.ini: $(top_srcdir)/data/browscap.ini
-etc/mono/2.0/Browsers/Compat.browser: $(top_srcdir)/data/net_2_0/Browsers/Compat.browser
+etc/mono/2.0/Browsers/Compat.browser: $(top_srcdir)/data/Browsers/Compat.browser
+etc/mono/4.0/Browsers/Compat.browser: $(top_srcdir)/data/Browsers/Compat.browser
+etc/mono/4.5/Browsers/Compat.browser: $(top_srcdir)/data/Browsers/Compat.browser
etc/mono/4.0/machine.config: $(top_srcdir)/data/net_4_0/machine.config
etc/mono/4.0/web.config: $(top_srcdir)/data/net_4_0/web.config
etc/mono/4.5/machine.config: $(top_srcdir)/data/net_4_5/machine.config
@@ -23,38 +25,11 @@ $(symlinks):
SUPPORT_FILES = $(symlinks) mono-wrapper etc/mono/config
-if MOONLIGHT
-moon-do-basic: Makefile $(SUPPORT_FILES)
- cd $(mcs_topdir)/ && $(MAKE) NO_DIR_CHECK=1 PROFILE=moonlight_raw
-
-moon-do-basic-clean:
- cd $(mcs_topdir)/ && $(MAKE) NO_DIR_CHECK=1 PROFILE=moonlight_raw clean
-endif
-
if ONLY_MONOTOUCH
build_profiles = monotouch
else
-if ONLY_MOONLIGHT
-build_profiles = moonlight_raw
-test_profiles = moonlight_raw
-else
-
build_profiles =
-if MOONLIGHT
-build_profiles += moonlight_raw
-
-moon-do-moonlight-raw: Makefile $(SUPPORT_FILES)
- cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='moonlight_raw' CC='$(CC)' all-profiles
-
-moon-do-moonlight-raw-clean:
- cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='moonlight_raw' CC='$(CC)' clean-profiles
-
-moon-do-build: moon-do-moonlight-raw moon-do-basic
-moon-do-clean: moon-do-moonlight-raw-clean moon-do-basic-clean
-
-endif
-
if INSTALL_2_0
build_profiles += net_2_0 net_3_5
al_profile = net_2_0
@@ -81,7 +56,6 @@ endif
test_profiles = $(build_profiles)
endif
-endif
if BUILD_MCS
@@ -186,7 +160,7 @@ etc/mono/config: ../data/config Makefile $(symlinks)
d=`cd ../support && pwd`; \
sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@t
if test -z "$(libgdiplus_loc)"; then :; else \
- sed 's,<configuration>,& <dllmap dll="gdiplus.dll" target="$(libgdiplus_loc)" />,' $@t > $@tt; \
+ sed 's,<configuration>,& <dllmap dll="gdiplus.dll" target="$(libgdiplus_loc)" os="!windows"/>,' $@t > $@tt; \
mv -f $@tt $@t; fi
mv -f $@t $@
diff --git a/scripts/dmcs.in b/scripts/dmcs.in
index 716c1acad1c..e59bacf91a8 100644..100755
--- a/scripts/dmcs.in
+++ b/scripts/dmcs.in
@@ -1,2 +1,2 @@
#!/bin/sh
-mcs -sdk:4 "$@"
+exec @bindir@/mono $MONO_OPTIONS @mono_instdir@/4.5/mcs.exe -sdk:4 "$@"
diff --git a/scripts/gmcs.in b/scripts/gmcs.in
index df33e6cfec2..64005f5c09f 100644..100755
--- a/scripts/gmcs.in
+++ b/scripts/gmcs.in
@@ -1,2 +1,2 @@
#!/bin/sh
-mcs -sdk:2 "$@"
+exec @bindir@/mono $MONO_OPTIONS @mono_instdir@/4.5/mcs.exe -sdk:2 "$@"
diff --git a/scripts/mono-test-install b/scripts/mono-test-install
index af0727f9844..3c1f74a8892 100755
--- a/scripts/mono-test-install
+++ b/scripts/mono-test-install
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Does various checks for people that we can use to diagnose
# an end user installation
@@ -174,4 +174,4 @@ if mcs $temp_cs >& /dev/null; then
else
echo Failed to compile sample test program, your installation is broken
exit 1
-fi \ No newline at end of file
+fi
diff --git a/support/Makefile.am b/support/Makefile.am
index b24739fa686..c339ebced73 100644
--- a/support/Makefile.am
+++ b/support/Makefile.am
@@ -32,7 +32,6 @@ MPH_UNIX_SOURCE = \
fstab.c \
grp.c \
macros.c \
- mac-reachability.c \
nl.c \
nl.h \
old-map.c \
@@ -116,10 +115,6 @@ libMonoPosixHelper_la_LIBADD = \
libMonoPosixHelper_la_LDFLAGS = -no-undefined -avoid-version
libMonoSupportW_la_LDFLAGS = -no-undefined -avoid-version
-if PLATFORM_DARWIN
-libMonoPosixHelper_la_LDFLAGS += -framework CoreFoundation -framework SystemConfiguration
-endif
-
libMonoSupportW_la_SOURCES = \
supportw.c \
support-heap.c \
diff --git a/support/mac-reachability.c b/support/mac-reachability.c
deleted file mode 100644
index c2499f515c0..00000000000
--- a/support/mac-reachability.c
+++ /dev/null
@@ -1,153 +0,0 @@
-//
-// mac-reachability.c: System.Net.NetworkingInformation.NetworkChange
-// implementation for Mac OS X using SystemConfiguration's
-// NetworkReachability API.
-//
-// Authors:
-// Aaron Bockover (abock@xamarin.com)
-//
-// Copyright (c) 2013 Xamarin, Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-int mono_sc_reachability_enabled (void);
-
-#if defined(PLATFORM_MACOSX) || defined(TARGET_IOS)
-
-int
-mono_sc_reachability_enabled (void)
-{
- return 1;
-}
-
-#include <SystemConfiguration/SCNetworkReachability.h>
-#include <netinet/in.h>
-
-typedef void (*mono_sc_reachability_callback)(int);
-
-typedef struct {
- SCNetworkReachabilityRef reachability;
- mono_sc_reachability_callback callback;
-} mono_sc_reachability;
-
-mono_sc_reachability * mono_sc_reachability_new (mono_sc_reachability_callback callback);
-void mono_sc_reachability_free (mono_sc_reachability *reachability);
-int mono_sc_reachability_is_available (mono_sc_reachability *reachability);
-
-static int
-_mono_sc_reachability_is_available (SCNetworkReachabilityFlags flags)
-{
- return (flags & kSCNetworkFlagsReachable) && (flags & kSCNetworkFlagsConnectionRequired) == 0;
-}
-
-static void
-_mono_sc_reachability_callback (SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void *user)
-{
- mono_sc_reachability *reachability;
-
- if (user == NULL) {
- return;
- }
-
- reachability = (mono_sc_reachability *)user;
- if (reachability->callback == NULL) {
- return;
- }
-
- reachability->callback (_mono_sc_reachability_is_available (flags));
-}
-
-mono_sc_reachability *
-mono_sc_reachability_new (mono_sc_reachability_callback callback)
-{
- struct sockaddr_in zero;
- SCNetworkReachabilityRef reachability;
- SCNetworkReachabilityContext context;
- mono_sc_reachability *instance;
-
- if (callback == NULL) {
- return NULL;
- }
-
- bzero (&zero, sizeof (zero));
- zero.sin_len = sizeof (zero);
- zero.sin_family = AF_INET;
-
- reachability = SCNetworkReachabilityCreateWithAddress (NULL, (const struct sockaddr *)&zero);
- if (reachability == NULL) {
- return NULL;
- }
-
- instance = (mono_sc_reachability *)malloc (sizeof (mono_sc_reachability));
- instance->reachability = reachability;
- instance->callback = callback;
-
- bzero (&context, sizeof (context));
- context.info = instance;
-
- if (!SCNetworkReachabilitySetCallback (reachability, _mono_sc_reachability_callback, &context) ||
- !SCNetworkReachabilityScheduleWithRunLoop (reachability, CFRunLoopGetCurrent (), kCFRunLoopDefaultMode)) {
- mono_sc_reachability_free (instance);
- return NULL;
- }
-
- return instance;
-}
-
-void
-mono_sc_reachability_free (mono_sc_reachability *reachability)
-{
- if (reachability != NULL) {
- if (reachability->reachability != NULL) {
- SCNetworkReachabilityUnscheduleFromRunLoop (reachability->reachability,
- CFRunLoopGetCurrent (), kCFRunLoopDefaultMode);
- CFRelease (reachability->reachability);
- reachability->reachability = NULL;
- }
-
- reachability->callback = NULL;
- free (reachability);
- reachability = NULL;
- }
-}
-
-int
-mono_sc_reachability_is_available (mono_sc_reachability *reachability)
-{
- SCNetworkReachabilityFlags flags;
- return reachability != NULL && reachability->reachability != NULL &&
- SCNetworkReachabilityGetFlags (reachability->reachability, &flags) &&
- _mono_sc_reachability_is_available (flags);
-}
-
-#else
-
-int
-mono_sc_reachability_enabled (void)
-{
- return 0;
-}
-
-#endif
diff --git a/support/map.h b/support/map.h
index a78caf0ef9e..233c2b11314 100644
--- a/support/map.h
+++ b/support/map.h
@@ -1780,8 +1780,8 @@ gint64 Mono_Posix_Syscall_pwritev (int fd, struct Mono_Posix_Iovec* iov, int iov
gint64 Mono_Posix_Syscall_read (int fd, void* buf, guint64 count);
int Mono_Posix_Syscall_readdir (void* dir, struct Mono_Posix_Syscall__Dirent* dentry);
int Mono_Posix_Syscall_readdir_r (void* dirp, struct Mono_Posix_Syscall__Dirent* entry, void** result);
-int Mono_Posix_Syscall_readlink (const char* path, char* buf, guint64 bufsiz);
-int Mono_Posix_Syscall_readlinkat (int dirfd, const char* pathname, char* buf, guint64 bufsiz);
+gint64 Mono_Posix_Syscall_readlink (const char* path, unsigned char* buf, guint64 bufsiz);
+gint64 Mono_Posix_Syscall_readlinkat (int dirfd, const char* pathname, unsigned char* buf, guint64 bufsiz);
gint64 Mono_Posix_Syscall_readv (int fd, struct Mono_Posix_Iovec* iov, int iovcnt);
int Mono_Posix_Syscall_remap_file_pages (void* start, guint64 size, int prot, gint64 pgoff, int flags);
int Mono_Posix_Syscall_removexattr (const char* path, const char* name);
diff --git a/support/minizip/.gitignore b/support/minizip/.gitignore
new file mode 100644
index 00000000000..7306553d740
--- /dev/null
+++ b/support/minizip/.gitignore
@@ -0,0 +1,3 @@
+/*.lo
+/*.la
+
diff --git a/support/unistd.c b/support/unistd.c
index 7fe7dac8363..1123f2bc0fa 100644
--- a/support/unistd.c
+++ b/support/unistd.c
@@ -138,24 +138,24 @@ Mono_Posix_Syscall_ttyname_r (int fd, char *buf, mph_size_t len)
}
#endif /* ndef HAVE_TTYNAME_R */
-gint32
-Mono_Posix_Syscall_readlink (const char *path, char *buf, mph_size_t len)
+gint64
+Mono_Posix_Syscall_readlink (const char *path, unsigned char *buf, mph_size_t len)
{
- int r;
+ gint64 r;
mph_return_if_size_t_overflow (len);
- r = readlink (path, buf, (size_t) len);
+ r = readlink (path, (char*) buf, (size_t) len);
if (r >= 0 && r < len)
buf [r] = '\0';
return r;
}
#ifdef HAVE_READLINKAT
-gint32
-Mono_Posix_Syscall_readlinkat (int dirfd, const char *path, char *buf, mph_size_t len)
+gint64
+Mono_Posix_Syscall_readlinkat (int dirfd, const char *path, unsigned char *buf, mph_size_t len)
{
- int r;
+ gint64 r;
mph_return_if_size_t_overflow (len);
- r = readlinkat (dirfd, path, buf, (size_t) len);
+ r = readlinkat (dirfd, path, (char*) buf, (size_t) len);
if (r >= 0 && r < len)
buf [r] = '\0';
return r;
diff --git a/tools/locale-builder/Driver.cs b/tools/locale-builder/Driver.cs
index 11b0980667b..16368ce288f 100644
--- a/tools/locale-builder/Driver.cs
+++ b/tools/locale-builder/Driver.cs
@@ -1082,8 +1082,14 @@ namespace Mono.Tools.LocaleBuilder
ni.PositiveSign = el.InnerText;
el = node.SelectSingleNode ("minusSign");
- if (el != null)
- ni.NegativeSign = el.InnerText;
+ if (el != null) {
+ // CLDR uses unicode negative sign for some culture (e.g sv, is, lt, don't kwnow why) but .net always
+ // uses simple - sign
+ if (el.InnerText == "\u2212")
+ ni.NegativeSign = "-";
+ else
+ ni.NegativeSign = el.InnerText;
+ }
el = node.SelectSingleNode ("infinity");
diff --git a/tools/sgen/sgen-grep-binprot.c b/tools/sgen/sgen-grep-binprot.c
index 3dfda20fa21..32b3777d85a 100644
--- a/tools/sgen/sgen-grep-binprot.c
+++ b/tools/sgen/sgen-grep-binprot.c
@@ -44,6 +44,10 @@ read_entry (FILE *in, void **data)
case SGEN_PROTOCOL_CEMENT: size = sizeof (SGenProtocolCement); break;
case SGEN_PROTOCOL_CEMENT_RESET: size = 0; break;
case SGEN_PROTOCOL_DISLINK_UPDATE: size = sizeof (SGenProtocolDislinkUpdate); break;
+ case SGEN_PROTOCOL_DISLINK_UPDATE_STAGED: size = sizeof (SGenProtocolDislinkUpdateStaged); break;
+ case SGEN_PROTOCOL_DISLINK_PROCESS_STAGED: size = sizeof (SGenProtocolDislinkProcessStaged); break;
+ case SGEN_PROTOCOL_DOMAIN_UNLOAD_BEGIN: size = sizeof (SGenProtocolDomainUnload); break;
+ case SGEN_PROTOCOL_DOMAIN_UNLOAD_END: size = sizeof (SGenProtocolDomainUnload); break;
default: assert (0);
}
@@ -185,13 +189,37 @@ print_entry (int type, void *data)
}
case SGEN_PROTOCOL_DISLINK_UPDATE: {
SGenProtocolDislinkUpdate *entry = data;
- printf ("dislink_update link %p obj %p", entry->link, entry->obj);
+ printf ("dislink_update link %p obj %p staged %d", entry->link, entry->obj, entry->staged);
if (entry->obj)
printf (" track %d\n", entry->track);
else
printf ("\n");
break;
}
+ case SGEN_PROTOCOL_DISLINK_UPDATE_STAGED: {
+ SGenProtocolDislinkUpdateStaged *entry = data;
+ printf ("dislink_update_staged link %p obj %p index %d", entry->link, entry->obj, entry->index);
+ if (entry->obj)
+ printf (" track %d\n", entry->track);
+ else
+ printf ("\n");
+ break;
+ }
+ case SGEN_PROTOCOL_DISLINK_PROCESS_STAGED: {
+ SGenProtocolDislinkProcessStaged *entry = data;
+ printf ("dislink_process_staged link %p obj %p index %d\n", entry->link, entry->obj, entry->index);
+ break;
+ }
+ case SGEN_PROTOCOL_DOMAIN_UNLOAD_BEGIN: {
+ SGenProtocolDomainUnload *entry = data;
+ printf ("dislink_unload_begin domain %p\n", entry->domain);
+ break;
+ }
+ case SGEN_PROTOCOL_DOMAIN_UNLOAD_END: {
+ SGenProtocolDomainUnload *entry = data;
+ printf ("dislink_unload_end domain %p\n", entry->domain);
+ break;
+ }
default:
assert (0);
}
@@ -215,6 +243,8 @@ is_match (gpointer ptr, int type, void *data)
case SGEN_PROTOCOL_THREAD_REGISTER:
case SGEN_PROTOCOL_THREAD_UNREGISTER:
case SGEN_PROTOCOL_CEMENT_RESET:
+ case SGEN_PROTOCOL_DOMAIN_UNLOAD_BEGIN:
+ case SGEN_PROTOCOL_DOMAIN_UNLOAD_END:
return TRUE;
case SGEN_PROTOCOL_ALLOC:
case SGEN_PROTOCOL_ALLOC_PINNED:
@@ -280,11 +310,70 @@ is_match (gpointer ptr, int type, void *data)
SGenProtocolDislinkUpdate *entry = data;
return ptr == entry->obj || ptr == entry->link;
}
+ case SGEN_PROTOCOL_DISLINK_UPDATE_STAGED: {
+ SGenProtocolDislinkUpdateStaged *entry = data;
+ return ptr == entry->obj || ptr == entry->link;
+ }
+ case SGEN_PROTOCOL_DISLINK_PROCESS_STAGED: {
+ SGenProtocolDislinkProcessStaged *entry = data;
+ return ptr == entry->obj || ptr == entry->link;
+ }
default:
assert (0);
}
}
+static gboolean
+is_vtable_match (gpointer ptr, int type, void *data)
+{
+ switch (type) {
+ case SGEN_PROTOCOL_ALLOC:
+ case SGEN_PROTOCOL_ALLOC_PINNED:
+ case SGEN_PROTOCOL_ALLOC_DEGRADED: {
+ SGenProtocolAlloc *entry = data;
+ return ptr == entry->vtable;
+ }
+ case SGEN_PROTOCOL_COPY: {
+ SGenProtocolCopy *entry = data;
+ return ptr == entry->vtable;
+ }
+ case SGEN_PROTOCOL_PIN: {
+ SGenProtocolPin *entry = data;
+ return ptr == entry->vtable;
+ }
+ case SGEN_PROTOCOL_SCAN_BEGIN: {
+ SGenProtocolScanBegin *entry = data;
+ return ptr == entry->vtable;
+ }
+ case SGEN_PROTOCOL_WBARRIER: {
+ SGenProtocolWBarrier *entry = data;
+ return ptr == entry->value_vtable;
+ }
+ case SGEN_PROTOCOL_GLOBAL_REMSET: {
+ SGenProtocolGlobalRemset *entry = data;
+ return ptr == entry->value_vtable;
+ }
+ case SGEN_PROTOCOL_PTR_UPDATE: {
+ SGenProtocolPtrUpdate *entry = data;
+ return ptr == entry->vtable;
+ }
+ case SGEN_PROTOCOL_CLEANUP: {
+ SGenProtocolCleanup *entry = data;
+ return ptr == entry->vtable;
+ }
+ case SGEN_PROTOCOL_MISSING_REMSET: {
+ SGenProtocolMissingRemset *entry = data;
+ return ptr == entry->obj_vtable || ptr == entry->value_vtable;
+ }
+ case SGEN_PROTOCOL_CEMENT: {
+ SGenProtocolCement *entry = data;
+ return ptr == entry->vtable;
+ }
+ default:
+ return FALSE;
+ }
+}
+
static gboolean dump_all = FALSE;
int
@@ -294,13 +383,19 @@ main (int argc, char *argv[])
void *data;
int num_args = argc - 1;
int num_nums = 0;
+ int num_vtables = 0;
int i;
long nums [num_args];
+ long vtables [num_args];
for (i = 0; i < num_args; ++i) {
char *arg = argv [i + 1];
+ char *next_arg = argv [i + 2];
if (!strcmp (arg, "--all")) {
dump_all = TRUE;
+ } else if (!strcmp (arg, "-v") || !strcmp (arg, "--vtable")) {
+ vtables [num_vtables++] = strtoul (next_arg, NULL, 16);
+ ++i;
} else {
nums [num_nums++] = strtoul (arg, NULL, 16);
}
@@ -314,6 +409,14 @@ main (int argc, char *argv[])
break;
}
}
+ if (!match) {
+ for (i = 0; i < num_vtables; ++i) {
+ if (is_vtable_match ((gpointer) vtables [i], type, data)) {
+ match = TRUE;
+ break;
+ }
+ }
+ }
if (dump_all)
printf (match ? "* " : " ");
if (match || dump_all)
diff --git a/winconfig.h b/winconfig.h
index dd3d69b0a55..834bbe7bfae 100644
--- a/winconfig.h
+++ b/winconfig.h
@@ -92,6 +92,10 @@
/* Define to 1 if you have the <curses.h> header file. */
/* #undef HAVE_CURSES_H */
+/* Define to 1 if you have the declaration of `InterlockedCompareExchange64',
+ and to 0 if you don't. */
+#define HAVE_DECL_INTERLOCKEDCOMPAREEXCHANGE64 1
+
/* Define to 1 if you have the <dirent.h> header file. */
/* #define HAVE_DIRENT_H 1 */